public abstract class AbstractEntityGraphVisitationStrategy extends AbstractLoadPlanBuildingAssociationVisitationStrategy
AbstractLoadPlanBuildingAssociationVisitationStrategy.PropertyPathStack| Modifier and Type | Field and Description | 
|---|---|
protected static FetchStrategy | 
DEFAULT_EAGER
The JPA 2.1 SPEC's Entity Graph only defines _WHEN_ to load an attribute, it doesn't define _HOW_ to load it
 So I'm here just making an assumption that when it is EAGER, then we use JOIN, and when it is LAZY, then we use SELECT. 
 | 
protected static FetchStrategy | 
DEFAULT_LAZY  | 
protected LoadQueryInfluencers | 
loadQueryInfluencers  | 
currentPropertyPath| Modifier | Constructor and Description | 
|---|---|
protected  | 
AbstractEntityGraphVisitationStrategy(SessionFactoryImplementor sessionFactory,
                                     LoadQueryInfluencers loadQueryInfluencers,
                                     LockMode lockMode)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addRootReturn(Return rootReturn)  | 
protected FetchStrategy | 
adjustJoinFetchIfNeeded(AssociationAttributeDefinition attributeDefinition,
                       FetchStrategy fetchStrategy)  | 
protected Map<String,AttributeNodeImplementor> | 
buildAttributeNodeMap()
Build "name" -- "attribute node" map from the current entity graph we're visiting. 
 | 
LoadPlan | 
buildLoadPlan()
After visitation is done, build the load plan. 
 | 
protected FetchStrategy | 
determineFetchStrategy(AssociationAttributeDefinition attributeDefinition)  | 
void | 
finish()
Notification we are finished visitation. 
 | 
void | 
finishingAttribute(AttributeDefinition attributeDefinition)
Notification that we are finishing walking an attribute. 
 | 
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 | 
finishingEntity(EntityDefinition entityDefinition)
Notification we are finishing walking an entity. 
 | 
void | 
foundCircularAssociation(AssociationAttributeDefinition attributeDefinition)  | 
protected abstract GraphNodeImplementor | 
getRootEntityGraph()  | 
protected abstract FetchStrategy | 
resolveImplicitFetchStrategyFromEntityGraph(AssociationAttributeDefinition attributeDefinition)  | 
void | 
start()
Notification we are preparing to start visitation. 
 | 
boolean | 
startingAttribute(AttributeDefinition attributeDefinition)
I'm using NULL-OBJECT pattern here, for attributes that not existing in the EntityGraph,
 a predefined NULL-ATTRIBUTE-NODE is pushed to the stack. 
 | 
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 | 
startingEntity(EntityDefinition entityDefinition)
Notification we are starting to walk an entity. 
 | 
protected boolean | 
supportsRootCollectionReturns()  | 
associationKeyRegistered, currentDepth, currentSource, finishingCollection, finishingComposite, finishingEntityIdentifier, foundAny, getQuerySpaces, getSessionFactory, handleAssociationAttribute, handleCompositeAttribute, isDuplicateAssociationKey, isTooManyCollections, registeredFetchSource, sessionFactory, startingCollection, startingComposite, startingEntityIdentifier, supportsRootEntityReturnsprotected static final FetchStrategy DEFAULT_EAGER
protected static final FetchStrategy DEFAULT_LAZY
protected final LoadQueryInfluencers loadQueryInfluencers
protected AbstractEntityGraphVisitationStrategy(SessionFactoryImplementor sessionFactory, LoadQueryInfluencers loadQueryInfluencers, LockMode lockMode)
public void start()
AssociationVisitationStrategystart in interface AssociationVisitationStrategystart in class AbstractLoadPlanBuildingAssociationVisitationStrategypublic void finish()
AssociationVisitationStrategyfinish in interface AssociationVisitationStrategyfinish in class AbstractLoadPlanBuildingAssociationVisitationStrategypublic void startingEntity(EntityDefinition entityDefinition)
AssociationVisitationStrategystartingEntity in interface AssociationVisitationStrategystartingEntity in class AbstractLoadPlanBuildingAssociationVisitationStrategyentityDefinition - The entity we are preparing to walkprotected Map<String,AttributeNodeImplementor> buildAttributeNodeMap()
public void finishingEntity(EntityDefinition entityDefinition)
AssociationVisitationStrategyfinishingEntity in interface AssociationVisitationStrategyfinishingEntity in class AbstractLoadPlanBuildingAssociationVisitationStrategyentityDefinition - The entity we are finishing walking.public boolean startingAttribute(AttributeDefinition attributeDefinition)
startingAttribute in interface AssociationVisitationStrategystartingAttribute in class AbstractLoadPlanBuildingAssociationVisitationStrategyattributeDefinition - The attribute we are preparing to walk.true if the walking should continue; false if walking should stop.public void finishingAttribute(AttributeDefinition attributeDefinition)
AssociationVisitationStrategyfinishingAttribute in interface AssociationVisitationStrategyfinishingAttribute in class AbstractLoadPlanBuildingAssociationVisitationStrategyattributeDefinition - The attribute we are done walkingpublic void startingCollectionElements(CollectionElementDefinition elementDefinition)
AssociationVisitationStrategyAssociationVisitationStrategy.startingEntity(org.hibernate.persister.walking.spi.EntityDefinition)startingCollectionElements in interface AssociationVisitationStrategystartingCollectionElements in class AbstractLoadPlanBuildingAssociationVisitationStrategyelementDefinition - The collection element we are preparing to walk..public void finishingCollectionElements(CollectionElementDefinition elementDefinition)
AssociationVisitationStrategyfinishingCollectionElements in interface AssociationVisitationStrategyfinishingCollectionElements in class AbstractLoadPlanBuildingAssociationVisitationStrategyelementDefinition - The collection element we are finishingpublic void startingCollectionIndex(CollectionIndexDefinition indexDefinition)
AssociationVisitationStrategyAssociationVisitationStrategy.startingEntity(org.hibernate.persister.walking.spi.EntityDefinition)startingCollectionIndex in interface AssociationVisitationStrategystartingCollectionIndex in class AbstractLoadPlanBuildingAssociationVisitationStrategyindexDefinition - The collection index we are preparing to walk.public void finishingCollectionIndex(CollectionIndexDefinition indexDefinition)
AssociationVisitationStrategyfinishingCollectionIndex in interface AssociationVisitationStrategyfinishingCollectionIndex in class AbstractLoadPlanBuildingAssociationVisitationStrategyindexDefinition - The collection index we are finishingprotected boolean supportsRootCollectionReturns()
supportsRootCollectionReturns in class AbstractLoadPlanBuildingAssociationVisitationStrategyprotected void addRootReturn(Return rootReturn)
addRootReturn in class AbstractLoadPlanBuildingAssociationVisitationStrategyprotected FetchStrategy determineFetchStrategy(AssociationAttributeDefinition attributeDefinition)
determineFetchStrategy in class AbstractLoadPlanBuildingAssociationVisitationStrategyprotected abstract FetchStrategy resolveImplicitFetchStrategyFromEntityGraph(AssociationAttributeDefinition attributeDefinition)
protected FetchStrategy adjustJoinFetchIfNeeded(AssociationAttributeDefinition attributeDefinition, FetchStrategy fetchStrategy)
public LoadPlan buildLoadPlan()
LoadPlanBuildingAssociationVisitationStrategyprotected abstract GraphNodeImplementor getRootEntityGraph()
public void foundCircularAssociation(AssociationAttributeDefinition attributeDefinition)
foundCircularAssociation in interface AssociationVisitationStrategyfoundCircularAssociation in class AbstractLoadPlanBuildingAssociationVisitationStrategyCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.