Top Description Inners Fields Constructors Methods
org.hibernate.loader.entity

public Class EntityJoinWalker

extends AbstractEntityJoinWalker
Class Inheritance
Imports
java.util.ArrayList, .Collections, .HashMap, org.hibernate.FetchMode, .LockMode, .LockOptions, .MappingException, org.hibernate.engine.CascadeStyle, .LoadQueryInfluencers, .SessionFactoryImplementor, org.hibernate.loader.AbstractEntityJoinWalker, .OuterJoinableAssociation, .PropertyPath, org.hibernate.persister.collection.QueryableCollection, org.hibernate.persister.entity.EntityPersister, .OuterJoinLoadable, org.hibernate.type.AssociationType, .CompositeType, .EntityType, .Type

A walker for loaders that fetch entities
Author
Gavin King
See Also
EntityLoader

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final int[][]
private final LockOptions

Constructor Summary

AccessConstructor and Description
public
EntityJoinWalker(OuterJoinLoadable persister, String[] uniqueKey, int batchSize, LockMode lockMode, final SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)

public
EntityJoinWalker(OuterJoinLoadable persister, String[] uniqueKey, int batchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)

Method Summary

Modifier and TypeMethod and Description
public String
public int[][]
protected int
getJoinType(OuterJoinLoadable
The owner of the association.
persister
,
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
,
boolean
Is the association nullable.
nullable
,
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.
Inherited from org.hibernate.loader.AbstractEntityJoinWalker:
getAliasgetPersistergetWhereFragmentinitAllinitAllinitProjectionisDuplicateAssociationisJoinedFetchEnabledisJoinFetchEnabledByProfiletoString

Field Detail

compositeKeyManyToOneTargetIndicesback to summary
private final int[][] compositeKeyManyToOneTargetIndices
lockOptionsback to summary
private final LockOptions lockOptions

Hides org.hibernate.loader.JoinWalker.lockOptions.

Constructor Detail

EntityJoinWalkerback to summary
public EntityJoinWalker(OuterJoinLoadable persister, String[] uniqueKey, int batchSize, LockMode lockMode, final SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException
EntityJoinWalkerback to summary
public EntityJoinWalker(OuterJoinLoadable persister, String[] uniqueKey, int batchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException

Method Detail

getCommentback to summary
public String getComment()

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

getCompositeKeyManyToOneTargetIndicesback to summary
public int[][] getCompositeKeyManyToOneTargetIndices()
getJoinTypeback to summary
protected int getJoinType(OuterJoinLoadable persister, PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, String lhsTable, String[] lhsColumns, boolean nullable, 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:
??
org.hibernate.loader.entity back to summary

private Class EntityJoinWalker.AssociationInitCallbackImpl

extends Object
implements AssociationInitCallback
Class Inheritance
  • java.lang.Object
  • org.hibernate.loader.entity.EntityJoinWalker.AssociationInitCallbackImpl
All Implemented Interfaces
org.hibernate.loader.JoinWalker.AssociationInitCallback

Field Summary

Modifier and TypeField and Description
private final ArrayList<String>
private final HashMap<String, OuterJoinableAssociation>
private final SessionFactoryImplementor
private final HashMap<String, Integer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
private void
findKeyManyToOneTargetIndices(ArrayList<Integer> keyManyToOneTargetIndices, OuterJoinableAssociation joinWithCompositeId, CompositeType componentType)

private boolean
private Integer
locateKeyManyToOneTargetIndex(OuterJoinableAssociation joinWithCompositeId, EntityType keyManyToOneType)

public int[][]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasesForAssociationsWithCompositesIdsback to summary
private final ArrayList<String> aliasesForAssociationsWithCompositesIds
associationsByAliasback to summary
private final HashMap<String, OuterJoinableAssociation> associationsByAlias
factoryback to summary
private final SessionFactoryImplementor factory
positionsByAliasback to summary
private final HashMap<String, Integer> positionsByAlias

Constructor Detail

AssociationInitCallbackImplback to summary
public AssociationInitCallbackImpl(SessionFactoryImplementor factory)

Method Detail

associationProcessedback to summary
public void associationProcessed(OuterJoinableAssociation oja, int position)

Implements org.hibernate.loader.JoinWalker.AssociationInitCallback.associationProcessed.

findKeyManyToOneTargetIndicesback to summary
private void findKeyManyToOneTargetIndices(ArrayList<Integer> keyManyToOneTargetIndices, OuterJoinableAssociation joinWithCompositeId, CompositeType componentType)
hasAssociationback to summary
private boolean hasAssociation(CompositeType componentType)
locateKeyManyToOneTargetIndexback to summary
private Integer locateKeyManyToOneTargetIndex(OuterJoinableAssociation joinWithCompositeId, EntityType keyManyToOneType)
resolveback to summary
public int[][] resolve()