public class

FromElement

extends HqlSqlWalkerNode
implements DisplayableNode ParameterContainer
java.lang.Object
   ↳ antlr.CommonAST
     ↳ org.hibernate.hql.ast.tree.Node
       ↳ org.hibernate.hql.ast.tree.SqlNode
         ↳ org.hibernate.hql.ast.tree.HqlSqlWalkerNode
           ↳ org.hibernate.hql.ast.tree.FromElement
Known Direct Subclasses

Class Overview

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.

Summary

Constants
String DISCRIMINATOR_PROPERTY_NAME
Public Constructors
FromElement()
Protected Constructors
FromElement(FromClause fromClause, FromElement origin, String alias)
Constructor form used to initialize ComponentJoin
Public Methods
void addEmbeddedParameter(ParameterSpecification specification)
Adds a parameter specification for a parameter encountered within this node.
boolean equals(Object obj)
String getClassAlias()
String getClassName()
String getCollectionSuffix()
String getCollectionTableAlias()
Type getDataType()
List getDestinations()
String getDisplayText()
Returns additional display text for the AST node.
ParameterSpecification[] getEmbeddedParameters()
Retrieve all embedded parameter specifications.
EntityPersister getEntityPersister()
FromClause getFromClause()
String getIdentityColumn()
ParameterSpecification getIndexCollectionSelectorParamSpec()
JoinSequence getJoinSequence()
FromElement getOrigin()
PropertyMapping getPropertyMapping(String propertyName)
Type getPropertyType(String propertyName, String propertyPath)
Queryable getQueryable()
QueryableCollection getQueryableCollection()
FromElement getRealOrigin()
Type getSelectType()
int getSequence()
String getTableAlias()
TypeDiscriminatorMetadata getTypeDiscriminatorMetadata()
String getWithClauseFragment()
String getWithClauseJoinAlias()
void handlePropertyBeingDereferenced(Type propertySource, String propertyName)
boolean hasCacheablePersister()
boolean hasEmbeddedParameters()
Determine whether this node contains embedded parameters.
int hashCode()
boolean inProjectionList()
void initializeCollection(FromClause fromClause, String classAlias, String tableAlias)
void initializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias)
boolean isAllPropertyFetch()
boolean isCollectionJoin()
boolean isCollectionOfValuesOrComponents()
boolean isDereferencedBySubclassProperty()
boolean isDereferencedBySuperclassOrSubclassProperty()
boolean isDereferencedBySuperclassProperty()
boolean isEntity()
boolean isFetch()
boolean isFilter()
boolean isFromOrJoinFragment()
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.
boolean isImpliedInFromClause()
boolean isIncludeSubclasses()
boolean isManyToMany()
void setAllPropertyFetch(boolean fetch)
void setCollectionJoin(boolean collectionJoin)
void setCollectionSuffix(String suffix)
void setCollectionTableAlias(String collectionTableAlias)
void setColumns(String[] columns)
void setFetch(boolean fetch)
void setFilter(boolean b)
void setImpliedInFromClause(boolean flag)
void setInProjectionList(boolean inProjectionList)
void setIncludeSubclasses(boolean includeSubclasses)
void setIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec)
void setJoinSequence(JoinSequence joinSequence)
void setOrigin(FromElement origin, boolean manyToMany)
void setQueryableCollection(QueryableCollection queryableCollection)
void setRole(String role)
void setUseFromFragment(boolean useFromFragment)
void setUseWhereFragment(boolean b)
void setWithClauseFragment(String withClauseJoinAlias, String withClauseFragment)
String[] toColumns(String tableAlias, String path, boolean inSelect)
String[] toColumns(String tableAlias, String path, boolean inSelect, boolean forceAlias)
boolean useFromFragment()
boolean useWhereFragment()
Protected Methods
void appendDisplayText(StringBuffer buf)
void initializeComponentJoin(FromElementType elementType)
[Expand]
Inherited Methods
From class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
From class org.hibernate.hql.ast.tree.SqlNode
From class org.hibernate.hql.ast.tree.Node
From class java.lang.Object
From interface org.hibernate.hql.ast.tree.DisplayableNode
From interface org.hibernate.hql.ast.tree.InitializeableNode
From interface org.hibernate.hql.ast.tree.ParameterContainer

Constants

public static final String DISCRIMINATOR_PROPERTY_NAME

Constant Value: "class"

Public Constructors

public FromElement ()

Protected Constructors

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

Public Methods

public void addEmbeddedParameter (ParameterSpecification specification)

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.

Parameters
specification The generated specification.

public boolean equals (Object obj)

public String getClassAlias ()

public String getClassName ()

public String getCollectionSuffix ()

public String getCollectionTableAlias ()

public Type getDataType ()

public List getDestinations ()

public String getDisplayText ()

Returns additional display text for the AST node.

Returns
  • String - The additional display text.

public ParameterSpecification[] getEmbeddedParameters ()

Retrieve all embedded parameter specifications.

Returns
  • All embedded parameter specifications; may return null.

public EntityPersister getEntityPersister ()

public FromClause getFromClause ()

public String getIdentityColumn ()

public ParameterSpecification getIndexCollectionSelectorParamSpec ()

public JoinSequence getJoinSequence ()

public FromElement getOrigin ()

public PropertyMapping getPropertyMapping (String propertyName)

public Type getPropertyType (String propertyName, String propertyPath)

public Queryable getQueryable ()

public QueryableCollection getQueryableCollection ()

public FromElement getRealOrigin ()

public Type getSelectType ()

public int getSequence ()

public String getTableAlias ()

public TypeDiscriminatorMetadata getTypeDiscriminatorMetadata ()

public String getWithClauseFragment ()

public String getWithClauseJoinAlias ()

public void handlePropertyBeingDereferenced (Type propertySource, String propertyName)

public boolean hasCacheablePersister ()

public boolean hasEmbeddedParameters ()

Determine whether this node contains embedded parameters. The implication is that getEmbeddedParameters() is allowed to return null if this method returns false.

Returns
  • True if this node contains embedded parameters; false otherwise.

public int hashCode ()

public boolean inProjectionList ()

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

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

public boolean isAllPropertyFetch ()

public boolean isCollectionJoin ()

public boolean isCollectionOfValuesOrComponents ()

public boolean isDereferencedBySubclassProperty ()

public boolean isDereferencedBySuperclassOrSubclassProperty ()

public boolean isDereferencedBySuperclassProperty ()

public boolean isEntity ()

public boolean isFetch ()

public boolean isFilter ()

public boolean isFromOrJoinFragment ()

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

public boolean isImpliedInFromClause ()

public boolean isIncludeSubclasses ()

public boolean isManyToMany ()

public void setAllPropertyFetch (boolean fetch)

public void setCollectionJoin (boolean collectionJoin)

public void setCollectionSuffix (String suffix)

public void setCollectionTableAlias (String collectionTableAlias)

public void setColumns (String[] columns)

public void setFetch (boolean fetch)

public void setFilter (boolean b)

public void setImpliedInFromClause (boolean flag)

public void setInProjectionList (boolean inProjectionList)

public void setIncludeSubclasses (boolean includeSubclasses)

public void setIndexCollectionSelectorParamSpec (ParameterSpecification indexCollectionSelectorParamSpec)

public void setJoinSequence (JoinSequence joinSequence)

public void setOrigin (FromElement origin, boolean manyToMany)

public void setQueryableCollection (QueryableCollection queryableCollection)

public void setRole (String role)

public void setUseFromFragment (boolean useFromFragment)

public void setUseWhereFragment (boolean b)

public void setWithClauseFragment (String withClauseJoinAlias, String withClauseFragment)

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

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

public boolean useFromFragment ()

public boolean useWhereFragment ()

Protected Methods

protected void appendDisplayText (StringBuffer buf)

protected void initializeComponentJoin (FromElementType elementType)