public class

FromClause

extends HqlSqlWalkerNode
implements DisplayableNode
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.FromClause

Class Overview

Represents the 'FROM' part of a query or subquery, containing all mapped class references.

Summary

Constants
int ROOT_LEVEL
Public Constructors
FromClause()
Public Methods
FromElement addFromElement(String path, AST alias)
Adds a new from element to the from node.
void addImpliedFromElement(FromElement element)
boolean containsClassAlias(String alias)
Returns true if the from node contains the class alias name.
boolean containsTableAlias(String alias)
Returns true if the from node contains the table alias name.
FromElement findFromElementBySqlAlias(String sqlAlias)
FromElement findFromElementByUserOrSqlAlias(String userAlias, String sqlAlias)
List getCollectionFetches()
String getDisplayText()
Returns additional display text for the AST node.
List getExplicitFromElements()
FromElement getFromElement(String aliasOrClassName)
Retreives the from-element represented by the given alias.
FromElement getFromElement()
List getFromElements()
Returns the list of from elements in order.
int getLevel()
FromClause getParentFromClause()
List getProjectionList()
Returns the list of from elements that will be part of the result set.
boolean hasCollectionFecthes()
boolean isFromElementAlias(String possibleAlias)
Convenience method to check whether a given token represents a from-element alias.
boolean isSubQuery()
FromClause locateChildFromClauseWithJoinByPath(String path)
int nextFromElementCounter()
void promoteJoin(FromElement elem)
void resolve()
void setParentFromClause(FromClause parentFromClause)
String toString()
[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

Constants

public static final int ROOT_LEVEL

Constant Value: 1 (0x00000001)

Public Constructors

public FromClause ()

Public Methods

public FromElement addFromElement (String path, AST alias)

Adds a new from element to the from node.

Parameters
path The reference to the class.
alias The alias AST.
Returns
  • FromElement - The new FROM element.
Throws
SemanticException

public void addImpliedFromElement (FromElement element)

public boolean containsClassAlias (String alias)

Returns true if the from node contains the class alias name.

Parameters
alias The HQL class alias name.
Returns
  • true if the from node contains the class alias name.

public boolean containsTableAlias (String alias)

Returns true if the from node contains the table alias name.

Parameters
alias The SQL table alias name.
Returns
  • true if the from node contains the table alias name.

public FromElement findFromElementBySqlAlias (String sqlAlias)

public FromElement findFromElementByUserOrSqlAlias (String userAlias, String sqlAlias)

public List getCollectionFetches ()

public String getDisplayText ()

Returns additional display text for the AST node.

Returns
  • String - The additional display text.

public List getExplicitFromElements ()

public FromElement getFromElement (String aliasOrClassName)

Retreives the from-element represented by the given alias.

Parameters
aliasOrClassName The alias by which to locate the from-element.
Returns
  • The from-element assigned the given alias, or null if none.

public FromElement getFromElement ()

public List getFromElements ()

Returns the list of from elements in order.

Returns
  • the list of from elements (instances of FromElement).

public int getLevel ()

public FromClause getParentFromClause ()

public List getProjectionList ()

Returns the list of from elements that will be part of the result set.

Returns
  • the list of from elements that will be part of the result set.

public boolean hasCollectionFecthes ()

public boolean isFromElementAlias (String possibleAlias)

Convenience method to check whether a given token represents a from-element alias.

Parameters
possibleAlias The potential from-element alias to check.
Returns
  • True if the possibleAlias is an alias to a from-element visible from this point in the query graph.

public boolean isSubQuery ()

public FromClause locateChildFromClauseWithJoinByPath (String path)

public int nextFromElementCounter ()

public void promoteJoin (FromElement elem)

public void resolve ()

public void setParentFromClause (FromClause parentFromClause)

public String toString ()