Class FromElement

All Implemented Interfaces:
antlr.collections.AST, Serializable, DisplayableNode, InitializeableNode, ParameterContainer
Direct Known Subclasses:
ComponentJoin, ImpliedFromElement

public class FromElement extends HqlSqlWalkerNode implements DisplayableNode, ParameterContainer
Represents a single mapped class mentioned in an HQL FROM clause. Each class reference will have the following symbols:
  • A class name - This is the name of the Java class that is mapped by Hibernate.
  • [optional] an HQL alias for the mapped class.
  • A table name - The name of the table that is mapped to the Java class.
  • A table alias - The alias for the table that will be used in the resulting SQL.
See Also:
  • Field Details

  • Constructor Details

    • FromElement

      public FromElement()
    • FromElement

      protected FromElement(FromClause fromClause, FromElement origin, String alias)
      Constructor form used to initialize ComponentJoin
      Parameters:
      fromClause - The FROM clause to which this element belongs
      origin - The origin (LHS) of this element
      alias - The alias applied to this element
  • Method Details

    • initializeComponentJoin

      protected void initializeComponentJoin(org.hibernate.hql.ast.tree.FromElementType elementType)
    • getCollectionSuffix

      public String getCollectionSuffix()
    • setCollectionSuffix

      public void setCollectionSuffix(String suffix)
    • initializeCollection

      public void initializeCollection(FromClause fromClause, String classAlias, String tableAlias)
    • initializeEntity

      public void initializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias)
    • getEntityPersister

      public EntityPersister getEntityPersister()
    • getDataType

      public Type getDataType()
      Overrides:
      getDataType in class SqlNode
    • getSelectType

      public Type getSelectType()
    • getQueryable

      public Queryable getQueryable()
    • getClassName

      public String getClassName()
    • getClassAlias

      public String getClassAlias()
    • getTableAlias

      public String getTableAlias()
    • getFromClause

      public FromClause getFromClause()
    • isImplied

      public boolean isImplied()
      Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in the FROM clause.
      Returns:
      true if this FromElement was implied by a path, or false if this FROM element is explicitly declared
    • getDisplayText

      public String getDisplayText()
      Returns additional display text for the AST node.
      Specified by:
      getDisplayText in interface DisplayableNode
      Returns:
      String - The additional display text.
    • appendDisplayText

      protected void appendDisplayText(StringBuffer buf)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • setJoinSequence

      public void setJoinSequence(JoinSequence joinSequence)
    • getJoinSequence

      public JoinSequence getJoinSequence()
    • setIncludeSubclasses

      public void setIncludeSubclasses(boolean includeSubclasses)
    • isIncludeSubclasses

      public boolean isIncludeSubclasses()
    • isDereferencedBySuperclassOrSubclassProperty

      public boolean isDereferencedBySuperclassOrSubclassProperty()
    • getIdentityColumn

      public String getIdentityColumn()
    • setCollectionJoin

      public void setCollectionJoin(boolean collectionJoin)
    • isCollectionJoin

      public boolean isCollectionJoin()
    • setRole

      public void setRole(String role)
    • setQueryableCollection

      public void setQueryableCollection(QueryableCollection queryableCollection)
    • getQueryableCollection

      public QueryableCollection getQueryableCollection()
    • setColumns

      public void setColumns(String[] columns)
    • setOrigin

      public void setOrigin(FromElement origin, boolean manyToMany)
    • isManyToMany

      public boolean isManyToMany()
    • getDestinations

      public List getDestinations()
    • getOrigin

      public FromElement getOrigin()
    • getRealOrigin

      public FromElement getRealOrigin()
    • getTypeDiscriminatorMetadata

      public TypeDiscriminatorMetadata getTypeDiscriminatorMetadata()
    • getPropertyType

      public Type getPropertyType(String propertyName, String propertyPath)
    • toColumns

      public String[] toColumns(String tableAlias, String path, boolean inSelect)
    • toColumns

      public String[] toColumns(String tableAlias, String path, boolean inSelect, boolean forceAlias)
    • getPropertyMapping

      public PropertyMapping getPropertyMapping(String propertyName)
    • setFetch

      public void setFetch(boolean fetch)
    • isFetch

      public boolean isFetch()
    • getSequence

      public int getSequence()
    • setFilter

      public void setFilter(boolean b)
    • isFilter

      public boolean isFilter()
    • useFromFragment

      public boolean useFromFragment()
    • setUseFromFragment

      public void setUseFromFragment(boolean useFromFragment)
    • useWhereFragment

      public boolean useWhereFragment()
    • setUseWhereFragment

      public void setUseWhereFragment(boolean b)
    • setCollectionTableAlias

      public void setCollectionTableAlias(String collectionTableAlias)
    • getCollectionTableAlias

      public String getCollectionTableAlias()
    • isCollectionOfValuesOrComponents

      public boolean isCollectionOfValuesOrComponents()
    • isEntity

      public boolean isEntity()
    • setImpliedInFromClause

      public void setImpliedInFromClause(boolean flag)
    • isImpliedInFromClause

      public boolean isImpliedInFromClause()
    • setInProjectionList

      public void setInProjectionList(boolean inProjectionList)
    • inProjectionList

      public boolean inProjectionList()
    • isFromOrJoinFragment

      public boolean isFromOrJoinFragment()
    • isAllPropertyFetch

      public boolean isAllPropertyFetch()
    • setAllPropertyFetch

      public void setAllPropertyFetch(boolean fetch)
    • getWithClauseFragment

      public String getWithClauseFragment()
    • getWithClauseJoinAlias

      public String getWithClauseJoinAlias()
    • setWithClauseFragment

      public void setWithClauseFragment(String withClauseJoinAlias, String withClauseFragment)
    • hasCacheablePersister

      public boolean hasCacheablePersister()
    • handlePropertyBeingDereferenced

      public void handlePropertyBeingDereferenced(Type propertySource, String propertyName)
    • isDereferencedBySuperclassProperty

      public boolean isDereferencedBySuperclassProperty()
    • isDereferencedBySubclassProperty

      public boolean isDereferencedBySubclassProperty()
    • addEmbeddedParameter

      public void addEmbeddedParameter(ParameterSpecification specification)
      Description copied from interface: ParameterContainer
      Adds a parameter specification for a parameter encountered within this node. We use the term 'embedded' here because of the fact that the parameter was simply encountered as part of the node's text; it does not exist as part of a subtree as it might in a true AST.
      Specified by:
      addEmbeddedParameter in interface ParameterContainer
      Parameters:
      specification - The generated specification.
    • hasEmbeddedParameters

      public boolean hasEmbeddedParameters()
      Description copied from interface: ParameterContainer
      Determine whether this node contains embedded parameters. The implication is that ParameterContainer.getEmbeddedParameters() is allowed to return null if this method returns false.
      Specified by:
      hasEmbeddedParameters in interface ParameterContainer
      Returns:
      True if this node contains embedded parameters; false otherwise.
    • getEmbeddedParameters

      public ParameterSpecification[] getEmbeddedParameters()
      Description copied from interface: ParameterContainer
      Retrieve all embedded parameter specifications.
      Specified by:
      getEmbeddedParameters in interface ParameterContainer
      Returns:
      All embedded parameter specifications; may return null.
      See Also:
    • getIndexCollectionSelectorParamSpec

      public ParameterSpecification getIndexCollectionSelectorParamSpec()
    • setIndexCollectionSelectorParamSpec

      public void setIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec)