Class DetachFieldManager
- java.lang.Object
-
- org.datanucleus.store.fieldmanager.AbstractFieldManager
-
- org.datanucleus.store.fieldmanager.AbstractFetchDepthFieldManager
-
- org.datanucleus.store.fieldmanager.DetachFieldManager
-
- All Implemented Interfaces:
FieldConsumer
,FieldManager
,FieldSupplier
public class DetachFieldManager extends AbstractFetchDepthFieldManager
FieldManager to handle the detachment of fields with persistable objects.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.datanucleus.store.fieldmanager.AbstractFetchDepthFieldManager
AbstractFetchDepthFieldManager.EndOfFetchPlanGraphException
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.fieldmanager.AbstractFetchDepthFieldManager
fpClass, op, secondClassMutableFields, state
-
-
Constructor Summary
Constructors Constructor Description DetachFieldManager(ObjectProvider op, boolean[] secondClassMutableFields, FetchPlanForClass fpClass, FetchPlanState state, boolean copy)
Constructor for a field manager for detachment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
endOfGraphOperation(int fieldNumber)
Method to throw and EndOfFetchPlanGraphException since we're at the end of a branch in the tree.protected Object
internalFetchObjectField(int fieldNumber)
Method to fetch an object field whether it is collection/map, PC, or whatever for the detachment process.protected void
processPersistable(Object pc)
Utility method to process the passed persistable object.protected Object
processPersistableCopy(Object pc)
Utility method to process the passed persistable object creating a copy.-
Methods inherited from class org.datanucleus.store.fieldmanager.AbstractFetchDepthFieldManager
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
-
-
-
-
Constructor Detail
-
DetachFieldManager
public DetachFieldManager(ObjectProvider op, boolean[] secondClassMutableFields, FetchPlanForClass fpClass, FetchPlanState state, boolean copy)
Constructor for a field manager for detachment.- Parameters:
op
- the ObjectProvider of the instance being detached. An instance in Persistent or Transactional statesecondClassMutableFields
- The second class mutable fields for the class of this objectfpClass
- Fetch Plan for the class of this instancestate
- State object to hold any pertinent controls for the detachment processcopy
- Whether to create detached COPIES or just detach in-situ
-
-
Method Detail
-
processPersistableCopy
protected Object processPersistableCopy(Object pc)
Utility method to process the passed persistable object creating a copy.- Parameters:
pc
- The PC object- Returns:
- The processed object
-
processPersistable
protected void processPersistable(Object pc)
Utility method to process the passed persistable object.- Parameters:
pc
- The PC object
-
internalFetchObjectField
protected Object internalFetchObjectField(int fieldNumber)
Method to fetch an object field whether it is collection/map, PC, or whatever for the detachment process.- Specified by:
internalFetchObjectField
in classAbstractFetchDepthFieldManager
- Parameters:
fieldNumber
- Number of the field- Returns:
- The object
-
endOfGraphOperation
protected 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 classAbstractFetchDepthFieldManager
- Parameters:
fieldNumber
- Number of the field- Returns:
- Object to return
-
-