Package io.jmix.data.accesscontext
Class ReadEntityQueryContext
java.lang.Object
io.jmix.data.accesscontext.ReadEntityQueryContext
- All Implemented Interfaces:
AccessContext
Defines an authorization point for modifying JPQL queries by adding JOIN and WHERE clauses.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<ReadEntityQueryContext.Condition>
protected final MetaClass
protected final JmixQuery
protected final QueryTransformerFactory
protected final boolean
-
Constructor Summary
ConstructorDescriptionReadEntityQueryContext
(JmixQuery originalQuery, MetaClass entityClass, QueryTransformerFactory transformerFactory) ReadEntityQueryContext
(JmixQuery originalQuery, QueryTransformerFactory transformerFactory, Metadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addJoinAndWhere
(String join, String where) protected void
Returns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions.protected static String
printQuery
(String query)
-
Field Details
-
queryTransformerFactory
-
originalQuery
-
entityClass
-
singleResult
protected final boolean singleResult -
conditions
-
-
Constructor Details
-
ReadEntityQueryContext
public ReadEntityQueryContext(JmixQuery originalQuery, MetaClass entityClass, QueryTransformerFactory transformerFactory) -
ReadEntityQueryContext
public ReadEntityQueryContext(JmixQuery originalQuery, QueryTransformerFactory transformerFactory, Metadata metadata)
-
-
Method Details
-
getEntityClass
-
addJoinAndWhere
-
getResultQuery
-
buildQuery
protected void buildQuery() -
printQuery
-
explainConstraints
Description copied from interface:AccessContext
Returns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions. Null if the current context does not impose any constraints.- Specified by:
explainConstraints
in interfaceAccessContext
-