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
Nested ClassesModifier and TypeClassDescriptionstatic classClass stores an information about the predefined JPQL querystatic classClass stores an information about the predefined JPQL query parameter -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected org.springframework.core.env.Environmentprotected booleanprotected static final Stringprotected ReadWriteLockprotected List<RestQueriesConfiguration.QueryInfo>protected Resources -
Constructor Summary
Constructors -
Method Summary
Modifier 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:
-
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
-