Interface AssociationVisitationStrategy
-
- All Known Subinterfaces:
LoadPlanBuildingAssociationVisitationStrategy
public interface AssociationVisitationStrategyStrategy 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 voidassociationKeyRegistered(AssociationKey associationKey)voidfinish()Notification we are finished visitation.voidfinishingAttribute(AttributeDefinition attributeDefinition)Notification that we are finishing walking an attribute.voidfinishingCollection(CollectionDefinition collectionDefinition)Notification that we are finishing walking a collectionvoidfinishingCollectionElements(CollectionElementDefinition elementDefinition)Notification that we are finishing walking the elements of a collection (List/Map).voidfinishingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)Notification that we are finishing walking the index of a collection (List/Map).voidfinishingComposite(CompositionDefinition compositionDefinition)Notification that we are done walking a composite.voidfinishingEntity(EntityDefinition entityDefinition)Notification we are finishing walking an entity.voidfinishingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)Notification we are finishing walking an entity.voidfoundAny(AnyMappingDefinition anyDefinition)voidfoundCircularAssociation(AssociationAttributeDefinition attributeDefinition)booleanisDuplicateAssociationKey(AssociationKey associationKey)FetchSourceregisteredFetchSource(AssociationKey associationKey)voidstart()Notification we are preparing to start visitation.booleanstartingAttribute(AttributeDefinition attributeDefinition)Notification that we are preparing to walk an attribute.voidstartingCollection(CollectionDefinition collectionDefinition)Notification that we are starting to walk a collectionvoidstartingCollectionElements(CollectionElementDefinition elementDefinition)Notification that we are starting to look at the element definition for the collection.voidstartingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)Notification that we are starting to walk the index of a collection (List/Map).voidstartingComposite(CompositionDefinition compositionDefinition)Notification that we are preparing to walk a composite.voidstartingEntity(EntityDefinition entityDefinition)Notification we are starting to walk an entity.voidstartingEntityIdentifier(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:
trueif the walking should continue;falseif 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)
-
-