Class EJBQLPathTranslator

  • All Implemented Interfaces:
    EJBQLExpressionVisitor

    public abstract class EJBQLPathTranslator
    extends EJBQLBaseVisitor
    A translator that walks the relationship/attribute path, appending joins to the query.
    Since:
    3.0
    • Field Detail

      • currentEntity

        protected ObjEntity currentEntity
      • lastPathComponent

        protected String lastPathComponent
      • innerJoin

        protected boolean innerJoin
      • lastAlias

        protected String lastAlias
      • idPath

        protected String idPath
      • joinMarker

        protected String joinMarker
      • fullPath

        protected String fullPath
    • Method Detail

      • visitPath

        public boolean visitPath​(EJBQLExpression expression,
                                 int finishedChildIndex)
        Description copied from interface: EJBQLExpressionVisitor
        Called on visiting "path" expression and also after visiting every expression child.
        Specified by:
        visitPath in interface EJBQLExpressionVisitor
        Overrides:
        visitPath in class EJBQLBaseVisitor
        Parameters:
        expression - a "path" node being visited.
        finishedChildIndex - "-1" when the expression node is visited for the first time, before its children; otherwise this is an index of a child just visited.
      • resolveLastPathComponent

        protected void resolveLastPathComponent​(String pathComponent)
        Since:
        4.0
      • resolveJoin

        protected void resolveJoin()
      • processIntermediatePathComponent

        protected void processIntermediatePathComponent()
      • processLastPathComponent

        protected void processLastPathComponent()
      • processTerminatingAttribute

        protected void processTerminatingAttribute​(ObjAttribute attribute)
      • processTerminatingRelationship

        protected void processTerminatingRelationship​(ObjRelationship relationship)
      • chooseDbRelationship

        protected DbRelationship chooseDbRelationship​(ObjRelationship relationship)
        Checks if the object relationship is flattened and then chooses the corresponding db relationship. The last in idPath if isFlattened and the first in list otherwise.
        Parameters:
        relationship - the object relationship
        Returns:
        DbRelationship
      • isUsingAliases

        public boolean isUsingAliases()
      • setUsingAliases

        public void setUsingAliases​(boolean usingAliases)