Initially grew as a part of the re-implementation of the legacy JoinWalker functionality to instead build LoadPlans.
But this is really quite simple walking. Interesting events are handled by calling out to
implementations of AssociationVisitationStrategy which really provide the real functionality of what we do
as we walk.
The visitor will walk the entire metamodel graph (the parts reachable from the given root)!!! It is up to the provided AssociationVisitationStrategy to tell it when to stop. The walker provides the walking; the strategy provides the semantics of what happens at certain points. Its really very similar to parsers and how parsing is generally split between syntax and semantics. Walker walks the syntax (associations, identifiers, etc) and when it calls out to the strategy the strategy then decides the semantics (literally, the meaning).
The visitor will, however, stop if it sees a "duplicate" AssociationKey. In such a case, the walker would call
AssociationVisitationStrategy#foundCircularAssociation and stop walking any further down that graph any
further.
| Modifier and Type | Field and Description |
|---|---|
| private PropertyPath | |
| private final SessionFactoryImplementor | factory
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| private static final Logger | |
| private final AssociationVisitationStrategy | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public | MetamodelGraphWalker(AssociationVisitationStrategy strategy, SessionFactoryImplementor factory)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | addAssociationKey(AssociationKey
- the association key. associationKey)Add association key to indicate the association is being visited. |
| protected boolean | Returns: true, if the association with the specified association key has already been visited; false, otherwise.- the association key. associationKey)Has an association with the specified key been visited already? |
| private void | |
| private void | |
| private void | visitAttributeDefinition(AttributeDefinition attributeDefinition, AbstractEntityPersister sourcePersister)
|
| private void | |
| public static void | visitCollection(AssociationVisitationStrategy
The semantics strategy strategy, CollectionPersister The persister describing the collection to start walking from persister)Entry point into walking the model graph of a collection according to its defined metamodel. |
| private void | |
| private void | |
| private void | |
| private void | |
| public static void | visitEntity(AssociationVisitationStrategy
The semantics strategy strategy, EntityPersister The persister describing the entity to start walking from persister)Entry point into walking the model graph of an entity according to its defined metamodel. |
| private void | |
| private void |
| currentPropertyPath | back to summary |
|---|---|
| private PropertyPath currentPropertyPath | |
| factory | back to summary |
|---|---|
| private final SessionFactoryImplementor factory
Deprecated as a consequence of | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| strategy | back to summary |
|---|---|
| private final AssociationVisitationStrategy strategy | |
| visitedAssociationKeys | back to summary |
|---|---|
| private final Set<AssociationKey> visitedAssociationKeys | |
| MetamodelGraphWalker | back to summary |
|---|---|
| public MetamodelGraphWalker(AssociationVisitationStrategy strategy, SessionFactoryImplementor factory)
Deprecated as a consequence of | |
| addAssociationKey | back to summary |
|---|---|
| protected void addAssociationKey(AssociationKey associationKey) Add association key to indicate the association is being visited.
| |
| isDuplicateAssociationKey | back to summary |
|---|---|
| protected boolean isDuplicateAssociationKey(AssociationKey associationKey) Has an association with the specified key been visited already?
| |
| visitAnyDefinition | back to summary |
|---|---|
| private void visitAnyDefinition(AnyMappingDefinition anyDefinition) | |
| visitAssociation | back to summary |
|---|---|
| private void visitAssociation(AssociationAttributeDefinition attribute) | |
| visitAttributeDefinition | back to summary |
|---|---|
| private void visitAttributeDefinition(AttributeDefinition attributeDefinition, AbstractEntityPersister sourcePersister) | |
| visitAttributes | back to summary |
|---|---|
| private void visitAttributes(AttributeSource attributeSource, AbstractEntityPersister sourcePersister) | |
| visitCollection | back to summary |
|---|---|
| public static void visitCollection(AssociationVisitationStrategy strategy, CollectionPersister persister) Entry point into walking the model graph of a collection according to its defined metamodel.
| |
| visitCollectionDefinition | back to summary |
|---|---|
| private void visitCollectionDefinition(CollectionDefinition collectionDefinition) | |
| visitCollectionElements | back to summary |
|---|---|
| private void visitCollectionElements(CollectionDefinition collectionDefinition) | |
| visitCollectionIndex | back to summary |
|---|---|
| private void visitCollectionIndex(CollectionDefinition collectionDefinition) | |
| visitCompositeDefinition | back to summary |
|---|---|
| private void visitCompositeDefinition(CompositionDefinition compositionDefinition) | |
| visitEntity | back to summary |
|---|---|
| public static void visitEntity(AssociationVisitationStrategy strategy, EntityPersister persister) Entry point into walking the model graph of an entity according to its defined metamodel.
| |
| visitEntityDefinition | back to summary |
|---|---|
| private void visitEntityDefinition(EntityDefinition entityDefinition) | |
| visitIdentifierDefinition | back to summary |
|---|---|
| private void visitIdentifierDefinition(EntityIdentifierDefinition identifierDefinition) | |