Class AbstractFetchDepthFieldManager
java.lang.Object
org.datanucleus.store.fieldmanager.AbstractFieldManager
org.datanucleus.store.fieldmanager.AbstractFetchDepthFieldManager
- All Implemented Interfaces:
FieldManager
- Direct Known Subclasses:
DetachFieldManager, LoadFieldManager, MakeTransientFieldManager
Base field manager for handling the fetching of fields.
Supports a FetchPlan to navigate down an object graph.
This is extended by specific managers for the detachment and makeTransient processes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException thrown when we reach the end of the fetch depth in a branch of the object graph -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FetchPlanForClassFetch Plan for the class of this object.protected final boolean[]Second class mutable fields for the class of this object.protected final DNStateManagerStateManager of the instance being fetched (detached or made transient).protected final FetchPlanStateState for the fetch process. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractFetchDepthFieldManager(DNStateManager sm, boolean[] secondClassMutableFields, FetchPlanForClass fpClass, FetchPlanState state) Constructor for a field manager for fetch plan processing. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ObjectendOfGraphOperation(int fieldNumber) Method called when an end of graph is encountered.booleanfetchBooleanField(int fieldNumber) Fetch a boolean field at the specified field number, returning it.bytefetchByteField(int fieldNumber) Fetch a byte field at the specified field number, returning it.charfetchCharField(int fieldNumber) Fetch a char field at the specified field number, returning it.doublefetchDoubleField(int fieldNumber) Fetch a double field at the specified field number, returning it.floatfetchFloatField(int fieldNumber) Fetch a float field at the specified field number, returning it.intfetchIntField(int fieldNumber) Fetch an int field at the specified field number, returning it.longfetchLongField(int fieldNumber) Fetch a long field at the specified field number, returning it.fetchObjectField(int fieldNumber) Method to fetch an object field whether it is SCO collection, PC, or whatever.shortfetchShortField(int fieldNumber) Fetch a short field at the specified field number, returning it.fetchStringField(int fieldNumber) Fetch a string field at the specified field number, returning it.protected abstract ObjectinternalFetchObjectField(int fieldNumber) Method to fetch an object field whether it is SCO collection, PC, or whatever.Methods inherited from class AbstractFieldManager
storeBooleanField, storeByteField, storeCharField, storeDoubleField, storeFloatField, storeIntField, storeLongField, storeObjectField, storeShortField, storeStringField
-
Field Details
-
sm
StateManager of the instance being fetched (detached or made transient). -
secondClassMutableFields
protected final boolean[] secondClassMutableFieldsSecond class mutable fields for the class of this object. -
fpClass
Fetch Plan for the class of this object. -
state
State for the fetch process.
-
-
Constructor Details
-
AbstractFetchDepthFieldManager
public AbstractFetchDepthFieldManager(DNStateManager sm, boolean[] secondClassMutableFields, FetchPlanForClass fpClass, FetchPlanState state) Constructor for a field manager for fetch plan processing.- Parameters:
sm- StateManager of the instance being processed.secondClassMutableFields- SCO field flagsfpClass- Fetch Plan for the class of this instancestate- Object containing the state of the fetch process
-
-
Method Details
-
fetchObjectField
public Object fetchObjectField(int fieldNumber) throws AbstractFetchDepthFieldManager.EndOfFetchPlanGraphException Method to fetch an object field whether it is SCO collection, PC, or whatever.- Specified by:
fetchObjectFieldin interfaceFieldManager- Overrides:
fetchObjectFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The object
- Throws:
AbstractFetchDepthFieldManager.EndOfFetchPlanGraphException
-
internalFetchObjectField
Method to fetch an object field whether it is SCO collection, PC, or whatever.- Parameters:
fieldNumber- Number of the field- Returns:
- The object
-
endOfGraphOperation
Method called when an end of graph is encountered.- Parameters:
fieldNumber- Number of the field- Returns:
- Object to return
-
fetchBooleanField
public boolean fetchBooleanField(int fieldNumber) Description copied from interface:FieldManagerFetch a boolean field at the specified field number, returning it.- Specified by:
fetchBooleanFieldin interfaceFieldManager- Overrides:
fetchBooleanFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchByteField
public byte fetchByteField(int fieldNumber) Description copied from interface:FieldManagerFetch a byte field at the specified field number, returning it.- Specified by:
fetchByteFieldin interfaceFieldManager- Overrides:
fetchByteFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchCharField
public char fetchCharField(int fieldNumber) Description copied from interface:FieldManagerFetch a char field at the specified field number, returning it.- Specified by:
fetchCharFieldin interfaceFieldManager- Overrides:
fetchCharFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchDoubleField
public double fetchDoubleField(int fieldNumber) Description copied from interface:FieldManagerFetch a double field at the specified field number, returning it.- Specified by:
fetchDoubleFieldin interfaceFieldManager- Overrides:
fetchDoubleFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchFloatField
public float fetchFloatField(int fieldNumber) Description copied from interface:FieldManagerFetch a float field at the specified field number, returning it.- Specified by:
fetchFloatFieldin interfaceFieldManager- Overrides:
fetchFloatFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchIntField
public int fetchIntField(int fieldNumber) Description copied from interface:FieldManagerFetch an int field at the specified field number, returning it.- Specified by:
fetchIntFieldin interfaceFieldManager- Overrides:
fetchIntFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchLongField
public long fetchLongField(int fieldNumber) Description copied from interface:FieldManagerFetch a long field at the specified field number, returning it.- Specified by:
fetchLongFieldin interfaceFieldManager- Overrides:
fetchLongFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchShortField
public short fetchShortField(int fieldNumber) Description copied from interface:FieldManagerFetch a short field at the specified field number, returning it.- Specified by:
fetchShortFieldin interfaceFieldManager- Overrides:
fetchShortFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-
fetchStringField
Description copied from interface:FieldManagerFetch a string field at the specified field number, returning it.- Specified by:
fetchStringFieldin interfaceFieldManager- Overrides:
fetchStringFieldin classAbstractFieldManager- Parameters:
fieldNumber- Number of the field- Returns:
- The value
-