Package io.jmix.data
Interface QueryParser
- All Known Implementing Classes:
QueryParserAstBased
public interface QueryParser
Parses JPQL query and returns some information about it.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetEntityAlias
(String targetEntity) Main entity aliasMain entity nameGet all parameter namesboolean
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 paramName) boolean
Returns true if SELECT query contains joins
-
Method Details
-
getParamNames
Get all parameter names -
getEntityName
String getEntityName()Main entity name -
getAllEntityNames
-
getEntityAlias
Main entity alias -
getEntityAlias
String getEntityAlias() -
isEntitySelect
Returns true if this is a standard select from an entity - not count() and not fields (e.id, etc.) -
hasIsNullCondition
-
hasIsNotNullCondition
-
isQueryWithJoins
boolean isQueryWithJoins()Returns true if SELECT query contains joins -
getOriginalEntityName
- 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
- 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
-
isCollectionOriginalEntitySelect
boolean isCollectionOriginalEntitySelect()- 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
-
isParameterInCondition
-
getSelectedExpressionsList
-
getQueryPaths
List<QueryParser.QueryPath> getQueryPaths() -
isParameterUsedInAnyCondition
-