Interface AssociationVisitationStrategy
-
- All Known Subinterfaces:
LoadPlanBuildingAssociationVisitationStrategy
public interface AssociationVisitationStrategy
Strategy for walking associations as defined by the Hibernate metamodel. Is essentially a callback listener for interesting events while walking a metamodel graphstart()
andfinish()
are called at the start and at the finish of the process. Walking might start with an entity or a collection depending on where the walker is asked to start. When starting with an entity,startingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
/finishingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
()} will be the outer set of calls. When starting with a collection,startingCollection(org.hibernate.persister.walking.spi.CollectionDefinition)
/finishingCollection(org.hibernate.persister.walking.spi.CollectionDefinition)
will be the outer set of calls.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
associationKeyRegistered(AssociationKey associationKey)
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 collectionvoid
finishingCollectionElements(CollectionElementDefinition elementDefinition)
Notification that we are finishing walking the elements of a collection (List/Map).void
finishingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)
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)
boolean
isDuplicateAssociationKey(AssociationKey associationKey)
FetchSource
registeredFetchSource(AssociationKey associationKey)
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 collectionvoid
startingCollectionElements(CollectionElementDefinition elementDefinition)
Notification that we are starting to look at the element definition for the collection.void
startingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)
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.
-
-
-
Method Detail
-
start
void start()
Notification we are preparing to start visitation.
-
finish
void finish()
Notification we are finished visitation.
-
startingEntity
void startingEntity(EntityDefinition entityDefinition)
Notification we are starting to walk an entity.- Parameters:
entityDefinition
- The entity we are preparing to walk
-
finishingEntity
void finishingEntity(EntityDefinition entityDefinition)
Notification we are finishing walking an entity.- Parameters:
entityDefinition
- The entity we are finishing walking.
-
startingEntityIdentifier
void startingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)
Notification we are starting to walk the identifier of an entity.- Parameters:
entityIdentifierDefinition
- The identifier we are preparing to walk
-
finishingEntityIdentifier
void finishingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)
Notification we are finishing walking an entity.- Parameters:
entityIdentifierDefinition
- The identifier we are finishing walking.
-
startingCollection
void startingCollection(CollectionDefinition collectionDefinition)
Notification that we are starting to walk a collection- Parameters:
collectionDefinition
- The collection we are preparing to walk
-
finishingCollection
void finishingCollection(CollectionDefinition collectionDefinition)
Notification that we are finishing walking a collection- Parameters:
collectionDefinition
- The collection we are finishing
-
startingCollectionIndex
void startingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)
Notification that we are starting to walk the index of a collection (List/Map). In the case of a Map, if the indices (the keys) are entities this will be followed up by a call tostartingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
- Parameters:
collectionIndexDefinition
- The collection index we are preparing to walk.
-
finishingCollectionIndex
void finishingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)
Notification that we are finishing walking the index of a collection (List/Map).- Parameters:
collectionIndexDefinition
- The collection index we are finishing
-
startingCollectionElements
void startingCollectionElements(CollectionElementDefinition elementDefinition)
Notification that we are starting to look at the element definition for the collection. If the collection elements are entities this will be followed up by a call tostartingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
- Parameters:
elementDefinition
- The collection element we are preparing to walk..
-
finishingCollectionElements
void finishingCollectionElements(CollectionElementDefinition elementDefinition)
Notification that we are finishing walking the elements of a collection (List/Map).- Parameters:
elementDefinition
- The collection element we are finishing
-
startingComposite
void startingComposite(CompositionDefinition compositionDefinition)
Notification that we are preparing to walk a composite. This is called only for:-
top-level composites for entity attributes. composite entity identifiers do not route through here, see
startingEntityIdentifier(org.hibernate.persister.walking.spi.EntityIdentifierDefinition)
if you need to hook into walking the top-level cid composite. - All forms of nested composite paths
- Parameters:
compositionDefinition
- The composite we are preparing to walk.
-
top-level composites for entity attributes. composite entity identifiers do not route through here, see
-
finishingComposite
void finishingComposite(CompositionDefinition compositionDefinition)
Notification that we are done walking a composite. Called on the back-end of the situations listed onstartingComposite(org.hibernate.persister.walking.spi.CompositionDefinition)
- Parameters:
compositionDefinition
- The composite we are finishing
-
startingAttribute
boolean startingAttribute(AttributeDefinition attributeDefinition)
Notification that we are preparing to walk an attribute. May be followed by calls tostartingEntity(org.hibernate.persister.walking.spi.EntityDefinition)
(one-to-one, many-to-one),startingComposite(org.hibernate.persister.walking.spi.CompositionDefinition)
, orstartingCollection(org.hibernate.persister.walking.spi.CollectionDefinition)
.- Parameters:
attributeDefinition
- The attribute we are preparing to walk.- Returns:
true
if the walking should continue;false
if walking should stop.
-
finishingAttribute
void finishingAttribute(AttributeDefinition attributeDefinition)
Notification that we are finishing walking an attribute.- Parameters:
attributeDefinition
- The attribute we are done walking
-
foundAny
void foundAny(AnyMappingDefinition anyDefinition)
-
associationKeyRegistered
void associationKeyRegistered(AssociationKey associationKey)
-
registeredFetchSource
FetchSource registeredFetchSource(AssociationKey associationKey)
-
foundCircularAssociation
void foundCircularAssociation(AssociationAttributeDefinition attributeDefinition)
-
isDuplicateAssociationKey
boolean isDuplicateAssociationKey(AssociationKey associationKey)
-
-