Top Description Methods
org.hibernate.persister.walking.spi

public Interface AssociationVisitationStrategy

Known Direct Subinterfaces
org.hibernate.loader.plan.build.spi.LoadPlanBuildingAssociationVisitationStrategy
Imports
org.hibernate.loader.plan.spi.FetchSource

Strategy for walking associations as defined by the Hibernate metamodel. Is essentially a callback listener for interesting events while walking a metamodel graph

start() and finish() 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/finishingEntity ()} will be the outer set of calls. When starting with a collection, startingCollection/finishingCollection will be the outer set of calls.

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public void
public void
finish()

Notification we are finished visitation.

public void
finishingAttribute(AttributeDefinition
The attribute we are done walking
attributeDefinition
)

Notification that we are finishing walking an attribute.

public void
finishingCollection(CollectionDefinition
The collection we are finishing
collectionDefinition
)

Notification that we are finishing walking a collection

public void
finishingCollectionElements(CollectionElementDefinition
The collection element we are finishing
elementDefinition
)

Notification that we are finishing walking the elements of a collection (List/Map).

public void
finishingCollectionIndex(CollectionIndexDefinition
The collection index we are finishing
collectionIndexDefinition
)

Notification that we are finishing walking the index of a collection (List/Map).

public void
finishingComposite(CompositionDefinition
The composite we are finishing
compositionDefinition
)

Notification that we are done walking a composite.

public void
finishingEntity(EntityDefinition
The entity we are finishing walking.
entityDefinition
)

Notification we are finishing walking an entity.

public void
finishingEntityIdentifier(EntityIdentifierDefinition
The identifier we are finishing walking.
entityIdentifierDefinition
)

Notification we are finishing walking an entity.

public void
public void
public boolean
public FetchSource
public void
start()

Notification we are preparing to start visitation.

public boolean

Returns:

true if the walking should continue; false if walking should stop.
startingAttribute
(AttributeDefinition
The attribute we are preparing to walk.
attributeDefinition
)

Notification that we are preparing to walk an attribute.

public void
startingCollection(CollectionDefinition
The collection we are preparing to walk
collectionDefinition
)

Notification that we are starting to walk a collection

public void
startingCollectionElements(CollectionElementDefinition
The collection element we are preparing to walk..
elementDefinition
)

Notification that we are starting to look at the element definition for the collection.

public void
startingCollectionIndex(CollectionIndexDefinition
The collection index we are preparing to walk.
collectionIndexDefinition
)

Notification that we are starting to walk the index of a collection (List/Map).

public void
startingComposite(CompositionDefinition
The composite we are preparing to walk.
compositionDefinition
)

Notification that we are preparing to walk a composite.

public void
startingEntity(EntityDefinition
The entity we are preparing to walk
entityDefinition
)

Notification we are starting to walk an entity.

public void
startingEntityIdentifier(EntityIdentifierDefinition
The identifier we are preparing to walk
entityIdentifierDefinition
)

Notification we are starting to walk the identifier of an entity.

Method Detail

associationKeyRegisteredback to summary
public void associationKeyRegistered(AssociationKey associationKey)
finishback to summary
public void finish()

Notification we are finished visitation.

finishingAttributeback to summary
public void finishingAttribute(AttributeDefinition attributeDefinition)

Notification that we are finishing walking an attribute.

Parameters
attributeDefinition:AttributeDefinition

The attribute we are done walking

finishingCollectionback to summary
public void finishingCollection(CollectionDefinition collectionDefinition)

Notification that we are finishing walking a collection

Parameters
collectionDefinition:CollectionDefinition

The collection we are finishing

finishingCollectionElementsback to summary
public void finishingCollectionElements(CollectionElementDefinition elementDefinition)

Notification that we are finishing walking the elements of a collection (List/Map).

Parameters
elementDefinition:CollectionElementDefinition

The collection element we are finishing

finishingCollectionIndexback to summary
public void finishingCollectionIndex(CollectionIndexDefinition collectionIndexDefinition)

Notification that we are finishing walking the index of a collection (List/Map).

Parameters
collectionIndexDefinition:CollectionIndexDefinition

The collection index we are finishing

finishingCompositeback to summary
public void finishingComposite(CompositionDefinition compositionDefinition)

Notification that we are done walking a composite. Called on the back-end of the situations listed on startingComposite

Parameters
compositionDefinition:CompositionDefinition

The composite we are finishing

finishingEntityback to summary
public void finishingEntity(EntityDefinition entityDefinition)

Notification we are finishing walking an entity.

Parameters
entityDefinition:EntityDefinition

The entity we are finishing walking.

finishingEntityIdentifierback to summary
public void finishingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)

Notification we are finishing walking an entity.

Parameters
entityIdentifierDefinition:EntityIdentifierDefinition

The identifier we are finishing walking.

foundAnyback to summary
public void foundAny(AnyMappingDefinition anyDefinition)
foundCircularAssociationback to summary
public void foundCircularAssociation(AssociationAttributeDefinition attributeDefinition)
isDuplicateAssociationKeyback to summary
public boolean isDuplicateAssociationKey(AssociationKey associationKey)
registeredFetchSourceback to summary
public FetchSource registeredFetchSource(AssociationKey associationKey)
startback to summary
public void start()

Notification we are preparing to start visitation.

startingAttributeback to summary
public boolean startingAttribute(AttributeDefinition attributeDefinition)

Notification that we are preparing to walk an attribute. May be followed by calls to startingEntity (one-to-one, many-to-one), startingComposite, or startingCollection.

Parameters
attributeDefinition:AttributeDefinition

The attribute we are preparing to walk.

Returns:boolean

true if the walking should continue; false if walking should stop.

startingCollectionback to summary
public void startingCollection(CollectionDefinition collectionDefinition)

Notification that we are starting to walk a collection

Parameters
collectionDefinition:CollectionDefinition

The collection we are preparing to walk

startingCollectionElementsback to summary
public 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 to startingEntity

Parameters
elementDefinition:CollectionElementDefinition

The collection element we are preparing to walk..

startingCollectionIndexback to summary
public 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 to startingEntity

Parameters
collectionIndexDefinition:CollectionIndexDefinition

The collection index we are preparing to walk.

startingCompositeback to summary
public 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 if you need to hook into walking the top-level cid composite.
  • All forms of nested composite paths
Parameters
compositionDefinition:CompositionDefinition

The composite we are preparing to walk.

startingEntityback to summary
public void startingEntity(EntityDefinition entityDefinition)

Notification we are starting to walk an entity.

Parameters
entityDefinition:EntityDefinition

The entity we are preparing to walk

startingEntityIdentifierback to summary
public void startingEntityIdentifier(EntityIdentifierDefinition entityIdentifierDefinition)

Notification we are starting to walk the identifier of an entity.

Parameters
entityIdentifierDefinition:EntityIdentifierDefinition

The identifier we are preparing to walk