org.datanucleus.store.fieldmanager
Class CachePopulateFieldManager

java.lang.Object
  extended by org.datanucleus.store.fieldmanager.AbstractFieldManager
      extended by org.datanucleus.store.fieldmanager.AbstractFetchFieldManager
          extended by org.datanucleus.store.fieldmanager.CachePopulateFieldManager
All Implemented Interfaces:
FieldConsumer, FieldManager, FieldSupplier

public class CachePopulateFieldManager
extends AbstractFetchFieldManager

FieldManager to handle the population of the Level2 cache with objects. Recurses down the object graph to the fetchDepth limit adding objects to the L2 cache as it goes. Any field that has an SCO wrapper will be replaced by a non-SCO object.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.fieldmanager.AbstractFetchFieldManager
AbstractFetchFieldManager.EndOfFetchPlanGraphException
 
Field Summary
 
Fields inherited from class org.datanucleus.store.fieldmanager.AbstractFetchFieldManager
fpClass, secondClassMutableFields, sm, state
 
Constructor Summary
CachePopulateFieldManager(StateManager sm, boolean[] secondClassMutableFields, FetchPlan.FetchPlanForClass fpClass, CacheState state, CachedPC cacheable)
          Constructor.
 
Method Summary
protected  java.lang.Object endOfGraphOperation(int fieldNumber)
          Method to throw and EndOfFetchPlanGraphException since we're at the end of a branch in the tree.
protected  java.lang.Object internalFetchObjectField(int fieldNumber)
          Method to fetch an object field whether it is collection/map, PC, or whatever for the cache process.
protected  java.lang.Object processPersistable(AbstractMemberMetaData mmd, java.lang.Object pc)
          Utility method to process the passed persistable object.
 
Methods inherited from class org.datanucleus.store.fieldmanager.AbstractFetchFieldManager
fetchBooleanField, fetchByteField, fetchCharField, fetchDoubleField, fetchFloatField, fetchIntField, fetchLongField, fetchObjectField, fetchShortField, fetchStringField
 
Methods inherited from class org.datanucleus.store.fieldmanager.AbstractFieldManager
storeBooleanField, storeByteField, storeCharField, storeDoubleField, storeFloatField, storeIntField, storeLongField, storeObjectField, storeShortField, storeStringField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachePopulateFieldManager

public CachePopulateFieldManager(StateManager sm,
                                 boolean[] secondClassMutableFields,
                                 FetchPlan.FetchPlanForClass fpClass,
                                 CacheState state,
                                 CachedPC cacheable)
Constructor.

Parameters:
sm - the StateManager of the instance being cached.
secondClassMutableFields - The second class mutable fields for the class of this object
fpClass - Fetch Plan for the class of this instance
state - State object to hold any pertinent controls for the caching process
Method Detail

processPersistable

protected java.lang.Object processPersistable(AbstractMemberMetaData mmd,
                                              java.lang.Object pc)
Utility method to process the passed persistable object.

Parameters:
pc - The PC object

internalFetchObjectField

protected java.lang.Object internalFetchObjectField(int fieldNumber)
Method to fetch an object field whether it is collection/map, PC, or whatever for the cache process.

Specified by:
internalFetchObjectField in class AbstractFetchFieldManager
Parameters:
fieldNumber - Number of the field
Returns:
The object

endOfGraphOperation

protected java.lang.Object endOfGraphOperation(int fieldNumber)
Method to throw and EndOfFetchPlanGraphException since we're at the end of a branch in the tree.

Specified by:
endOfGraphOperation in class AbstractFetchFieldManager
Parameters:
fieldNumber - Number of the field
Returns:
Object to return


Copyright © 2009. All Rights Reserved.