Package org.apache.openjpa.kernel
Class SaveFieldManager
- java.lang.Object
-
- org.apache.openjpa.kernel.SaveFieldManager
-
- All Implemented Interfaces:
java.io.Serializable
,FieldConsumer
,FieldManager
,FieldSupplier
public class SaveFieldManager extends java.lang.Object implements java.io.Serializable
FieldManager type used to store information for rollback.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
fetchBooleanField(int field)
Return the value of the given field.byte
fetchByteField(int field)
Return the value of the given field.char
fetchCharField(int field)
Return the value of the given field.double
fetchDoubleField(int field)
Return the value of the given field.float
fetchFloatField(int field)
Return the value of the given field.int
fetchIntField(int field)
Return the value of the given field.long
fetchLongField(int field)
Return the value of the given field.java.lang.Object
fetchObjectField(int field)
Return the value of the given field.short
fetchShortField(int field)
Return the value of the given field.java.lang.String
fetchStringField(int field)
Return the value of the given field.static org.apache.openjpa.kernel.ClearFieldManager
getInstance()
PersistenceCapable
getState()
Return the persistence capable copy holding the rollback field values.java.util.BitSet
getUnloaded()
Return the currently-loaded fields that will be unloaded after rollback.boolean
isFieldEqual(int field, java.lang.Object current)
Compare the given field.boolean
restoreField(int field)
Restore the given field.boolean
saveField(int field)
Save the given field.void
storeBooleanField(int field, boolean curVal)
Set the value of the given field.void
storeByteField(int field, byte curVal)
Set the value of the given field.void
storeCharField(int field, char curVal)
Set the value of the given field.void
storeDoubleField(int field, double curVal)
Set the value of the given field.void
storeFloatField(int field, float curVal)
Set the value of the given field.void
storeIntField(int field, int curVal)
Set the value of the given field.void
storeLongField(int field, long curVal)
Set the value of the given field.void
storeObjectField(int field, java.lang.Object curVal)
Set the value of the given field.void
storeShortField(int field, short curVal)
Set the value of the given field.void
storeStringField(int field, java.lang.String curVal)
Set the value of the given field.
-
-
-
Method Detail
-
getState
public PersistenceCapable getState()
Return the persistence capable copy holding the rollback field values.
-
getUnloaded
public java.util.BitSet getUnloaded()
Return the currently-loaded fields that will be unloaded after rollback.
-
saveField
public boolean saveField(int field)
Save the given field. If this method returns true, then you need to use this field manager to replace the given field in the instance returned bygetState()
.
-
restoreField
public boolean restoreField(int field)
Restore the given field. If this method returns true, then you need to use this field manager to replace the given field in the state manager's instance.
-
isFieldEqual
public boolean isFieldEqual(int field, java.lang.Object current)
Compare the given field.- Returns:
true
if the field is the same in the current state and in the saved state; otherwise,false
.
-
fetchObjectField
public java.lang.Object fetchObjectField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchObjectField
in interfaceFieldSupplier
-
storeObjectField
public void storeObjectField(int field, java.lang.Object curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeObjectField
in interfaceFieldConsumer
-
getInstance
public static org.apache.openjpa.kernel.ClearFieldManager getInstance()
-
fetchBooleanField
public boolean fetchBooleanField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchBooleanField
in interfaceFieldSupplier
-
fetchByteField
public byte fetchByteField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchByteField
in interfaceFieldSupplier
-
fetchCharField
public char fetchCharField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchCharField
in interfaceFieldSupplier
-
fetchDoubleField
public double fetchDoubleField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchDoubleField
in interfaceFieldSupplier
-
fetchFloatField
public float fetchFloatField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchFloatField
in interfaceFieldSupplier
-
fetchIntField
public int fetchIntField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchIntField
in interfaceFieldSupplier
-
fetchLongField
public long fetchLongField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchLongField
in interfaceFieldSupplier
-
fetchShortField
public short fetchShortField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchShortField
in interfaceFieldSupplier
-
fetchStringField
public java.lang.String fetchStringField(int field)
Description copied from interface:FieldSupplier
Return the value of the given field.- Specified by:
fetchStringField
in interfaceFieldSupplier
-
storeBooleanField
public void storeBooleanField(int field, boolean curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeBooleanField
in interfaceFieldConsumer
-
storeByteField
public void storeByteField(int field, byte curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeByteField
in interfaceFieldConsumer
-
storeCharField
public void storeCharField(int field, char curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeCharField
in interfaceFieldConsumer
-
storeDoubleField
public void storeDoubleField(int field, double curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeDoubleField
in interfaceFieldConsumer
-
storeFloatField
public void storeFloatField(int field, float curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeFloatField
in interfaceFieldConsumer
-
storeIntField
public void storeIntField(int field, int curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeIntField
in interfaceFieldConsumer
-
storeLongField
public void storeLongField(int field, long curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeLongField
in interfaceFieldConsumer
-
storeShortField
public void storeShortField(int field, short curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeShortField
in interfaceFieldConsumer
-
storeStringField
public void storeStringField(int field, java.lang.String curVal)
Description copied from interface:FieldConsumer
Set the value of the given field.- Specified by:
storeStringField
in interfaceFieldConsumer
-
-