org.hibernate.hql.ast.tree
Class FromElement

java.lang.Object
  extended byantlr.BaseAST
      extended byantlr.CommonAST
          extended byorg.hibernate.hql.ast.tree.Node
              extended byorg.hibernate.hql.ast.tree.SqlNode
                  extended byorg.hibernate.hql.ast.tree.HqlSqlWalkerNode
                      extended byorg.hibernate.hql.ast.tree.FromElement
All Implemented Interfaces:
antlr.collections.AST, DisplayableNode, InitializeableNode, Serializable
Direct Known Subclasses:
ImpliedFromElement

public class FromElement
extends HqlSqlWalkerNode
implements DisplayableNode

Represents a single mapped class mentioned in an HQL FROM clause. Each class reference will have the following symbols:


User: josh
Date: Dec 6, 2003
Time: 10:28:17 AM

See Also:
Serialized Form

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
FromElement()
           
 
Method Summary
protected  void appendDisplayText(StringBuffer buf)
           
 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.
 EntityPersister getEntityPersister()
           
 FromClause getFromClause()
           
 String getIdentityColumn()
           
 JoinSequence getJoinSequence()
           
 FromElement getOrigin()
           
 PropertyMapping getPropertyMapping(String propertyName)
           
 Type getPropertyType(String propertyName, String propertyPath)
          Returns the type of a property, given it's name (the last part) and the full path.
 Queryable getQueryable()
           
 QueryableCollection getQueryableCollection()
           
 FromElement getRealOrigin()
           
 Type getSelectType()
           
 int getSequence()
           
 String getTableAlias()
           
 String getWithClauseFragment()
           
 boolean hasCacheablePersister()
           
 int hashCode()
           
 void initializeCollection(FromClause fromClause, String classAlias, String tableAlias)
           
 void initializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias)
           
 boolean inProjectionList()
          Returns true if this element should be in the projection list.
 boolean isAllPropertyFetch()
           
 boolean isCollectionJoin()
           
 boolean isCollectionOfValuesOrComponents()
           
 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 setIncludeSubclasses(boolean includeSubclasses)
           
 void setInProjectionList(boolean inProjectionList)
           
 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 withClauseFragment)
           
 String[] toColumns(String tableAlias, String path, boolean inSelect)
           
 String[] toColumns(String tableAlias, String path, boolean inSelect, boolean forceAlias)
           
 boolean useFromFragment()
          Returns true if the from fragment should be included in the from clause.
 boolean useWhereFragment()
           
 
Methods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
getAliasGenerator, getASTFactory, getSessionFactoryHelper, getWalker, initialize
 
Methods inherited from class org.hibernate.hql.ast.tree.SqlNode
getOriginalText, setDataType, setText
 
Methods inherited from class org.hibernate.hql.ast.tree.Node
getColumn, getFilename, getLine, getTextLength, initialize, initialize
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromElement

public FromElement()
Method Detail

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

equals

public boolean equals(Object obj)

setJoinSequence

public void setJoinSequence(JoinSequence joinSequence)

getJoinSequence

public JoinSequence getJoinSequence()

setIncludeSubclasses

public void setIncludeSubclasses(boolean includeSubclasses)

isIncludeSubclasses

public boolean isIncludeSubclasses()

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

getPropertyType

public Type getPropertyType(String propertyName,
                            String propertyPath)
Returns the type of a property, given it's name (the last part) and the full path.

Parameters:
propertyName - The last part of the full path to the property.
Returns:
The type.

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()
Returns true if the from fragment should be included in the from clause.


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()
Returns true if this element should be in the projection list.


isFromOrJoinFragment

public boolean isFromOrJoinFragment()

isAllPropertyFetch

public boolean isAllPropertyFetch()

setAllPropertyFetch

public void setAllPropertyFetch(boolean fetch)

getWithClauseFragment

public String getWithClauseFragment()

setWithClauseFragment

public void setWithClauseFragment(String withClauseFragment)

hasCacheablePersister

public boolean hasCacheablePersister()