Class EncapsulatedIdentificationVariableExpressionStateObject

    • Field Detail

      • IDENTIFICATION_VARIABLE_PROPERTY

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

      • EncapsulatedIdentificationVariableExpressionStateObject

        protected EncapsulatedIdentificationVariableExpressionStateObject​(StateObject parent)
        Creates a new EncapsulatedIdentificationVariableExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • EncapsulatedIdentificationVariableExpressionStateObject

        protected EncapsulatedIdentificationVariableExpressionStateObject​(StateObject parent,
                                                                          java.lang.String identificationVariable)
        Creates a new EncapsulatedIdentificationVariableExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        identificationVariable - The identification variable
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
    • Method Detail

      • checkIntegrity

        protected void checkIntegrity()
        Makes sure the cached identification variable and the one owned by IdentificationVariableStateObject are the same. If they are not, then clears the cached values related to the type.
      • clearResolvedObjects

        protected void clearResolvedObjects()
        Clears the values related to the managed type and type.
      • getIdentificationVariable

        public java.lang.String getIdentificationVariable()
        Returns the identification variable.
        Returns:
        The name of the identification variable
      • getManagedType

        public IManagedType getManagedType()
        Returns the IManagedType associated with the field handled by this object. If this object does not handle a field that has a IManagedType, then null should be returned.

        For example: "SELECT e FROM Employee e", the object for e would be returning the IManagedType for Employee.

        Returns:
        Either the IManagedType, if it could be resolved; null otherwise
      • getType

        public IType getType()
        Returns the IType of the field handled by this object.
        Returns:
        Either the IType of the identification variable or the IType for IType.UNRESOLVABLE_TYPE if it could not be resolved
      • hasIdentificationVariable

        public boolean hasIdentificationVariable()
        Determines whether the identification variable has been defined or not.
        Returns:
        true if the identification variable has been defined; false otherwise
      • resolveManagedType

        protected IManagedType resolveManagedType()
        Retrieves the IManagedType that is mapped to the identification variable, if and only if the identification variable is used to declare an entity.
        Returns:
        Either the IManagedType declared by the identification variable or null if it could not be resolved
      • resolveType

        protected IType resolveType()
        Resolves the IType of the property handled by this object.
        Returns:
        Either the IType that was resolved by this object or the IType for IType.UNRESOLVABLE_TYPE if it could not be resolved
      • setIdentificationVariable

        public void setIdentificationVariable​(java.lang.String identificationVariable)
        Sets the identification variable of this encapsulated expression.
        Parameters:
        identificationVariable - The name of the identification variable