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.
Since:
2.4
Version:
2.4
See Also:
  • Constructor Details

    • AbstractSchemaNameStateObject

      public AbstractSchemaNameStateObject(StateObject parent)
      Creates a new AbstractSchemaNameStateObject.
      Parameters:
      parent - The parent of this state object, which cannot be null
      Throws:
      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:
      NullPointerException - The given parent cannot be null
    • AbstractSchemaNameStateObject

      public AbstractSchemaNameStateObject(StateObject parent, 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:
      NullPointerException - The given parent cannot be null
  • Method Details

    • accept

      public void accept(StateObjectVisitor visitor)
      Description copied from interface: StateObject
      Visits this StateObject by the given visitor.
      Parameters:
      visitor - The visitor to visit this object
    • 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
    • getExpression

      public AbstractSchemaName getExpression()
      Description copied from interface: StateObject
      Returns the actual parsed object if this StateObject representation of the JPQL query was created by parsing an existing JPQL query.
      Specified by:
      getExpression in interface StateObject
      Overrides:
      getExpression in class AbstractStateObject
      Returns:
      The parsed object when a JPQL query is parsed and converted into a StateObject or null when the JPQL query is manually created (i.e. not from a string)
    • getText

      public 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(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