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 Summary
Modifier and TypeClassDescriptionstatic class
Class stores an information about the predefined JPQL querystatic class
Class stores an information about the predefined JPQL query parameter -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected org.springframework.core.env.Environment
protected boolean
protected static final String
protected ReadWriteLock
protected List<RestQueriesConfiguration.QueryInfo>
protected Resources
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected RestQueriesConfiguration.QueryInfo
createAllEntitiesQuery
(String entityName) getQueries
(String entityName) Returns a query description with the given name for the given entity.protected void
init()
protected void
loadConfig
(org.dom4j.Element rootElem)
-
Field Details
-
JMIX_REST_QUERIES_CONFIG_PROP_NAME
- See Also:
-
initialized
protected volatile boolean initialized -
lock
-
resources
-
environment
@Autowired protected org.springframework.core.env.Environment environment -
queries
-
ALL_ENTITIES_QUERY_NAME
- See Also:
-
-
Constructor Details
-
RestQueriesConfiguration
public RestQueriesConfiguration()
-
-
Method Details
-
getQuery
Returns a query description with the given name for the given entity.- Parameters:
entityName
- entity namequeryName
- query name- Returns:
- query description
-
getQueries
-
getQueries
-
checkInitialized
protected void checkInitialized() -
init
protected void init() -
loadConfig
protected void loadConfig(org.dom4j.Element rootElem) -
createAllEntitiesQuery
-