@Component(value="rest_RestQueriesConfiguration")
public class RestQueriesConfiguration
extends java.lang.Object
jmix.rest.queriesConfig
application property.
Queries with the name defined by the ALL_ENTITIES_QUERY_NAME
field should not be present in the queries
config. If the query with this name is requested, the RestQueriesConfiguration.QueryInfo
for the query that returns all entities will
be returned.
Modifier and Type | Class and Description |
---|---|
static class |
RestQueriesConfiguration.QueryInfo
Class stores an information about the predefined JPQL query
|
static class |
RestQueriesConfiguration.QueryParamInfo
Class stores an information about the predefined JPQL query parameter
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_ENTITIES_QUERY_NAME |
protected org.springframework.core.env.Environment |
environment |
protected boolean |
initialized |
protected static java.lang.String |
JMIX_REST_QUERIES_CONFIG_PROP_NAME |
protected java.util.concurrent.locks.ReadWriteLock |
lock |
protected java.util.List<RestQueriesConfiguration.QueryInfo> |
queries |
protected io.jmix.core.Resources |
resources |
Constructor and Description |
---|
RestQueriesConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkInitialized() |
protected RestQueriesConfiguration.QueryInfo |
createAllEntitiesQuery(java.lang.String entityName) |
java.util.List<RestQueriesConfiguration.QueryInfo> |
getQueries() |
java.util.List<RestQueriesConfiguration.QueryInfo> |
getQueries(java.lang.String entityName) |
RestQueriesConfiguration.QueryInfo |
getQuery(java.lang.String entityName,
java.lang.String queryName)
Returns a query description with the given name for the given entity.
|
protected void |
init() |
protected void |
loadConfig(org.dom4j.Element rootElem) |
protected static final java.lang.String JMIX_REST_QUERIES_CONFIG_PROP_NAME
protected volatile boolean initialized
protected java.util.concurrent.locks.ReadWriteLock lock
@Autowired protected io.jmix.core.Resources resources
@Autowired protected org.springframework.core.env.Environment environment
protected java.util.List<RestQueriesConfiguration.QueryInfo> queries
public static final java.lang.String ALL_ENTITIES_QUERY_NAME
@Nullable public RestQueriesConfiguration.QueryInfo getQuery(java.lang.String entityName, java.lang.String queryName)
entityName
- entity namequeryName
- query namepublic java.util.List<RestQueriesConfiguration.QueryInfo> getQueries()
public java.util.List<RestQueriesConfiguration.QueryInfo> getQueries(java.lang.String entityName)
protected void checkInitialized()
protected void init()
protected void loadConfig(org.dom4j.Element rootElem)
protected RestQueriesConfiguration.QueryInfo createAllEntitiesQuery(java.lang.String entityName)