Package io.jmix.data.impl.jpql
Class QueryTreeAnalyzer
java.lang.Object
io.jmix.data.impl.jpql.QueryTreeAnalyzer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Stream<T> generateChildrenByClass(org.antlr.runtime.tree.CommonTree commonTree, Class<T> clazz) getMainEntityName(IdentificationVariableNode identificationVariable) getMainEntityVariable(IdentificationVariableNode identificationVariable) @Nullable IdentificationVariableNodeReturns conditions of the main query.getMainSelectedEntityName(PathNode pathNode) getMainSelectedEntityVariable(PathNode pathNode) @Nullable PathNodebooleanisConditionForEntityProperty(SimpleConditionNode condition, String variableName, String property) booleanisConditionForParameter(SimpleConditionNode condition, String parameterName) booleanisConditionIN(SimpleConditionNode condition) booleanisConditionISNOTNULL(SimpleConditionNode condition) booleanisConditionISNULL(SimpleConditionNode condition) protected booleanisInSubquery(org.antlr.runtime.tree.CommonTree node) Returns true if the given node is located in a subquery.booleanbooleanisVariablePathNode(PathNode pathNode)
-
Field Details
-
queryTree
-
-
Constructor Details
-
QueryTreeAnalyzer
-
-
Method Details
-
getMainEntityName
-
getMainEntityVariable
-
getMainIdentificationVariableNode
-
getMainSelectedEntityName
-
getMainSelectedEntityVariable
-
getMainSelectedPathNode
-
getParamNames
-
getEntityNames
-
getConditions
-
getMainQueryConditions
Returns conditions of the main query. Conditions located in subqueries are not returned. -
isInSubquery
protected boolean isInSubquery(org.antlr.runtime.tree.CommonTree node) Returns true if the given node is located in a subquery. Subqueries are represented by the same node type as the main query, so the node is in a subquery if it has more than one query node among its parents. -
isQueryWithJoins
public boolean isQueryWithJoins() -
isConditionForEntityProperty
public boolean isConditionForEntityProperty(SimpleConditionNode condition, String variableName, String property) -
isConditionForParameter
-
isConditionIN
-
isConditionISNULL
-
isConditionISNOTNULL
-
isVariablePathNode
-
generateChildrenByClass
-