Top Description Fields Constructors Methods
org.hibernate.loader.criteria

public Class CriteriaJoinWalker

extends AbstractEntityJoinWalker
Class Inheritance
Imports
java.util.ArrayList, .List, .Set, org.hibernate.Criteria, .FetchMode, .MappingException, .LockOptions, org.hibernate.engine.CascadeStyle, .SessionFactoryImplementor, .LoadQueryInfluencers, org.hibernate.impl.CriteriaImpl, org.hibernate.loader.AbstractEntityJoinWalker, .PropertyPath, org.hibernate.persister.entity.Joinable, .OuterJoinLoadable, .Queryable, org.hibernate.type.AssociationType, .Type, org.hibernate.util.ArrayHelper

A JoinWalker for Criteria queries.
Author
Gavin King
See Also
CriteriaLoader

Field Summary

Modifier and TypeField and Description
private final Set<E>
private final Type[]
private final CriteriaQueryTranslator
private final String[]
private final List<E>

Constructor Summary

AccessConstructor and Description
public
CriteriaJoinWalker(final OuterJoinLoadable persister, final CriteriaQueryTranslator translator, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers)

public
CriteriaJoinWalker(final OuterJoinLoadable persister, final CriteriaQueryTranslator translator, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers, final String alias)

Method Summary

Modifier and TypeMethod and Description
protected String
protected String
public String
protected int
getJoinType(OuterJoinLoadable
The owner of the association.
persister
,
final PropertyPath
The path to the association
path
,
int
The property number representing the association.
propertyNumber
,
AssociationType
The association type.
associationType
,
FetchMode
The metadata-defined fetch mode.
metadataFetchMode
,
CascadeStyle
The metadata-defined cascade style.
metadataCascadeStyle
,
String
The owner table
lhsTable
,
String[]
The owner join columns
lhsColumns
,
final boolean
Is the association nullable.
nullable
,
final int
Current join depth
currentDepth
)

Overrides org.hibernate.loader.JoinWalker.getJoinType.

Determine the appropriate type of join (if any) to use to fetch the given association.
protected int
getJoinType(AssociationType
The association associationType.
associationType
,
FetchMode
The metadata-defined fetch mode.
config
,
PropertyPath
The path to the association
path
,
String
The owner table
lhsTable
,
String[]
The owner join columns
lhsColumns
,
boolean
Is the association nullable.
nullable
,
int
Current join depth
currentDepth
,
CascadeStyle
The metadata-defined cascade style.
cascadeStyle
)

Overrides org.hibernate.loader.JoinWalker.getJoinType.

Determine the appropriate associationType of join (if any) to use to fetch the given association.
public Set<E>
public Type[]
public String[]
protected String
getWhereFragment()

Overrides org.hibernate.loader.AbstractEntityJoinWalker.getWhereFragment.

Use the discriminator, to narrow the select to instances of the queried subclass, also applying any filters.
protected String
protected boolean
private static boolean
Inherited from org.hibernate.loader.AbstractEntityJoinWalker:
getAliasgetPersisterinitAllinitAllinitProjectionisDuplicateAssociationisJoinedFetchEnabledisJoinFetchEnabledByProfiletoString

Field Detail

querySpacesback to summary
private final Set<E> querySpaces
resultTypesback to summary
private final Type[] resultTypes
translatorback to summary
private final CriteriaQueryTranslator translator
userAliasesback to summary
private final String[] userAliases
userAliasListback to summary
private final List<E> userAliasList

Constructor Detail

CriteriaJoinWalkerback to summary
public CriteriaJoinWalker(final OuterJoinLoadable persister, final CriteriaQueryTranslator translator, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers)
CriteriaJoinWalkerback to summary
public CriteriaJoinWalker(final OuterJoinLoadable persister, final CriteriaQueryTranslator translator, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers, final String alias)

Method Detail

generateRootAliasback to summary
protected String generateRootAlias(String tableName)

Overrides org.hibernate.loader.JoinWalker.generateRootAlias.

generateTableAliasback to summary
protected String generateTableAlias(int n, PropertyPath path, Joinable joinable)

Overrides org.hibernate.loader.JoinWalker.generateTableAlias.

getCommentback to summary
public String getComment()

Implements abstract org.hibernate.loader.AbstractEntityJoinWalker.getComment.

getJoinTypeback to summary
protected int getJoinType(OuterJoinLoadable persister, final PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, String lhsTable, String[] lhsColumns, final boolean nullable, final int currentDepth) throws MappingException

Overrides org.hibernate.loader.JoinWalker.getJoinType.

Doc from org.hibernate.loader.JoinWalker.getJoinType.

Determine the appropriate type of join (if any) to use to fetch the given association.

Parameters
persister:OuterJoinLoadable

The owner of the association.

path:PropertyPath

The path to the association

propertyNumber:int

The property number representing the association.

associationType:AssociationType

The association type.

metadataFetchMode:FetchMode

The metadata-defined fetch mode.

metadataCascadeStyle:CascadeStyle

The metadata-defined cascade style.

lhsTable:String

The owner table

lhsColumns:String[]

The owner join columns

nullable:boolean

Is the association nullable.

currentDepth:int

Current join depth

Returns:int

type of join to use (JoinFragment#INNER_JOIN, JoinFragment#LEFT_OUTER_JOIN, or -1 to indicate no joining.

Exceptions
MappingException:
??
getJoinTypeback to summary
protected int getJoinType(AssociationType associationType, FetchMode config, PropertyPath path, String lhsTable, String[] lhsColumns, boolean nullable, int currentDepth, CascadeStyle cascadeStyle) throws MappingException

Overrides org.hibernate.loader.JoinWalker.getJoinType.

Doc from org.hibernate.loader.JoinWalker.getJoinType.

Determine the appropriate associationType of join (if any) to use to fetch the given association.

Parameters
associationType:AssociationType

The association associationType.

config:FetchMode

The metadata-defined fetch mode.

path:PropertyPath

The path to the association

lhsTable:String

The owner table

lhsColumns:String[]

The owner join columns

nullable:boolean

Is the association nullable.

currentDepth:int

Current join depth

cascadeStyle:CascadeStyle

The metadata-defined cascade style.

Returns:int

type of join to use (JoinFragment#INNER_JOIN, JoinFragment#LEFT_OUTER_JOIN, or -1 to indicate no joining.

Exceptions
MappingException:
??
getQuerySpacesback to summary
public Set<E> getQuerySpaces()
getResultTypesback to summary
public Type[] getResultTypes()
getUserAliasesback to summary
public String[] getUserAliases()
getWhereFragmentback to summary
protected String getWhereFragment() throws MappingException

Overrides org.hibernate.loader.AbstractEntityJoinWalker.getWhereFragment.

Use the discriminator, to narrow the select to instances of the queried subclass, also applying any filters.

getWithClauseback to summary
protected String getWithClause(PropertyPath path)

Overrides org.hibernate.loader.JoinWalker.getWithClause.

hasRestrictionback to summary
protected boolean hasRestriction(PropertyPath path)

Overrides org.hibernate.loader.JoinWalker.hasRestriction.

isDefaultFetchModeback to summary
private static boolean isDefaultFetchMode(FetchMode fetchMode)