Package org.apache.openjpa.kernel
Class SaveFieldManager
java.lang.Object
org.apache.openjpa.kernel.SaveFieldManager
- All Implemented Interfaces:
Serializable,FieldConsumer,FieldManager,FieldSupplier
FieldManager type used to store information for rollback.
- Author:
- Abe White
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanfetchBooleanField(int field) Return the value of the given field.bytefetchByteField(int field) Return the value of the given field.charfetchCharField(int field) Return the value of the given field.doublefetchDoubleField(int field) Return the value of the given field.floatfetchFloatField(int field) Return the value of the given field.intfetchIntField(int field) Return the value of the given field.longfetchLongField(int field) Return the value of the given field.fetchObjectField(int field) Return the value of the given field.shortfetchShortField(int field) Return the value of the given field.fetchStringField(int field) Return the value of the given field.static org.apache.openjpa.kernel.ClearFieldManagergetState()Return the persistence capable copy holding the rollback field values.Return the currently-loaded fields that will be unloaded after rollback.booleanisFieldEqual(int field, Object current) Compare the given field.booleanrestoreField(int field) Restore the given field.booleansaveField(int field) Save the given field.voidstoreBooleanField(int field, boolean curVal) Set the value of the given field.voidstoreByteField(int field, byte curVal) Set the value of the given field.voidstoreCharField(int field, char curVal) Set the value of the given field.voidstoreDoubleField(int field, double curVal) Set the value of the given field.voidstoreFloatField(int field, float curVal) Set the value of the given field.voidstoreIntField(int field, int curVal) Set the value of the given field.voidstoreLongField(int field, long curVal) Set the value of the given field.voidstoreObjectField(int field, Object curVal) Set the value of the given field.voidstoreShortField(int field, short curVal) Set the value of the given field.voidstoreStringField(int field, String curVal) Set the value of the given field.
-
Method Details
-
getState
Return the persistence capable copy holding the rollback field values. -
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
Compare the given field.- Returns:
trueif the field is the same in the current state and in the saved state; otherwise,false.
-
fetchObjectField
Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchObjectFieldin interfaceFieldSupplier
-
storeObjectField
Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeObjectFieldin interfaceFieldConsumer
-
getInstance
public static org.apache.openjpa.kernel.ClearFieldManager getInstance() -
fetchBooleanField
public boolean fetchBooleanField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchBooleanFieldin interfaceFieldSupplier
-
fetchByteField
public byte fetchByteField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchByteFieldin interfaceFieldSupplier
-
fetchCharField
public char fetchCharField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchCharFieldin interfaceFieldSupplier
-
fetchDoubleField
public double fetchDoubleField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchDoubleFieldin interfaceFieldSupplier
-
fetchFloatField
public float fetchFloatField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchFloatFieldin interfaceFieldSupplier
-
fetchIntField
public int fetchIntField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchIntFieldin interfaceFieldSupplier
-
fetchLongField
public long fetchLongField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchLongFieldin interfaceFieldSupplier
-
fetchShortField
public short fetchShortField(int field) Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchShortFieldin interfaceFieldSupplier
-
fetchStringField
Description copied from interface:FieldSupplierReturn the value of the given field.- Specified by:
fetchStringFieldin interfaceFieldSupplier
-
storeBooleanField
public void storeBooleanField(int field, boolean curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeBooleanFieldin interfaceFieldConsumer
-
storeByteField
public void storeByteField(int field, byte curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeByteFieldin interfaceFieldConsumer
-
storeCharField
public void storeCharField(int field, char curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeCharFieldin interfaceFieldConsumer
-
storeDoubleField
public void storeDoubleField(int field, double curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeDoubleFieldin interfaceFieldConsumer
-
storeFloatField
public void storeFloatField(int field, float curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeFloatFieldin interfaceFieldConsumer
-
storeIntField
public void storeIntField(int field, int curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeIntFieldin interfaceFieldConsumer
-
storeLongField
public void storeLongField(int field, long curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeLongFieldin interfaceFieldConsumer
-
storeShortField
public void storeShortField(int field, short curVal) Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeShortFieldin interfaceFieldConsumer
-
storeStringField
Description copied from interface:FieldConsumerSet the value of the given field.- Specified by:
storeStringFieldin interfaceFieldConsumer
-