Class AbstractSchemaNameStateObject

  • All Implemented Interfaces:
    StateObject

    public class AbstractSchemaNameStateObject
    extends SimpleStateObject
    An abstract schema name designates the abstract schema type over which the query ranges.
    Version:
    2.4
    See Also:
    AbstractSchemaName
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Detail

      • AbstractSchemaNameStateObject

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

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

        public AbstractSchemaNameStateObject​(StateObject parent,
                                             java.lang.String entityName)
        Creates a new AbstractSchemaNameStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        entityName - The name of the entity
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
    • Method Detail

      • getEntity

        public IEntity getEntity()
        Returns the actual external form representing the IEntity.
        Returns:
        The actual IEntity or null if no entity exists with the entity name
      • getText

        public java.lang.String getText()
        Returns the name of the abstract schema, which is the name of the entity.
        Overrides:
        getText in class SimpleStateObject
        Returns:
        The name of the abstract schema, which is the name of the entity
      • isEntityResolved

        public boolean isEntityResolved()
        Determines whether the IEntity has been resolved.
        Returns:
        true if an entity exists with the abstract schema name in the managed types provider; false otherwise
      • resolveEntity

        public void resolveEntity()
        Resolves the abstract schema name and retrieve the associated IEntity.
      • setEntity

        public void setEntity​(IEntity entity)
        Sets the actual IEntity and updates the abstract schema name.
        Parameters:
        entity - The new IEntity
      • setExpression

        public void setExpression​(AbstractSchemaName 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 an abstract schema name (entity name)
      • setText

        public void setText​(java.lang.String abstractSchemaName)
        Sets the name of the abstract schema, which is the name of the entity.
        Overrides:
        setText in class SimpleStateObject
        Parameters:
        abstractSchemaName - The name of the abstract schema, which is the name of the entity