Package io.jmix.data.impl.jpql
Class QueryParserAstBased
java.lang.Object
io.jmix.data.impl.jpql.QueryParserAstBased
- All Implemented Interfaces:
QueryParser
@Scope("prototype")
@Component("data_QueryParser")
public class QueryParserAstBased
extends Object
implements QueryParser
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.jmix.data.QueryParser
QueryParser.QueryPath -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DomainModelprotected Stringprotected QueryTreeAnalyzerprotected QueryTree -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected QueryTreeAnalyzergetEntityAlias(String entityType) Main entity aliasMain entity nameprotected QueryParserAstBased.EntityNameAndPathGet all parameter namesprotected QueryTreegetTree()booleanhasIsNotNullCondition(String attribute) booleanhasIsNullCondition(String attribute) booleanbooleanisEntitySelect(String targetEntity) Returns true if this is a standard select from an entity - not count() and not fields (e.id, etc.)booleanisParameterInCondition(String parameterName) booleanisParameterUsedInAnyCondition(String parameterName) booleanReturns true if SELECT query contains joins
-
Field Details
-
model
-
query
-
queryTree
-
queryAnalyzer
-
-
Constructor Details
-
QueryParserAstBased
-
-
Method Details
-
getTree
-
getAnalyzer
-
getParamNames
Description copied from interface:QueryParserGet all parameter names- Specified by:
getParamNamesin interfaceQueryParser
-
getAllEntityNames
- Specified by:
getAllEntityNamesin interfaceQueryParser
-
getEntityName
Description copied from interface:QueryParserMain entity name- Specified by:
getEntityNamein interfaceQueryParser
-
getEntityAlias
Description copied from interface:QueryParserMain entity alias- Specified by:
getEntityAliasin interfaceQueryParser
-
getEntityAlias
- Specified by:
getEntityAliasin interfaceQueryParser
-
isEntitySelect
Description copied from interface:QueryParserReturns true if this is a standard select from an entity - not count() and not fields (e.id, etc.)- Specified by:
isEntitySelectin interfaceQueryParser
-
hasIsNullCondition
- Specified by:
hasIsNullConditionin interfaceQueryParser
-
hasIsNotNullCondition
- Specified by:
hasIsNotNullConditionin interfaceQueryParser
-
isQueryWithJoins
public boolean isQueryWithJoins()Description copied from interface:QueryParserReturns true if SELECT query contains joins- Specified by:
isQueryWithJoinsin interfaceQueryParser
-
getOriginalEntityName
- Specified by:
getOriginalEntityNamein interfaceQueryParser- Returns:
- Entity name if not main entity name is returned, otherwise null Example: select u.group from sec$User u -> sec$Group Example: select g from sec$User u join u.group g -> sec$Group
-
getOriginalEntityPath
- Specified by:
getOriginalEntityPathin interfaceQueryParser- Returns:
- Entity path if not main entity name is returned, otherwise null Example: select u.group from sec$User u -> u.group Example: select g from sec$User u join u.group g -> g
-
isParameterInCondition
- Specified by:
isParameterInConditionin interfaceQueryParser
-
isParameterUsedInAnyCondition
- Specified by:
isParameterUsedInAnyConditionin interfaceQueryParser
-
isCollectionOriginalEntitySelect
public boolean isCollectionOriginalEntitySelect()- Specified by:
isCollectionOriginalEntitySelectin interfaceQueryParser- Returns:
- true if not main entity selected and it's path with collection Example: select u.group from sec$User u -> false Example: select u.userRoles from sec$User u -> true
-
getQueryPaths
- Specified by:
getQueryPathsin interfaceQueryParser
-
getSelectedExpressionsList
- Specified by:
getSelectedExpressionsListin interfaceQueryParser
-
getOriginEntityNameAndPath
-