Package org.hibernate.hql.ast.tree
Class FromElement
java.lang.Object
antlr.BaseAST
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
- All Implemented Interfaces:
antlr.collections.AST,Serializable,DisplayableNode,InitializeableNode,ParameterContainer
- Direct Known Subclasses:
ComponentJoin,ImpliedFromElement
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 Summary
FieldsFields inherited from class antlr.BaseAST
down, right -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFromElement(FromClause fromClause, FromElement origin, String alias) Constructor form used to initializeComponentJoin -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEmbeddedParameter(ParameterSpecification specification) Adds a parameter specification for a parameter encountered within this node.protected voidbooleanReturns additional display text for the AST node.Retrieve all embedded parameter specifications.getPropertyMapping(String propertyName) getPropertyType(String propertyName, String propertyPath) intvoidhandlePropertyBeingDereferenced(Type propertySource, String propertyName) booleanbooleanDetermine whether this node contains embedded parameters.inthashCode()voidinitializeCollection(FromClause fromClause, String classAlias, String tableAlias) protected voidinitializeComponentJoin(org.hibernate.hql.ast.tree.FromElementType elementType) voidinitializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisEntity()booleanisFetch()booleanisFilter()booleanbooleanReturns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in the FROM clause.booleanbooleanbooleanvoidsetAllPropertyFetch(boolean fetch) voidsetCollectionJoin(boolean collectionJoin) voidsetCollectionSuffix(String suffix) voidsetCollectionTableAlias(String collectionTableAlias) voidsetColumns(String[] columns) voidsetFetch(boolean fetch) voidsetFilter(boolean b) voidsetImpliedInFromClause(boolean flag) voidsetIncludeSubclasses(boolean includeSubclasses) voidsetIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec) voidsetInProjectionList(boolean inProjectionList) voidsetJoinSequence(JoinSequence joinSequence) voidsetOrigin(FromElement origin, boolean manyToMany) voidsetQueryableCollection(QueryableCollection queryableCollection) voidvoidsetUseFromFragment(boolean useFromFragment) voidsetUseWhereFragment(boolean b) voidsetWithClauseFragment(String withClauseJoinAlias, String withClauseFragment) String[]String[]booleanbooleanMethods inherited from class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
getAliasGenerator, getASTFactory, getSessionFactoryHelper, getWalker, initializeMethods inherited from class org.hibernate.hql.ast.tree.SqlNode
getOriginalText, setDataType, setTextMethods inherited from class org.hibernate.hql.ast.tree.Node
getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initializeMethods inherited from class antlr.CommonAST
getText, getType, initialize, setTypeMethods 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, xmlSerializeRootOpenMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.hql.ast.tree.ParameterContainer
setText
-
Field Details
-
DISCRIMINATOR_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
FromElement
public FromElement() -
FromElement
Constructor form used to initializeComponentJoin- Parameters:
fromClause- The FROM clause to which this element belongsorigin- The origin (LHS) of this elementalias- The alias applied to this element
-
-
Method Details
-
initializeComponentJoin
protected void initializeComponentJoin(org.hibernate.hql.ast.tree.FromElementType elementType) -
getCollectionSuffix
-
setCollectionSuffix
-
initializeCollection
-
initializeEntity
public void initializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias) -
getEntityPersister
-
getDataType
- Overrides:
getDataTypein classSqlNode
-
getSelectType
-
getQueryable
-
getClassName
-
getClassAlias
-
getTableAlias
-
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
Returns additional display text for the AST node.- Specified by:
getDisplayTextin interfaceDisplayableNode- Returns:
- String - The additional display text.
-
appendDisplayText
-
hashCode
public int hashCode() -
equals
-
setJoinSequence
-
getJoinSequence
-
setIncludeSubclasses
public void setIncludeSubclasses(boolean includeSubclasses) -
isIncludeSubclasses
public boolean isIncludeSubclasses() -
isDereferencedBySuperclassOrSubclassProperty
public boolean isDereferencedBySuperclassOrSubclassProperty() -
getIdentityColumn
-
setCollectionJoin
public void setCollectionJoin(boolean collectionJoin) -
isCollectionJoin
public boolean isCollectionJoin() -
setRole
-
setQueryableCollection
-
getQueryableCollection
-
setColumns
-
setOrigin
-
isManyToMany
public boolean isManyToMany() -
getDestinations
-
getOrigin
-
getRealOrigin
-
getTypeDiscriminatorMetadata
-
getPropertyType
-
toColumns
-
toColumns
-
getPropertyMapping
-
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
-
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
-
getWithClauseJoinAlias
-
setWithClauseFragment
-
hasCacheablePersister
public boolean hasCacheablePersister() -
handlePropertyBeingDereferenced
-
isDereferencedBySuperclassProperty
public boolean isDereferencedBySuperclassProperty() -
isDereferencedBySubclassProperty
public boolean isDereferencedBySubclassProperty() -
addEmbeddedParameter
Description copied from interface:ParameterContainerAdds 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:
addEmbeddedParameterin interfaceParameterContainer- Parameters:
specification- The generated specification.
-
hasEmbeddedParameters
public boolean hasEmbeddedParameters()Description copied from interface:ParameterContainerDetermine whether this node contains embedded parameters. The implication is thatParameterContainer.getEmbeddedParameters()is allowed to return null if this method returns false.- Specified by:
hasEmbeddedParametersin interfaceParameterContainer- Returns:
- True if this node contains embedded parameters; false otherwise.
-
getEmbeddedParameters
Description copied from interface:ParameterContainerRetrieve all embedded parameter specifications.- Specified by:
getEmbeddedParametersin interfaceParameterContainer- Returns:
- All embedded parameter specifications; may return null.
- See Also:
-
getIndexCollectionSelectorParamSpec
-
setIndexCollectionSelectorParamSpec
public void setIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec)
-