Package org.datanucleus.state
Class AppIdObjectIdFieldConsumer
- java.lang.Object
-
- org.datanucleus.state.AppIdObjectIdFieldConsumer
-
- All Implemented Interfaces:
Persistable.ObjectIdFieldConsumer
,FieldConsumer
,FieldManager
,FieldSupplier
public class AppIdObjectIdFieldConsumer extends Object implements FieldManager, Persistable.ObjectIdFieldConsumer
Simple class to handle the copying of PK fields from an object id to an object. Uses the supplied FieldManager to put the values into the object. Handles PC fields that are part of the PK, cascading to (PK) fields of that object.
-
-
Constructor Summary
Constructors Constructor Description AppIdObjectIdFieldConsumer(ApiAdapter api, FieldManager fm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
fetchBooleanField(int fieldNumber)
Fetch a boolean field at the specified field number, returning it.byte
fetchByteField(int fieldNumber)
Fetch a byte field at the specified field number, returning it.char
fetchCharField(int fieldNumber)
Fetch a char field at the specified field number, returning it.double
fetchDoubleField(int fieldNumber)
Fetch a double field at the specified field number, returning it.float
fetchFloatField(int fieldNumber)
Fetch a float field at the specified field number, returning it.int
fetchIntField(int fieldNumber)
Fetch an int field at the specified field number, returning it.long
fetchLongField(int fieldNumber)
Fetch a long field at the specified field number, returning it.Object
fetchObjectField(int fieldNumber)
Fetch an object field at the specified field number, returning it.short
fetchShortField(int fieldNumber)
Fetch a short field at the specified field number, returning it.String
fetchStringField(int fieldNumber)
Fetch a string field at the specified field number, returning it.void
storeBooleanField(int fieldNumber, boolean value)
Method to store a boolean field value in the object at the specified field position.void
storeByteField(int fieldNumber, byte value)
Method to store a byte field value in the object at the specified field position.void
storeCharField(int fieldNumber, char value)
Method to store a char field value in the object at the specified field position.void
storeDoubleField(int fieldNumber, double value)
Method to store a double field value in the object at the specified field position.void
storeFloatField(int fieldNumber, float value)
Method to store a float field value in the object at the specified field position.void
storeIntField(int fieldNumber, int value)
Method to store an int field value in the object at the specified field position.void
storeLongField(int fieldNumber, long value)
Method to store a long field value in the object at the specified field position.void
storeObjectField(int fieldNumber, Object value)
Method to store an object field value in the object at the specified field position.void
storeShortField(int fieldNumber, short value)
Method to store a short field value in the object at the specified field position.void
storeStringField(int fieldNumber, String value)
Method to store a string field value in the object at the specified field position.
-
-
-
Constructor Detail
-
AppIdObjectIdFieldConsumer
public AppIdObjectIdFieldConsumer(ApiAdapter api, FieldManager fm)
-
-
Method Detail
-
storeBooleanField
public void storeBooleanField(int fieldNumber, boolean value)
Description copied from interface:FieldConsumer
Method to store a boolean field value in the object at the specified field position.- Specified by:
storeBooleanField
in interfaceFieldConsumer
- Specified by:
storeBooleanField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeByteField
public void storeByteField(int fieldNumber, byte value)
Description copied from interface:FieldConsumer
Method to store a byte field value in the object at the specified field position.- Specified by:
storeByteField
in interfaceFieldConsumer
- Specified by:
storeByteField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeCharField
public void storeCharField(int fieldNumber, char value)
Description copied from interface:FieldConsumer
Method to store a char field value in the object at the specified field position.- Specified by:
storeCharField
in interfaceFieldConsumer
- Specified by:
storeCharField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeDoubleField
public void storeDoubleField(int fieldNumber, double value)
Description copied from interface:FieldConsumer
Method to store a double field value in the object at the specified field position.- Specified by:
storeDoubleField
in interfaceFieldConsumer
- Specified by:
storeDoubleField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeFloatField
public void storeFloatField(int fieldNumber, float value)
Description copied from interface:FieldConsumer
Method to store a float field value in the object at the specified field position.- Specified by:
storeFloatField
in interfaceFieldConsumer
- Specified by:
storeFloatField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeIntField
public void storeIntField(int fieldNumber, int value)
Description copied from interface:FieldConsumer
Method to store an int field value in the object at the specified field position.- Specified by:
storeIntField
in interfaceFieldConsumer
- Specified by:
storeIntField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeLongField
public void storeLongField(int fieldNumber, long value)
Description copied from interface:FieldConsumer
Method to store a long field value in the object at the specified field position.- Specified by:
storeLongField
in interfaceFieldConsumer
- Specified by:
storeLongField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeShortField
public void storeShortField(int fieldNumber, short value)
Description copied from interface:FieldConsumer
Method to store a short field value in the object at the specified field position.- Specified by:
storeShortField
in interfaceFieldConsumer
- Specified by:
storeShortField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeStringField
public void storeStringField(int fieldNumber, String value)
Description copied from interface:FieldConsumer
Method to store a string field value in the object at the specified field position.- Specified by:
storeStringField
in interfaceFieldConsumer
- Specified by:
storeStringField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
storeObjectField
public void storeObjectField(int fieldNumber, Object value)
Description copied from interface:FieldConsumer
Method to store an object field value in the object at the specified field position.- Specified by:
storeObjectField
in interfaceFieldConsumer
- Specified by:
storeObjectField
in interfacePersistable.ObjectIdFieldConsumer
- Parameters:
fieldNumber
- Number of the fieldvalue
- value to store
-
fetchBooleanField
public boolean fetchBooleanField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a boolean field at the specified field number, returning it.- Specified by:
fetchBooleanField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchByteField
public byte fetchByteField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a byte field at the specified field number, returning it.- Specified by:
fetchByteField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchCharField
public char fetchCharField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a char field at the specified field number, returning it.- Specified by:
fetchCharField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchDoubleField
public double fetchDoubleField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a double field at the specified field number, returning it.- Specified by:
fetchDoubleField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchFloatField
public float fetchFloatField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a float field at the specified field number, returning it.- Specified by:
fetchFloatField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchIntField
public int fetchIntField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch an int field at the specified field number, returning it.- Specified by:
fetchIntField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchLongField
public long fetchLongField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a long field at the specified field number, returning it.- Specified by:
fetchLongField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchShortField
public short fetchShortField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a short field at the specified field number, returning it.- Specified by:
fetchShortField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchStringField
public String fetchStringField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch a string field at the specified field number, returning it.- Specified by:
fetchStringField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
fetchObjectField
public Object fetchObjectField(int fieldNumber)
Description copied from interface:FieldSupplier
Fetch an object field at the specified field number, returning it.- Specified by:
fetchObjectField
in interfaceFieldSupplier
- Parameters:
fieldNumber
- Number of the field- Returns:
- The value
-
-