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 classes/interfaces inherited from interface io.jmix.data.QueryParser
QueryParser.QueryPath
-
Field Summary
Modifier and TypeFieldDescriptionprotected DomainModel
protected String
protected QueryTreeAnalyzer
protected QueryTree
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected QueryTreeAnalyzer
getEntityAlias
(String entityType) Main entity aliasMain entity nameprotected QueryParserAstBased.EntityNameAndPath
Get all parameter namesprotected QueryTree
getTree()
boolean
hasIsNotNullCondition
(String attribute) boolean
hasIsNullCondition
(String attribute) boolean
boolean
isEntitySelect
(String targetEntity) Returns true if this is a standard select from an entity - not count() and not fields (e.id, etc.)boolean
isParameterInCondition
(String parameterName) boolean
isParameterUsedInAnyCondition
(String parameterName) boolean
Returns true if SELECT query contains joins
-
Field Details
-
model
-
query
-
queryTree
-
queryAnalyzer
-
-
Constructor Details
-
QueryParserAstBased
-
-
Method Details
-
getTree
-
getAnalyzer
-
getParamNames
Description copied from interface:QueryParser
Get all parameter names- Specified by:
getParamNames
in interfaceQueryParser
-
getAllEntityNames
- Specified by:
getAllEntityNames
in interfaceQueryParser
-
getEntityName
Description copied from interface:QueryParser
Main entity name- Specified by:
getEntityName
in interfaceQueryParser
-
getEntityAlias
Description copied from interface:QueryParser
Main entity alias- Specified by:
getEntityAlias
in interfaceQueryParser
-
getEntityAlias
- Specified by:
getEntityAlias
in interfaceQueryParser
-
isEntitySelect
Description copied from interface:QueryParser
Returns true if this is a standard select from an entity - not count() and not fields (e.id, etc.)- Specified by:
isEntitySelect
in interfaceQueryParser
-
hasIsNullCondition
- Specified by:
hasIsNullCondition
in interfaceQueryParser
-
hasIsNotNullCondition
- Specified by:
hasIsNotNullCondition
in interfaceQueryParser
-
isQueryWithJoins
public boolean isQueryWithJoins()Description copied from interface:QueryParser
Returns true if SELECT query contains joins- Specified by:
isQueryWithJoins
in interfaceQueryParser
-
getOriginalEntityName
- Specified by:
getOriginalEntityName
in 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:
getOriginalEntityPath
in 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:
isParameterInCondition
in interfaceQueryParser
-
isParameterUsedInAnyCondition
- Specified by:
isParameterUsedInAnyCondition
in interfaceQueryParser
-
isCollectionOriginalEntitySelect
public boolean isCollectionOriginalEntitySelect()- Specified by:
isCollectionOriginalEntitySelect
in 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:
getQueryPaths
in interfaceQueryParser
-
getSelectedExpressionsList
- Specified by:
getSelectedExpressionsList
in interfaceQueryParser
-
getOriginEntityNameAndPath
-