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

public Class CriteriaJoinWalker

extends AbstractEntityJoinWalker
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .List, .Set, org.hibernate.Criteria, .FetchMode, .LockOptions, .MappingException, org.hibernate.engine.spi.CascadeStyle, .LoadQueryInfluencers, .SessionFactoryImplementor, org.hibernate.internal.CriteriaImpl, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.loader.AbstractEntityJoinWalker, .PropertyPath, org.hibernate.persister.collection.CollectionPersister, org.hibernate.persister.entity.Joinable, .OuterJoinLoadable, .Queryable, org.hibernate.sql.JoinType, org.hibernate.type.AssociationType, .Type

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

Field Summary

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

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)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public
CriteriaJoinWalker(final OuterJoinLoadable persister, final CriteriaQueryTranslator translator, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers, final String alias)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected String
protected String
public String
protected JoinType
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 JoinType
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
public boolean[]
private static boolean
Inherited from org.hibernate.loader.AbstractEntityJoinWalker:
getAliasgetPersisterinitAllinitAllinitProjectionisDuplicateAssociationisJoinedFetchEnabledisJoinFetchEnabledByProfileorderBytoString

Field Detail

includeInResultRowback to summary
private final boolean[] includeInResultRow
includeInResultRowListback to summary
private final List<Boolean> includeInResultRowList
querySpacesback to summary
private final Set<E> querySpaces
resultTypeListback to summary
private final List<Type> resultTypeList
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<String> 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)

Deprecated

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

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)

Deprecated

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

Method Detail

generateRootAliasback to summary
protected String generateRootAlias(String tableName)

Overrides org.hibernate.loader.JoinWalker.generateRootAlias.

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

Overrides org.hibernate.loader.JoinWalker.generateTableAlias.

Annotations
@Override
getCommentback to summary
public String getComment()

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

Annotations
@Override
getJoinTypeback to summary
protected JoinType 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:JoinType

type of join to use (org.hibernate.sql.JoinType#INNER_JOIN, org.hibernate.sql.JoinType#LEFT_OUTER_JOIN, or -1 to indicate no joining.

Annotations
@Override
Exceptions
MappingException:
??
getJoinTypeback to summary
protected JoinType 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:JoinType

type of join to use (org.hibernate.sql.JoinType#INNER_JOIN, org.hibernate.sql.JoinType#LEFT_OUTER_JOIN, or -1 to indicate no joining.

Annotations
@Override
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.

Annotations
@Override
getWithClauseback to summary
protected String getWithClause(PropertyPath path)

Overrides org.hibernate.loader.JoinWalker.getWithClause.

Annotations
@Override
hasRestrictionback to summary
protected boolean hasRestriction(PropertyPath path)

Overrides org.hibernate.loader.JoinWalker.hasRestriction.

Annotations
@Override
includeInResultRowback to summary
public boolean[] includeInResultRow()
isDefaultFetchModeback to summary
private static boolean isDefaultFetchMode(FetchMode fetchMode)