Class AbstractRangeVariableDeclarationStateObject

    • Field Detail

      • AS_PROPERTY

        public static final String AS_PROPERTY
        Notifies the visibility of the AS identifier has changed.
        See Also:
        Constant Field Values
      • IDENTIFICATION_VARIABLE_PROPERTY

        public static final String IDENTIFICATION_VARIABLE_PROPERTY
        Notifies the identification variable property has changed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractRangeVariableDeclarationStateObject

        public AbstractRangeVariableDeclarationStateObject​(AbstractModifyClauseStateObject parent)
        Creates a new AbstractRangeVariableDeclarationStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        Throws:
        NullPointerException - The given parent cannot be null
    • Method Detail

      • getIdentificationVariable

        public String getIdentificationVariable()
        Returns the identification variable name that is ranging over the abstract schema type.
        Returns:
        The identification variable name
      • getRootPath

        public abstract String getRootPath()
        Returns the "root" object for objects which may not be reachable by navigation.
        Returns:
        The "root" object
      • getRootStateObject

        public StateObject getRootStateObject()
        Returns the StateObject holding onto the abstract schema name.
        Returns:
        The StateObject, which is never null
      • hasAs

        public boolean hasAs()
        Determines whether the AS identifier is used or not.
        Returns:
        true if the AS identifier is part of the expression; false otherwise
      • hasIdentificationVariable

        public boolean hasIdentificationVariable()
        Determines whether an identification variable was defined.
        Returns:
        true if an identification variable is defined; false otherwise
      • isIdentificationVariableOptional

        public boolean isIdentificationVariableOptional()
        Determines whether the identification variable is optional or not. The only time it is optional is when this model is used in a modify clause (DELETE or UPDATE).
        Returns:
        true if an identification variable is not required; false if it is required
      • isIdentificationVariableVirtual

        public boolean isIdentificationVariableVirtual()
        Determines whether this identification variable is virtual, meaning it's not part of the query but is required for proper navigability.
        Returns:
        true if this identification variable was virtually created to fully qualify path expression; false if it was parsed
      • setAs

        public void setAs​(boolean as)
        Sets whether the AS identifier is used or not.
        Parameters:
        as - true if the AS identifier is part of the expression; false otherwise
      • setExpression

        public void setExpression​(RangeVariableDeclaration expression)
        Keeps a reference of the parsed object object, which should only be* done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.
        Parameters:
        expression - The parsed object representing a range variable declaration
      • setIdentificationVariable

        public void setIdentificationVariable​(String identificationVariable)
        Sets the new identification variable that will range over the "root" object.
        Parameters:
        identificationVariable - The new identification variable
      • setRootPath

        public abstract void setRootPath​(String root)
        Sets the "root" object for objects which may not be reachable by navigation.
        Parameters:
        root - The "root" object
      • toggleAs

        public void toggleAs()
        Toggles the usage of the AS identifier.