Package io.jmix.data

Interface QueryParser

All Known Implementing Classes:
QueryParserAstBased

public interface QueryParser
Parses JPQL query and returns some information about it.
  • Method Details

    • getParamNames

      Set<String> getParamNames()
      Get all parameter names
    • getEntityName

      String getEntityName()
      Main entity name
    • getAllEntityNames

      Set<String> getAllEntityNames()
    • getEntityAlias

      String getEntityAlias(String targetEntity)
      Main entity alias
    • getEntityAlias

      String getEntityAlias()
    • isEntitySelect

      boolean isEntitySelect(String targetEntity)
      Returns true if this is a standard select from an entity - not count() and not fields (e.id, etc.)
    • hasIsNullCondition

      boolean hasIsNullCondition(String attribute)
    • hasIsNotNullCondition

      boolean hasIsNotNullCondition(String attribute)
    • isQueryWithJoins

      boolean isQueryWithJoins()
      Returns true if SELECT query contains joins
    • getOriginalEntityName

      @Nullable String 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

      @Nullable String 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

      boolean isParameterInCondition(String parameterName)
    • getSelectedExpressionsList

      List<String> getSelectedExpressionsList()
    • getQueryPaths

      List<QueryParser.QueryPath> getQueryPaths()
    • isParameterUsedInAnyCondition

      boolean isParameterUsedInAnyCondition(String paramName)