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

public Class EntityJoinFromElement

extends FromElement
Class Inheritance
Imports
java.util.Collections, .Map, .Set, org.hibernate.AssertionFailure, .MappingException, org.hibernate.engine.internal.JoinSequence, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.hql.internal.antlr.HqlSqlTokenTypes, org.hibernate.hql.internal.ast.HqlSqlWalker, org.hibernate.internal.util.StringHelper, org.hibernate.persister.entity.AbstractEntityPersister, .EntityPersister, .Joinable, .Queryable, org.hibernate.sql.JoinFragment, .JoinType, org.hibernate.type.EntityType

Deprecated

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

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Inherited from org.hibernate.hql.internal.ast.tree.FromElement:
DISCRIMINATOR_PROPERTY_NAME

Constructor Summary

AccessConstructor and Description
public
EntityJoinFromElement(HqlSqlWalker walker, FromClause fromClause, EntityPersister entityPersister, JoinType joinType, boolean fetchProperties, String alias)

Method Summary

Modifier and TypeMethod and Description
public String
public void
protected void
public void
public void
Inherited from org.hibernate.hql.internal.ast.tree.FromElement:
addEmbeddedParameterappendDisplayTextapplyTreatAsDeclarationscheckInitializeddoInitializeequalsgetClassAliasgetClassNamegetCollectionPropertyReferencegetCollectionTableAliasgetDataTypegetDestinationsgetDisplayTextgetElementTypegetEmbeddedParametersgetEntityPersistergetFetchOrigingetFromClausegetIdentifierPropertyNamesgetIdentityColumngetIdentityColumnsgetIndexCollectionSelectorParamSpecgetJoinSequencegetOrigingetPropertyMappinggetPropertyTableNamegetPropertyTypegetQueryablegetQueryableCollectiongetRealOrigingetRolegetSelectTypegetSequencegetTableAliasgetTableNamegetTypeDiscriminatorMetadatagetWithClauseAstgetWithClauseFragmenthandlePropertyBeingDereferencedhasEmbeddedParametershashCodeinitializeEntityinProjectionListisAllPropertyFetchisCollectionJoinisCollectionOfValuesOrComponentsisDereferencedBySubclassPropertyisDereferencedBySuperclassOrSubclassPropertyisDereferencedBySuperclassPropertyisEntityisFetchisFilterisFromOrJoinFragmentisImpliedisImpliedInFromClauseisIncludeSubclassesisManyToManyisNonQualifiedPropertyRefrenderCollectionSelectFragmentrenderIdentifierSelectrenderMapEntryPropertySelectFragmentrenderMapKeyPropertySelectFragmentrenderPropertySelectrenderScalarIdentifierSelectrenderValueCollectionSelectFragmentsetAllPropertyFetchsetCollectionJoinsetCollectionTableAliassetColumnssetFetchsetFiltersetImpliedInFromClausesetIncludeSubclassessetIndexCollectionSelectorParamSpecsetInProjectionListsetJoinSequencesetOriginsetQueryableCollectionsetRolesetUseFromFragmentsetUseWhereFragmentsetWithClauseFragmenttoColumnstoColumnsuseFromFragmentuseWhereFragment

Constructor Detail

EntityJoinFromElementback to summary
public EntityJoinFromElement(HqlSqlWalker walker, FromClause fromClause, EntityPersister entityPersister, JoinType joinType, boolean fetchProperties, String alias)

Method Detail

getCollectionSuffixback to summary
public String getCollectionSuffix()

Overrides org.hibernate.hql.internal.ast.tree.FromElement.getCollectionSuffix.

Annotations
@Override
initializeCollectionback to summary
public void initializeCollection(FromClause fromClause, String classAlias, String tableAlias)

Overrides org.hibernate.hql.internal.ast.tree.FromElement.initializeCollection.

Annotations
@Override
initializeComponentJoinback to summary
protected void initializeComponentJoin(FromElementType elementType)

Overrides org.hibernate.hql.internal.ast.tree.FromElement.initializeComponentJoin.

Annotations
@Override
setCollectionSuffixback to summary
public void setCollectionSuffix(String suffix)

Overrides org.hibernate.hql.internal.ast.tree.FromElement.setCollectionSuffix.

Annotations
@Override
setTextback to summary
public void setText(String s)

Overrides org.hibernate.hql.internal.ast.tree.SqlNode.setText.

Implements org.hibernate.hql.internal.ast.tree.ParameterContainer.setText, antlr.collections.AST.setText.

Doc from org.hibernate.hql.internal.ast.tree.ParameterContainer.setText.

Set the renderable text of this node.

Parameters
s:String

The renderable text

Annotations
@Override
org.hibernate.hql.internal.ast.tree back to summary

private Class EntityJoinFromElement.EntityJoinJoinFragment

extends JoinFragment
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final String
Inherited from org.hibernate.sql.JoinFragment:
FULL_JOININNER_JOINLEFT_OUTER_JOINRIGHT_OUTER_JOIN

Constructor Summary

AccessConstructor and Description
public
EntityJoinJoinFragment(String fragmentString, String whereFragment)

Method Summary

Modifier and TypeMethod and Description
public void
addCondition(String
The alias of the joined table
alias
,
String[]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Adds a condition to the join fragment.
public boolean
addCondition(String
The fragment
condition
)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Adds a free-form condition fragment
public void
addCrossJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
)

Implements abstract org.hibernate.sql.JoinFragment.addCrossJoin.

Adds a cross join to the specified table.
public void
addJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
,
String[]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
,
JoinType
The type of join
joinType
)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Adds a join.
public void
addJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
,
String[]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
,
JoinType
The type of join
joinType
,
String
The additional ON fragment
on
)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Adds a join, with an additional ON clause fragment
public void
addJoins(String
The FROM clause fragment
fromFragment
,
String
The WHERE clause fragment
whereFragment
)

Implements abstract org.hibernate.sql.JoinFragment.addJoins.

Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments
public JoinFragment
copy()

Implements abstract org.hibernate.sql.JoinFragment.copy.

Make a copy.
public String
toFromFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toFromFragmentString.

Render this fragment to its FROM clause portion
public String
toWhereFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toWhereFragmentString.

Render this fragment to its WHERE clause portion
Inherited from org.hibernate.sql.JoinFragment:
addConditionaddFragmentaddJoinhasFilterConditionhasThetaJoinssetHasFilterConditionsetHasThetaJoins

Field Detail

fragmentStringback to summary
private final String fragmentString
whereFragmentback to summary
private final String whereFragment

Constructor Detail

EntityJoinJoinFragmentback to summary
public EntityJoinJoinFragment(String fragmentString, String whereFragment)

Method Detail

addConditionback to summary
public void addCondition(String alias, String[] fkColumns, String[] pkColumns)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Doc from org.hibernate.sql.JoinFragment.addCondition.

Adds a condition to the join fragment.

Parameters
alias:String

The alias of the joined table

fkColumns:String[]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

Annotations
@Override
addConditionback to summary
public boolean addCondition(String condition)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Doc from org.hibernate.sql.JoinFragment.addCondition.

Adds a free-form condition fragment

Parameters
condition:String

The fragment

Returns:boolean

true if the condition was added

Annotations
@Override
addCrossJoinback to summary
public void addCrossJoin(String tableName, String alias)

Implements abstract org.hibernate.sql.JoinFragment.addCrossJoin.

Doc from org.hibernate.sql.JoinFragment.addCrossJoin.

Adds a cross join to the specified table.

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

Annotations
@Override
addJoinback to summary
public void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Doc from org.hibernate.sql.JoinFragment.addJoin.

Adds a join.

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

fkColumns:String[]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

joinType:JoinType

The type of join

Annotations
@Override
addJoinback to summary
public void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType, String on)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Doc from org.hibernate.sql.JoinFragment.addJoin.

Adds a join, with an additional ON clause fragment

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

fkColumns:String[]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

joinType:JoinType

The type of join

on:String

The additional ON fragment

Annotations
@Override
addJoinsback to summary
public void addJoins(String fromFragment, String whereFragment)

Implements abstract org.hibernate.sql.JoinFragment.addJoins.

Doc from org.hibernate.sql.JoinFragment.addJoins.

Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments

Parameters
fromFragment:String

The FROM clause fragment

whereFragment:String

The WHERE clause fragment

Annotations
@Override
copyback to summary
public JoinFragment copy()

Implements abstract org.hibernate.sql.JoinFragment.copy.

Doc from org.hibernate.sql.JoinFragment.copy.

Make a copy.

Returns:JoinFragment

The copy.

Annotations
@Override
toFromFragmentStringback to summary
public String toFromFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toFromFragmentString.

Doc from org.hibernate.sql.JoinFragment.toFromFragmentString.

Render this fragment to its FROM clause portion

Returns:String

The FROM clause portion of this fragment

Annotations
@Override
toWhereFragmentStringback to summary
public String toWhereFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toWhereFragmentString.

Doc from org.hibernate.sql.JoinFragment.toWhereFragmentString.

Render this fragment to its WHERE clause portion

Returns:String

The WHERE clause portion of this fragment

Annotations
@Override
org.hibernate.hql.internal.ast.tree back to summary

private Class EntityJoinFromElement.EntityJoinJoinSequenceImpl

extends JoinSequence
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final EntityType
private final SessionFactoryImplementor
factory

Hides org.hibernate.engine.internal.JoinSequence.factory.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private final JoinType

Constructor Summary

AccessConstructor and Description
public
EntityJoinJoinSequenceImpl(SessionFactoryImplementor factory, EntityType entityType, String entityTableText, String entityTableAlias, JoinType joinType)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public JoinFragment
toJoinFragment(Map<K, V>
The filters associated with the originating session to properly define join conditions
enabledFilters
,
boolean
Should all subclass joins be added to the rendered JoinFragment?
includeAllSubclassJoins
,
String
The with clause (which represents additional join restrictions) fragment
withClauseFragment
)

Overrides org.hibernate.engine.internal.JoinSequence.toJoinFragment.

Ugh!
Inherited from org.hibernate.engine.internal.JoinSequence:
addConditionaddConditionaddJoinaddJoinaddJoinapplyTreatAsDeclarationscopycopyForCollectionPropertygetFirstJoingetFromPartgetTreatAsDeclarationsisIncludedisThetaStylesetNextsetQueryReferencedTablessetRootsetSelectorsetUseThetaStyletoJoinFragmenttoJoinFragmenttoJoinFragmenttoString

Field Detail

entityTableAliasback to summary
private final String entityTableAlias
entityTableTextback to summary
private final String entityTableText
entityTypeback to summary
private final EntityType entityType
factoryback to summary
private final SessionFactoryImplementor factory

Hides org.hibernate.engine.internal.JoinSequence.factory.

Deprecated

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

joinTypeback to summary
private final JoinType joinType

Constructor Detail

EntityJoinJoinSequenceImplback to summary
public EntityJoinJoinSequenceImpl(SessionFactoryImplementor factory, EntityType entityType, String entityTableText, String entityTableAlias, JoinType joinType)

Deprecated

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

Method Detail

toJoinFragmentback to summary
public JoinFragment toJoinFragment(Map<K, V> enabledFilters, boolean includeAllSubclassJoins, String withClauseFragment) throws MappingException

Overrides org.hibernate.engine.internal.JoinSequence.toJoinFragment.

Ugh!

Parameters
enabledFilters:Map<K, V>

Doc from org.hibernate.engine.internal.JoinSequence.toJoinFragment.

The filters associated with the originating session to properly define join conditions

includeAllSubclassJoins:boolean

Doc from org.hibernate.engine.internal.JoinSequence.toJoinFragment.

Should all subclass joins be added to the rendered JoinFragment?

withClauseFragment:String

Doc from org.hibernate.engine.internal.JoinSequence.toJoinFragment.

The with clause (which represents additional join restrictions) fragment

Returns:JoinFragment

Doc from org.hibernate.engine.internal.JoinSequence.toJoinFragment.

The JoinFragment

Annotations
@Override
Exceptions
MappingException:

Doc from org.hibernate.engine.internal.JoinSequence.toJoinFragment.

Indicates a problem access the provided metadata, or incorrect metadata