Package io.jmix.rest.impl.config
Class RestQueriesConfiguration
java.lang.Object
io.jmix.rest.impl.config.RestQueriesConfiguration
Class is used for loading and storing of predefined JPQL queries that are used by the REST API. Queries are loaded
 from configuration files defined by the 
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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classClass stores an information about the predefined JPQL querystatic classClass stores an information about the predefined JPQL query parameter
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringprotected org.springframework.core.env.Environmentprotected booleanprotected static final Stringprotected ReadWriteLockprotected List<RestQueriesConfiguration.QueryInfo>protected Resources
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprotected RestQueriesConfiguration.QueryInfocreateAllEntitiesQuery(String entityName) getQueries(String entityName) Returns a query description with the given name for the given entity.protected voidinit()protected voidloadConfig(org.dom4j.Element rootElem) 
- 
Field Details- 
JMIX_REST_QUERIES_CONFIG_PROP_NAME- See Also:
 
- 
initializedprotected volatile boolean initialized
- 
lock
- 
resources
- 
environment@Autowired protected org.springframework.core.env.Environment environment
- 
queries
- 
ALL_ENTITIES_QUERY_NAME- See Also:
 
 
- 
- 
Constructor Details- 
RestQueriesConfigurationpublic RestQueriesConfiguration()
 
- 
- 
Method Details- 
getQueryReturns a query description with the given name for the given entity.- Parameters:
- entityName- entity name
- queryName- query name
- Returns:
- query description
 
- 
getQueries
- 
getQueries
- 
checkInitializedprotected void checkInitialized()
- 
initprotected void init()
- 
loadConfigprotected void loadConfig(org.dom4j.Element rootElem) 
- 
createAllEntitiesQuery
 
-