public abstract class AbstractLoadPlanBuildingAssociationVisitationStrategy extends Object implements LoadPlanBuildingAssociationVisitationStrategy, LoadPlanBuildingContext
determineFetchStrategy(org.hibernate.persister.walking.spi.AssociationAttributeDefinition)
is the
main decision point that determines if an association is walked.LoadPlanBuildingAssociationVisitationStrategy
,
AssociationVisitationStrategy
Modifier and Type | Class and Description |
---|---|
static class |
AbstractLoadPlanBuildingAssociationVisitationStrategy.PropertyPathStack
Maintains stack information for the property paths we are processing for logging purposes.
|
Modifier and Type | Field and Description |
---|---|
protected PropertyPath |
currentPropertyPath |
Modifier | Constructor and Description |
---|---|
protected |
AbstractLoadPlanBuildingAssociationVisitationStrategy(SessionFactoryImplementor sessionFactory)
Constructs an AbstractLoadPlanBuildingAssociationVisitationStrategy.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addRootReturn(Return rootReturn) |
void |
associationKeyRegistered(AssociationKey associationKey) |
protected int |
currentDepth() |
protected ExpandingFetchSource |
currentSource() |
protected abstract FetchStrategy |
determineFetchStrategy(AssociationAttributeDefinition attributeDefinition) |
void |
finish()
Notification we are finished visitation.
|
void |
finishingAttribute(AttributeDefinition attributeDefinition)
Notification that we are finishing walking an attribute.
|
void |
finishingCollection(CollectionDefinition collectionDefinition)
Notification that we are finishing walking a collection
|
void |
finishingCollectionElements(CollectionElementDefinition elementDefinition)
Notification that we are finishing walking the elements of a collection (List/Map).
|
void |
finishingCollectionIndex(CollectionIndexDefinition indexDefinition)
Notification that we are finishing walking the index of a collection (List/Map).
|
void |
finishingComposite(CompositionDefinition compositionDefinition)
Notification that we are done walking a composite.
|
void |
finishingEntity(EntityDefinition entityDefinition)
Notification we are finishing walking an entity.
|
void |
finishingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)
Notification we are finishing walking an entity.
|
void |
foundAny(AnyMappingDefinition anyDefinition) |
void |
foundCircularAssociation(AssociationAttributeDefinition attributeDefinition) |
ExpandingQuerySpaces |
getQuerySpaces() |
SessionFactoryImplementor |
getSessionFactory()
Access to the SessionFactory
|
protected boolean |
handleAssociationAttribute(AssociationAttributeDefinition attributeDefinition) |
protected boolean |
handleCompositeAttribute(AttributeDefinition attributeDefinition) |
boolean |
isDuplicateAssociationKey(AssociationKey associationKey) |
protected boolean |
isTooManyCollections() |
FetchSource |
registeredFetchSource(AssociationKey associationKey) |
protected SessionFactoryImplementor |
sessionFactory()
Gets the session factory.
|
void |
start()
Notification we are preparing to start visitation.
|
boolean |
startingAttribute(AttributeDefinition attributeDefinition)
Notification that we are preparing to walk an attribute.
|
void |
startingCollection(CollectionDefinition collectionDefinition)
Notification that we are starting to walk a collection
|
void |
startingCollectionElements(CollectionElementDefinition elementDefinition)
Notification that we are starting to look at the element definition for the collection.
|
void |
startingCollectionIndex(CollectionIndexDefinition indexDefinition)
Notification that we are starting to walk the index of a collection (List/Map).
|
void |
startingComposite(CompositionDefinition compositionDefinition)
Notification that we are preparing to walk a composite.
|
void |
startingEntity(EntityDefinition entityDefinition)
Notification we are starting to walk an entity.
|
void |
startingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)
Notification we are starting to walk the identifier of an entity.
|
protected boolean |
supportsRootCollectionReturns() |
protected boolean |
supportsRootEntityReturns() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
buildLoadPlan
protected PropertyPath currentPropertyPath
protected AbstractLoadPlanBuildingAssociationVisitationStrategy(SessionFactoryImplementor sessionFactory)
sessionFactory
- The session factory.protected SessionFactoryImplementor sessionFactory()
public ExpandingQuerySpaces getQuerySpaces()
getQuerySpaces
in interface LoadPlanBuildingContext
protected ExpandingFetchSource currentSource()
public void start()
AssociationVisitationStrategy
start
in interface AssociationVisitationStrategy
public void finish()
AssociationVisitationStrategy
finish
in interface AssociationVisitationStrategy
protected abstract void addRootReturn(Return rootReturn)
protected boolean supportsRootEntityReturns()
public void startingEntity(EntityDefinition entityDefinition)
AssociationVisitationStrategy
startingEntity
in interface AssociationVisitationStrategy
entityDefinition
- The entity we are preparing to walkpublic void finishingEntity(EntityDefinition entityDefinition)
AssociationVisitationStrategy
finishingEntity
in interface AssociationVisitationStrategy
entityDefinition
- The entity we are finishing walking.public void startingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)
AssociationVisitationStrategy
startingEntityIdentifier
in interface AssociationVisitationStrategy
entityIdentifierDefinition
- The identifier we are preparing to walkpublic void finishingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)
AssociationVisitationStrategy
finishingEntityIdentifier
in interface AssociationVisitationStrategy
entityIdentifierDefinition
- The identifier we are finishing walking.public void startingCollection(CollectionDefinition collectionDefinition)
AssociationVisitationStrategy
startingCollection
in interface AssociationVisitationStrategy
collectionDefinition
- The collection we are preparing to walkprotected boolean supportsRootCollectionReturns()
public void finishingCollection(CollectionDefinition collectionDefinition)
AssociationVisitationStrategy
finishingCollection
in interface AssociationVisitationStrategy
collectionDefinition
- The collection we are finishingpublic void startingCollectionIndex(CollectionIndexDefinition indexDefinition)
AssociationVisitationStrategy
AssociationVisitationStrategy.startingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
startingCollectionIndex
in interface AssociationVisitationStrategy
indexDefinition
- The collection index we are preparing to walk.public void finishingCollectionIndex(CollectionIndexDefinition indexDefinition)
AssociationVisitationStrategy
finishingCollectionIndex
in interface AssociationVisitationStrategy
indexDefinition
- The collection index we are finishingpublic void startingCollectionElements(CollectionElementDefinition elementDefinition)
AssociationVisitationStrategy
AssociationVisitationStrategy.startingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
startingCollectionElements
in interface AssociationVisitationStrategy
elementDefinition
- The collection element we are preparing to walk..public void finishingCollectionElements(CollectionElementDefinition elementDefinition)
AssociationVisitationStrategy
finishingCollectionElements
in interface AssociationVisitationStrategy
elementDefinition
- The collection element we are finishingpublic void startingComposite(CompositionDefinition compositionDefinition)
AssociationVisitationStrategy
AssociationVisitationStrategy.startingEntityIdentifier(org.hibernate.persister.walking.spi.EntityIdentifierDefinition)
if you need to hook into walking the top-level cid composite.
startingComposite
in interface AssociationVisitationStrategy
compositionDefinition
- The composite we are preparing to walk.public void finishingComposite(CompositionDefinition compositionDefinition)
AssociationVisitationStrategy
AssociationVisitationStrategy.startingComposite(org.hibernate.persister.walking.spi.CompositionDefinition)
finishingComposite
in interface AssociationVisitationStrategy
compositionDefinition
- The composite we are finishingpublic boolean startingAttribute(AttributeDefinition attributeDefinition)
AssociationVisitationStrategy
AssociationVisitationStrategy.startingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
(one-to-one, many-to-one), AssociationVisitationStrategy.startingComposite(org.hibernate.persister.walking.spi.CompositionDefinition)
, or AssociationVisitationStrategy.startingCollection(org.hibernate.persister.walking.spi.CollectionDefinition)
.startingAttribute
in interface AssociationVisitationStrategy
attributeDefinition
- The attribute we are preparing to walk.true
if the walking should continue; false
if walking should stop.public void finishingAttribute(AttributeDefinition attributeDefinition)
AssociationVisitationStrategy
finishingAttribute
in interface AssociationVisitationStrategy
attributeDefinition
- The attribute we are done walkingpublic boolean isDuplicateAssociationKey(AssociationKey associationKey)
isDuplicateAssociationKey
in interface AssociationVisitationStrategy
public void associationKeyRegistered(AssociationKey associationKey)
associationKeyRegistered
in interface AssociationVisitationStrategy
public FetchSource registeredFetchSource(AssociationKey associationKey)
registeredFetchSource
in interface LoadPlanBuildingContext
registeredFetchSource
in interface AssociationVisitationStrategy
public void foundCircularAssociation(AssociationAttributeDefinition attributeDefinition)
foundCircularAssociation
in interface AssociationVisitationStrategy
public void foundAny(AnyMappingDefinition anyDefinition)
foundAny
in interface AssociationVisitationStrategy
protected boolean handleCompositeAttribute(AttributeDefinition attributeDefinition)
protected boolean handleAssociationAttribute(AssociationAttributeDefinition attributeDefinition)
protected abstract FetchStrategy determineFetchStrategy(AssociationAttributeDefinition attributeDefinition)
protected int currentDepth()
protected boolean isTooManyCollections()
public SessionFactoryImplementor getSessionFactory()
LoadPlanBuildingContext
getSessionFactory
in interface LoadPlanBuildingContext
Copyright © 2019 JBoss by Red Hat. All rights reserved.