Top Description Inners Fields Constructors Methods
org.hibernate.hql.ast.tree

public Class FromElement

extends HqlSqlWalkerNode
implements DisplayableNode, ParameterContainer
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.ast.tree.ParameterContainer, org.hibernate.hql.ast.tree.DisplayableNode
Known Direct Subclasses
org.hibernate.hql.ast.tree.ImpliedFromElement, org.hibernate.hql.ast.tree.ComponentJoin
Imports
java.util.LinkedList, .List, .ArrayList, org.hibernate.QueryException, org.hibernate.hql.ast.TypeDiscriminatorMetadata, .HqlSqlWalker, org.hibernate.param.ParameterSpecification, org.hibernate.engine.JoinSequence, org.hibernate.hql.QueryTranslator, .CollectionProperties, org.hibernate.hql.antlr.SqlTokenTypes, org.hibernate.hql.ast.util.ASTUtil, org.hibernate.persister.collection.QueryableCollection, org.hibernate.persister.entity.DiscriminatorMetadata, .EntityPersister, .PropertyMapping, .Queryable, org.hibernate.type.EntityType, .Type, org.hibernate.util.StringHelper, org.slf4j.Logger, .LoggerFactory

Deprecated

as a consequence of ParameterContainer being deprecated. See corresponding docs for further information.

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private String
private String
private boolean
private String
private String[]
private boolean
private boolean
private List<E>
public static final String
private FromElementType
private List<E>
private boolean
private boolean
private FromClause
private boolean
private boolean
private boolean
private static final Logger
private boolean
private FromElement
origin

Deprecated as a consequence of FromElement being deprecated.
private String
private int
private String
private TypeDiscriminatorMetadata
private boolean
private boolean
private String
private String

Constructor Summary

AccessConstructor and Description
public
protected
FromElement(FromClause
The FROM clause to which this element belongs
fromClause
,
FromElement
The origin (LHS) of this element
origin
,
String
The alias applied to this element
alias
)

Deprecated as a consequence of FromElement being deprecated.
Constructor form used to initialize ComponentJoin

Method Summary

Modifier and TypeMethod and Description
private void
addDestination(FromElement fromElement)

Deprecated as a consequence of FromElement being deprecated.
public void
addEmbeddedParameter(ParameterSpecification
The generated specification.
specification
)

Implements org.hibernate.hql.ast.tree.ParameterContainer.addEmbeddedParameter.

Adds a parameter specification for a parameter encountered within this node.
protected void
private TypeDiscriminatorMetadata
pack-priv void
private void
doInitialize(FromClause fromClause, String tableAlias, String className, String classAlias, EntityPersister persister, EntityType type)

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public String
public String
public String
public String
public Type
public List<E>
public String

Returns:

String - The additional display text.
getDisplayText
()

Implements org.hibernate.hql.ast.tree.DisplayableNode.getDisplayText.

Returns additional display text for the AST node.
public ParameterSpecification[]
getEmbeddedParameters()

Implements org.hibernate.hql.ast.tree.ParameterContainer.getEmbeddedParameters.

Retrieve all embedded parameter specifications.
public EntityPersister
public FromClause
public String
public ParameterSpecification
public JoinSequence
public FromElement
getOrigin()

Deprecated as a consequence of FromElement being deprecated.
public PropertyMapping
getPropertyMapping(String propertyName)

public Type
getPropertyType(String propertyName, String propertyPath)

public Queryable
public QueryableCollection
public FromElement
getRealOrigin()

Deprecated as a consequence of FromElement being deprecated.
public Type
public int
public String
private String
public TypeDiscriminatorMetadata
public String
public String
public void
handlePropertyBeingDereferenced(Type propertySource, String propertyName)

public boolean
public boolean
hasEmbeddedParameters()

Implements org.hibernate.hql.ast.tree.ParameterContainer.hasEmbeddedParameters.

Determine whether this node contains embedded parameters.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public void
initializeCollection(FromClause fromClause, String classAlias, String tableAlias)

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

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean

Returns:

true if this FromElement was implied by a path, or false if this FROM element is explicitly declared
isImplied
()

Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in the FROM clause.

public boolean
public boolean
public boolean
pack-priv String
pack-priv String

Returns:

the identifier select SQL fragment.
renderIdentifierSelect
(int
The total number of returned types.
size
,
int
The sequence of the current returned type.
k
)

Returns the identifier select SQL fragment.

pack-priv String

Returns:

the property select SQL fragment.
renderPropertySelect
(int
The total number of returned types.
size
,
int
The sequence of the current returned type.
k
)

Returns the property select SQL fragment.

pack-priv String

Returns:

the identifier select with the column alias.
renderScalarIdentifierSelect
(int
the sequence of the returned type
i
)

Render the identifier select, but in a 'scalar' context (i.e. generate the column alias).

pack-priv String
public void
setAllPropertyFetch(boolean fetch)

public void
setCollectionJoin(boolean collectionJoin)

public void
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
setIncludeSubclasses(boolean includeSubclasses)

public void
public void
setInProjectionList(boolean inProjectionList)

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

Deprecated as a consequence of FromElement being deprecated.
public void
public void
public void
setUseFromFragment(boolean useFromFragment)

public void
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
public boolean
Inherited from org.hibernate.hql.ast.tree.HqlSqlWalkerNode:
getAliasGeneratorgetASTFactorygetSessionFactoryHelpergetWalkerinitialize

Field Detail

classAliasback to summary
private String classAlias
classNameback to summary
private String className
collectionJoinback to summary
private boolean collectionJoin
collectionTableAliasback to summary
private String collectionTableAlias
columnsback to summary
private String[] columns
dereferencedBySubclassPropertyback to summary
private boolean dereferencedBySubclassProperty
dereferencedBySuperclassPropertyback to summary
private boolean dereferencedBySuperclassProperty
destinationsback to summary
private List<E> destinations
DISCRIMINATOR_PROPERTY_NAMEback to summary
public static final String DISCRIMINATOR_PROPERTY_NAME
elementTypeback to summary
private FromElementType elementType
embeddedParametersback to summary
private List<E> embeddedParameters
fetchback to summary
private boolean fetch
filterback to summary
private boolean filter
fromClauseback to summary
private FromClause fromClause
includeSubclassesback to summary
private boolean includeSubclasses
initializedback to summary
private boolean initialized
isAllPropertyFetchback to summary
private boolean isAllPropertyFetch
logback to summary
private static final Logger log
manyToManyback to summary
private boolean manyToMany
originback to summary
private FromElement origin

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

roleback to summary
private String role
sequenceback to summary
private int sequence
tableAliasback to summary
private String tableAlias
typeDiscriminatorMetadataback to summary
private TypeDiscriminatorMetadata typeDiscriminatorMetadata
useFromFragmentback to summary
private boolean useFromFragment
useWhereFragmentback to summary
private boolean useWhereFragment
withClauseFragmentback to summary
private String withClauseFragment
withClauseJoinAliasback to summary
private String withClauseJoinAlias

Constructor Detail

FromElementback to summary
public FromElement()
FromElementback to summary
protected FromElement(FromClause fromClause, FromElement origin, String alias)

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

Constructor form used to initialize ComponentJoin

Parameters
fromClause:FromClause

The FROM clause to which this element belongs

origin:FromElement

The origin (LHS) of this element

alias:String

The alias applied to this element

Method Detail

addDestinationback to summary
private void addDestination(FromElement fromElement)

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

addEmbeddedParameterback to summary
public void addEmbeddedParameter(ParameterSpecification specification)

Implements org.hibernate.hql.ast.tree.ParameterContainer.addEmbeddedParameter.

Doc from org.hibernate.hql.ast.tree.ParameterContainer.addEmbeddedParameter.

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:ParameterSpecification

The generated specification.

appendDisplayTextback to summary
protected void appendDisplayText(StringBuffer buf)
buildTypeDiscriminatorMetadataback to summary
private TypeDiscriminatorMetadata buildTypeDiscriminatorMetadata()
checkInitializedback to summary
pack-priv void checkInitialized()
doInitializeback to summary
private void doInitialize(FromClause fromClause, String tableAlias, String className, String classAlias, EntityPersister persister, EntityType type)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

getClassAliasback to summary
public String getClassAlias()
getClassNameback to summary
public String getClassName()
getCollectionSuffixback to summary
public String getCollectionSuffix()
getCollectionTableAliasback to summary
public String getCollectionTableAlias()
getDataTypeback to summary
public Type getDataType()

Overrides org.hibernate.hql.ast.tree.SqlNode.getDataType.

getDestinationsback to summary
public List<E> getDestinations()
getDisplayTextback to summary
public String getDisplayText()

Implements org.hibernate.hql.ast.tree.DisplayableNode.getDisplayText.

Returns additional display text for the AST node.

Returns:String

String - The additional display text.

getEmbeddedParametersback to summary
public ParameterSpecification[] getEmbeddedParameters()

Implements org.hibernate.hql.ast.tree.ParameterContainer.getEmbeddedParameters.

Doc from org.hibernate.hql.ast.tree.ParameterContainer.getEmbeddedParameters.

Retrieve all embedded parameter specifications.

Returns:ParameterSpecification[]

All embedded parameter specifications; may return null.

getEntityPersisterback to summary
public EntityPersister getEntityPersister()
getFromClauseback to summary
public FromClause getFromClause()
getIdentityColumnback to summary
public String getIdentityColumn()
getIndexCollectionSelectorParamSpecback to summary
public ParameterSpecification getIndexCollectionSelectorParamSpec()
getJoinSequenceback to summary
public JoinSequence getJoinSequence()
getOriginback to summary
public FromElement getOrigin()

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

getPropertyMappingback to summary
public PropertyMapping getPropertyMapping(String propertyName)
getPropertyTypeback to summary
public Type getPropertyType(String propertyName, String propertyPath)
getQueryableback to summary
public Queryable getQueryable()
getQueryableCollectionback to summary
public QueryableCollection getQueryableCollection()
getRealOriginback to summary
public FromElement getRealOrigin()

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

getSelectTypeback to summary
public Type getSelectType()
getSequenceback to summary
public int getSequence()
getTableAliasback to summary
public String getTableAlias()
getTableNameback to summary
private String getTableName()
getTypeDiscriminatorMetadataback to summary
public TypeDiscriminatorMetadata getTypeDiscriminatorMetadata()
getWithClauseFragmentback to summary
public String getWithClauseFragment()
getWithClauseJoinAliasback to summary
public String getWithClauseJoinAlias()
handlePropertyBeingDereferencedback to summary
public void handlePropertyBeingDereferenced(Type propertySource, String propertyName)
hasCacheablePersisterback to summary
public boolean hasCacheablePersister()
hasEmbeddedParametersback to summary
public boolean hasEmbeddedParameters()

Implements org.hibernate.hql.ast.tree.ParameterContainer.hasEmbeddedParameters.

Doc from org.hibernate.hql.ast.tree.ParameterContainer.hasEmbeddedParameters.

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

Returns:boolean

True if this node contains embedded parameters; false otherwise.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

initializeCollectionback to summary
public void initializeCollection(FromClause fromClause, String classAlias, String tableAlias)
initializeComponentJoinback to summary
protected void initializeComponentJoin(FromElementType elementType)
initializeEntityback to summary
public void initializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias)
inProjectionListback to summary
public boolean inProjectionList()
isAllPropertyFetchback to summary
public boolean isAllPropertyFetch()
isCollectionJoinback to summary
public boolean isCollectionJoin()
isCollectionOfValuesOrComponentsback to summary
public boolean isCollectionOfValuesOrComponents()
isDereferencedBySubclassPropertyback to summary
public boolean isDereferencedBySubclassProperty()
isDereferencedBySuperclassOrSubclassPropertyback to summary
public boolean isDereferencedBySuperclassOrSubclassProperty()
isDereferencedBySuperclassPropertyback to summary
public boolean isDereferencedBySuperclassProperty()
isEntityback to summary
public boolean isEntity()
isFetchback to summary
public boolean isFetch()
isFilterback to summary
public boolean isFilter()
isFromOrJoinFragmentback to summary
public boolean isFromOrJoinFragment()
isImpliedback to summary
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:boolean

true if this FromElement was implied by a path, or false if this FROM element is explicitly declared

isImpliedInFromClauseback to summary
public boolean isImpliedInFromClause()
isIncludeSubclassesback to summary
public boolean isIncludeSubclasses()
isManyToManyback to summary
public boolean isManyToMany()
renderCollectionSelectFragmentback to summary
pack-priv String renderCollectionSelectFragment(int size, int k)
renderIdentifierSelectback to summary
pack-priv String renderIdentifierSelect(int size, int k)

Returns the identifier select SQL fragment.

Parameters
size:int

The total number of returned types.

k:int

The sequence of the current returned type.

Returns:String

the identifier select SQL fragment.

renderPropertySelectback to summary
pack-priv String renderPropertySelect(int size, int k)

Returns the property select SQL fragment.

Parameters
size:int

The total number of returned types.

k:int

The sequence of the current returned type.

Returns:String

the property select SQL fragment.

renderScalarIdentifierSelectback to summary
pack-priv String renderScalarIdentifierSelect(int i)

Render the identifier select, but in a 'scalar' context (i.e. generate the column alias).

Parameters
i:int

the sequence of the returned type

Returns:String

the identifier select with the column alias.

renderValueCollectionSelectFragmentback to summary
pack-priv String renderValueCollectionSelectFragment(int size, int k)
setAllPropertyFetchback to summary
public void setAllPropertyFetch(boolean fetch)
setCollectionJoinback to summary
public void setCollectionJoin(boolean collectionJoin)
setCollectionSuffixback to summary
public void setCollectionSuffix(String suffix)
setCollectionTableAliasback to summary
public void setCollectionTableAlias(String collectionTableAlias)
setColumnsback to summary
public void setColumns(String[] columns)
setFetchback to summary
public void setFetch(boolean fetch)
setFilterback to summary
public void setFilter(boolean b)
setImpliedInFromClauseback to summary
public void setImpliedInFromClause(boolean flag)
setIncludeSubclassesback to summary
public void setIncludeSubclasses(boolean includeSubclasses)
setIndexCollectionSelectorParamSpecback to summary
public void setIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec)
setInProjectionListback to summary
public void setInProjectionList(boolean inProjectionList)
setJoinSequenceback to summary
public void setJoinSequence(JoinSequence joinSequence)
setOriginback to summary
public void setOrigin(FromElement origin, boolean manyToMany)

Deprecated

as a consequence of FromElement being deprecated. See corresponding docs for further information.

setQueryableCollectionback to summary
public void setQueryableCollection(QueryableCollection queryableCollection)
setRoleback to summary
public void setRole(String role)
setUseFromFragmentback to summary
public void setUseFromFragment(boolean useFromFragment)
setUseWhereFragmentback to summary
public void setUseWhereFragment(boolean b)
setWithClauseFragmentback to summary
public void setWithClauseFragment(String withClauseJoinAlias, String withClauseFragment)
toColumnsback to summary
public String[] toColumns(String tableAlias, String path, boolean inSelect)
toColumnsback to summary
public String[] toColumns(String tableAlias, String path, boolean inSelect, boolean forceAlias)
useFromFragmentback to summary
public boolean useFromFragment()
useWhereFragmentback to summary
public boolean useWhereFragment()
org.hibernate.hql.ast.tree back to summary

private Class FromElement.TypeDiscriminatorMetadataImpl

extends Object
implements TypeDiscriminatorMetadata
Class Inheritance
  • java.lang.Object
  • org.hibernate.hql.ast.tree.FromElement.TypeDiscriminatorMetadataImpl
All Implemented Interfaces
org.hibernate.hql.ast.TypeDiscriminatorMetadata

Field Summary

Modifier and TypeField and Description
private final String
private final DiscriminatorMetadata

Constructor Summary

AccessConstructor and Description
private
TypeDiscriminatorMetadataImpl(DiscriminatorMetadata persisterDiscriminatorMetadata, String alias)

Method Summary

Modifier and TypeMethod and Description
public Type
getResolutionType()

Implements org.hibernate.hql.ast.TypeDiscriminatorMetadata.getResolutionType.

Get the type used to resolve the actual discriminator value resulting from getSqlFragment back into a Class reference.
public String
getSqlFragment()

Implements org.hibernate.hql.ast.TypeDiscriminatorMetadata.getSqlFragment.

Get the sql fragment that is used to determine the actual discriminator value for a row.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasback to summary
private final String alias
persisterDiscriminatorMetadataback to summary
private final DiscriminatorMetadata persisterDiscriminatorMetadata

Constructor Detail

TypeDiscriminatorMetadataImplback to summary
private TypeDiscriminatorMetadataImpl(DiscriminatorMetadata persisterDiscriminatorMetadata, String alias)

Method Detail

getResolutionTypeback to summary
public Type getResolutionType()

Implements org.hibernate.hql.ast.TypeDiscriminatorMetadata.getResolutionType.

Doc from org.hibernate.hql.ast.TypeDiscriminatorMetadata.getResolutionType.

Get the type used to resolve the actual discriminator value resulting from getSqlFragment back into a Class reference.

Returns:Type

The resolution type.

getSqlFragmentback to summary
public String getSqlFragment()

Implements org.hibernate.hql.ast.TypeDiscriminatorMetadata.getSqlFragment.

Doc from org.hibernate.hql.ast.TypeDiscriminatorMetadata.getSqlFragment.

Get the sql fragment that is used to determine the actual discriminator value for a row.

Returns:String

The fragment