SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.runtime
Class StateManagerImpl

java.lang.Object
  |
  +--com.solarmetric.kodo.runtime.FieldManager
        |
        +--com.solarmetric.kodo.runtime.StateManagerImpl
All Implemented Interfaces:
PersistenceCapable.ObjectIdFieldConsumer, PersistenceCapable.ObjectIdFieldManager, PersistenceCapable.ObjectIdFieldSupplier, StateManager

public class StateManagerImpl
extends FieldManager
implements StateManager

Implementation of the StateManager interface for use with this runtime. Each StateManager manages the state of a single PersistenceCapable instance. The StateManager is also responsible for all communications about the instance to the StoreManager.

The StateManager uses the State pattern in both its interaction with the governed instance and its interaction with the PersistenceManager. In its interactions with the PersistenceCapable instance, it uses the FieldManager interface. Similarly, when interacting with the PersistenceManager, it uses the JDOState singleton that represents the current lifecycle state of the instance.


Field Summary
(package private) static org.apache.commons.logging.Log _log
           
(package private)  ClassMetaData meta
          The metadata for the managed type.
(package private)  Object oid
          The object ID of the instance.
(package private)  PersistenceCapable pc
          The PersistenceCapable instance managed by this StateManager.
(package private)  PersistenceManagerImpl pm
          The owning PersistenceManagerImpl.
 
Constructor Summary
(package private) StateManagerImpl(Object oid, ClassMetaData meta, PersistenceManagerImpl pm)
          Construct a StateManager for the instance with the given oid.
 
Method Summary
(package private)  void beforeCommit()
          Delegates to the current JDO State.
(package private)  void beforeFlush()
          Delegates to the current JDO State.
(package private)  void clearFields()
          Calls the InstanceCallbacks.jdoPreClear() method on the instance, clears all managed fields, and calls the setLoaded(boolean) method with a value of false.
(package private)  void clearSavedFields()
          Notification that the state will not need to be rolled back to that of the last call to saveFields().
(package private)  void commit()
          Delegates to the current JDO state after checking the value of the retainValues flag.
(package private)  void deletePersistent()
          Delegates to the current JDO state.
(package private)  void evict()
          Delegates to the current JDO state.
 boolean fetchBooleanField(int field)
           
 byte fetchByteField(int field)
           
 char fetchCharField(int field)
           
 double fetchDoubleField(int field)
           
 float fetchFloatField(int field)
           
 int fetchIntField(int field)
           
 long fetchLongField(int field)
           
 Object fetchObjectField(int field)
           
 short fetchShortField(int field)
           
 String fetchStringField(int field)
           
 void flushCompleted(boolean forCommit)
          Marks this state manager as having been flushed.
 boolean getBooleanField(PersistenceCapable pc, int field, boolean curVal)
           
 byte getByteField(PersistenceCapable pc, int field, byte curVal)
           
 char getCharField(PersistenceCapable pc, int field, char curVal)
           
 BitSet getDirty()
          Return which fields are dirty; should not be modified.
 double getDoubleField(PersistenceCapable pc, int field, double curVal)
           
 float getFloatField(PersistenceCapable pc, int field, float curVal)
           
 BitSet getFlushed()
          Return which fields are flushed; should not be modified.
 Object getImplData(Object key)
          Return the associated implementation object for the given key, if any.
 Object getIntermediate(int field)
          Intermediate data stored before the field is loaded.
 int getIntField(PersistenceCapable pc, int field, int curVal)
           
 JDOState getJDOState()
          Return the JDO state that this object is in.
 BitSet getLoaded()
          Return which fields are loaded; should not be modified.
 long getLongField(PersistenceCapable pc, int field, long curVal)
           
 ClassMetaData getMetaData()
          Return the metadata for the managed type.
 Object getNextVersion()
          Return the pending version indicator after successful commit.
 BitSet getNonFlushedDirtyFields()
          Return which fields have been modified since the last flush.
 Object getObjectField(PersistenceCapable pc, int field, Object curVal)
           
 Object getObjectId(PersistenceCapable pc)
           
 Object getOid()
          Return the object ID of the instance.
 PersistenceCapable getPersistenceCapable()
          Return the PersistenceCapable instance managed by this StateManager.
 PersistenceManagerImpl getPersistenceManager()
          Return the owning PersistenceManagerImpl.
 PersistenceManager getPersistenceManager(PersistenceCapable pc)
           
 short getShortField(PersistenceCapable pc, int field, short curVal)
           
 String getStringField(PersistenceCapable pc, int field, String curVal)
           
 Object getTransactionalObjectId(PersistenceCapable pc)
           
 Object getVersion()
          Return the current version indicator.
 void initialize(PersistenceCapable pc, JDOState state)
          Initialize this state manager with the managed persistence capable object and the proper JDO lifecycle state.
 boolean isDeleted(PersistenceCapable pc)
           
 boolean isDirty(PersistenceCapable pc)
           
 boolean isLoaded(PersistenceCapable pc, int field)
           
 boolean isNew(PersistenceCapable pc)
           
 boolean isPersistent(PersistenceCapable pc)
           
 boolean isTransactional(PersistenceCapable pc)
           
(package private)  boolean loadInitialState(JDOState state, Object conn)
          Load the initial state and set the managed instance from the StoreManager.
 void makeDirty(PersistenceCapable pc, String field)
           
(package private)  void makeNontransactional()
          Delegates to the current JDO state.
(package private)  void makePersistent()
          Delegates to the current JDO state.
(package private)  void makeTransactional()
          Delegates to the current JDO state.
(package private)  void makeTransient()
          Delegates to the current JDO state.
 void markFlushed(BitSet fields)
          Marks all fields in fields as flushed.
 void markFlushed(boolean forCommit)
          Marks all fields in this object as as flushed.
 void markFlushed(int field)
          Marks field as flushed.
(package private)  void preDelete()
          Cascade deletes to all dependent fields.
(package private)  void preFlush()
          Persists all first class object fields, and checks for illegal null values.
 void preSerialize(PersistenceCapable pc)
           
(package private)  void preStore()
          Invokes InstanceCallbacks.jdoPreStore(), if implemented.
 void providedBooleanField(PersistenceCapable pc, int field, boolean curVal)
           
 void providedByteField(PersistenceCapable pc, int field, byte curVal)
           
 void providedCharField(PersistenceCapable pc, int field, char curVal)
           
 void providedDoubleField(PersistenceCapable pc, int field, double curVal)
           
 void providedFloatField(PersistenceCapable pc, int field, float curVal)
           
 void providedIntField(PersistenceCapable pc, int field, int curVal)
           
 void providedLongField(PersistenceCapable pc, int field, long curVal)
           
 void providedObjectField(PersistenceCapable pc, int field, Object curVal)
           
 void providedShortField(PersistenceCapable pc, int field, short curVal)
           
 void providedStringField(PersistenceCapable pc, int field, String curVal)
           
 Object proxy(FieldMetaData fmd, Object val)
          Proxy the given field if needed.
 Object queryField(String field)
          Return the value of the named field for use in a query.
(package private)  void refresh()
          Refreshes the state of the instance with data from the data store.
 void removeImplData(Object key)
          Remove the given key from the store of implementation-specific data.
(package private)  void replaceFlags(byte flags)
          Replaces the JDO flags of the managed instance with the given value.
(package private)  void replaceSecondClassObjectFields()
          Replaces all second class object fields with fresh proxied instances containing the same information as the originals.
 boolean replacingBooleanField(PersistenceCapable pc, int field)
           
 byte replacingByteField(PersistenceCapable pc, int field)
           
 char replacingCharField(PersistenceCapable pc, int field)
           
 double replacingDoubleField(PersistenceCapable pc, int field)
           
 byte replacingFlags(PersistenceCapable pc)
           
 float replacingFloatField(PersistenceCapable pc, int field)
           
 int replacingIntField(PersistenceCapable pc, int field)
           
 long replacingLongField(PersistenceCapable pc, int field)
           
 Object replacingObjectField(PersistenceCapable pc, int field)
           
 short replacingShortField(PersistenceCapable pc, int field)
           
 StateManager replacingStateManager(PersistenceCapable pc, StateManager sm)
           
 String replacingStringField(PersistenceCapable pc, int field)
           
(package private)  void retrieve()
          Retrives all unloaded persistent state of the instance from the data store.
(package private)  void rollback()
          Delegates to the current JDO state after checking the value of the retainValues flag.
(package private)  void rollbackFields()
          Rollback the state of the instance to the saved state from the last call to saveFields(), or to default values if never saved.
(package private)  void saveFields()
          If the fields aren't already saved, saves the currently loaded field state of the instance, along with the array of currently loaded field numbers and the current JDO flags.
 void setBooleanField(PersistenceCapable pc, int field, boolean curVal, boolean newVal)
           
 void setByteField(PersistenceCapable pc, int field, byte curVal, byte newVal)
           
 void setCharField(PersistenceCapable pc, int field, char curVal, char newVal)
           
(package private)  void setDirty(boolean val)
          Records that all instance fields are/are not dirty, and changes the JDO flags of the instance accordingly.
 void setDoubleField(PersistenceCapable pc, int field, double curVal, double newVal)
           
 void setFloatField(PersistenceCapable pc, int field, float curVal, float newVal)
           
 void setImplData(Object key, Object value)
          This method is provided to the concrete JDO implementation to allow the association of arbitrary extra data with an instance.
 void setIntermediate(int field, Object val)
          Intermediate data stored before the field is loaded.
 void setIntField(PersistenceCapable pc, int field, int curVal, int newVal)
           
(package private)  void setJDOState(JDOState state, Object conn)
          Set or reset the lifecycle state of the managed instance.
(package private)  void setLoaded(boolean val)
          Records that all instance fields are/are not loaded, and changes the JDO flags of the instance accordingly.
 void setLongField(PersistenceCapable pc, int field, long curVal, long newVal)
           
 void setNextVersion(Object version)
          Set the version indicator that this object should have after successful commit.
 void setObjectField(PersistenceCapable pc, int field, Object curVal, Object newVal)
           
 void setShortField(PersistenceCapable pc, int field, short curVal, short newVal)
           
 void setStringField(PersistenceCapable pc, int field, String curVal, String newVal)
           
 void setVersion(Object version)
          Set the current version indicator.
 void storeBooleanField(int field, boolean curVal)
           
 void storeByteField(int field, byte curVal)
           
 void storeCharField(int field, char curVal)
           
 void storeDoubleField(int field, double curVal)
           
 void storeFloatField(int field, float curVal)
           
 void storeIntField(int field, int curVal)
           
 void storeLongField(int field, long curVal)
           
 void storeObjectField(int field, Object curVal)
           
 void storeShortField(int field, short curVal)
           
 void storeStringField(int field, String curVal)
           
(package private)  void updateObjectId()
          Update the object id to the latest pk values.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

static final org.apache.commons.logging.Log _log

pc

PersistenceCapable pc
The PersistenceCapable instance managed by this StateManager.

pm

PersistenceManagerImpl pm
The owning PersistenceManagerImpl.

oid

Object oid
The object ID of the instance.

meta

ClassMetaData meta
The metadata for the managed type.
Constructor Detail

StateManagerImpl

StateManagerImpl(Object oid,
                 ClassMetaData meta,
                 PersistenceManagerImpl pm)
Construct a StateManager for the instance with the given oid.
Method Detail

getPersistenceCapable

public final PersistenceCapable getPersistenceCapable()
Return the PersistenceCapable instance managed by this StateManager.

getPersistenceManager

public final PersistenceManagerImpl getPersistenceManager()
Return the owning PersistenceManagerImpl.

getOid

public final Object getOid()
Return the object ID of the instance.

getMetaData

public final ClassMetaData getMetaData()
Return the metadata for the managed type.

getLoaded

public final BitSet getLoaded()
Return which fields are loaded; should not be modified.

getDirty

public final BitSet getDirty()

Return which fields are dirty; should not be modified. The returned BitSet identifies which fields in this object have been modified since the beginning of the transaction. Care should be taken not to confuse this method with getNonFlushedDirtyFields(), which returns just those fields that have been modified since the last flush.


getNonFlushedDirtyFields

public final BitSet getNonFlushedDirtyFields()

Return which fields have been modified since the last flush. If any field in the default fetch group has been modified (if the jdoState of this object is READ_WRITE_OK), then all the dfg fields will be flushed.


getFlushed

public final BitSet getFlushed()
Return which fields are flushed; should not be modified.

loadInitialState

boolean loadInitialState(JDOState state,
                         Object conn)
Load the initial state and set the managed instance from the StoreManager.
Parameters:
state - the JDO state to initialize with
conn - the connection information given to the pm, if any

initialize

public void initialize(PersistenceCapable pc,
                       JDOState state)
Initialize this state manager with the managed persistence capable object and the proper JDO lifecycle state.

getVersion

public Object getVersion()
Return the current version indicator.

setVersion

public void setVersion(Object version)
Set the current version indicator. This method is used by the StoreManager during load to initialize version information. It represents the current version in the database of this row.

getNextVersion

public Object getNextVersion()
Return the pending version indicator after successful commit. This pending version will be the same as the current version prior to flush.

setNextVersion

public void setNextVersion(Object version)
Set the version indicator that this object should have after successful commit. The StoreManager is responsible for calling this method during flush. This will be the same as the current version for newly created objects.

getJDOState

public JDOState getJDOState()
Return the JDO state that this object is in.

setJDOState

void setJDOState(JDOState state,
                 Object conn)
Set or reset the lifecycle state of the managed instance. If the transactional state of the instance changes, it will be enlisted/ delisted from the current transaction as necessary. The given state will be initialized after being set. If the given state is the same as the current state, this method will have no effect.

getImplData

public Object getImplData(Object key)
Return the associated implementation object for the given key, if any.

removeImplData

public void removeImplData(Object key)
Remove the given key from the store of implementation-specific data.

setImplData

public void setImplData(Object key,
                        Object value)
This method is provided to the concrete JDO implementation to allow the association of arbitrary extra data with an instance.

getIntermediate

public Object getIntermediate(int field)
Intermediate data stored before the field is loaded. This data is cleared on field load.

setIntermediate

public void setIntermediate(int field,
                            Object val)
Intermediate data stored before the field is loaded. This data is cleared on field load.

queryField

public Object queryField(String field)
Return the value of the named field for use in a query. This method will cause state transitions to occur as if the field were accessed normally.

markFlushed

public void markFlushed(int field)

Marks field as flushed. StoreManager implementations that return true from StoreManager.handlesMarkingFlushedFields() should use this use one of the markFlushed methods to do so.

If a StoreManager implementation uses this method (as opposed to #markFlushed(), then it is important that the implementation invoke flushCompleted(boolean) once all dirty fields in the object have been successfully flushed.


markFlushed

public void markFlushed(boolean forCommit)

Marks all fields in this object as as flushed. StoreManager implementations that return true from StoreManager.handlesMarkingFlushedFields() should use one of the markFlushed methods to do so.

This method invokes flushCompleted(boolean) automatically.


markFlushed

public void markFlushed(BitSet fields)

Marks all fields in fields as flushed. StoreManager implementations that return true from StoreManager.handlesMarkingFlushedFields() should use this use one of the markFlushed methods to do so.

If a StoreManager implementation uses this method (as opposed to #markFlushed(), then it is important that the implementation invoke flushCompleted(boolean) once all dirty fields in the object have been successfully flushed.


beforeFlush

void beforeFlush()
Delegates to the current JDO State.
See Also:
JDOState.beforeFlush(com.solarmetric.kodo.runtime.StateManagerImpl)

flushCompleted

public void flushCompleted(boolean forCommit)
Marks this state manager as having been flushed. This should be invoked after incrementally flushing all the unflushed fields in an object, and should be used in conjunction with the markFlushed(java.util.BitSet) or markFlushed(int) methods. It is not necessary to invoke this after marking all fields as flushed using the #markFlushed() method.

beforeCommit

void beforeCommit()
Delegates to the current JDO State.
See Also:
JDOState.beforeCommit(com.solarmetric.kodo.runtime.StateManagerImpl)

commit

void commit()
Delegates to the current JDO state after checking the value of the retainValues flag.
See Also:
JDOState.commit(com.solarmetric.kodo.runtime.StateManagerImpl), JDOState.commitRetain(com.solarmetric.kodo.runtime.StateManagerImpl)

rollback

void rollback()
Delegates to the current JDO state after checking the value of the retainValues flag.
See Also:
JDOState.rollback(com.solarmetric.kodo.runtime.StateManagerImpl), JDOState.rollbackRetain(com.solarmetric.kodo.runtime.StateManagerImpl)

makePersistent

void makePersistent()
Delegates to the current JDO state.
See Also:
JDOState.makePersistent(com.solarmetric.kodo.runtime.StateManagerImpl), PersistenceManager.makePersistent(java.lang.Object)

deletePersistent

void deletePersistent()
Delegates to the current JDO state.
See Also:
JDOState.deletePersistent(com.solarmetric.kodo.runtime.StateManagerImpl), PersistenceManager.deletePersistent(java.lang.Object)

makeNontransactional

void makeNontransactional()
Delegates to the current JDO state.
See Also:
JDOState.makeNontransactional(com.solarmetric.kodo.runtime.StateManagerImpl), PersistenceManager.makeNontransactional(java.lang.Object)

makeTransactional

void makeTransactional()
Delegates to the current JDO state.
See Also:
JDOState.makeTransactional(com.solarmetric.kodo.runtime.StateManagerImpl), PersistenceManager.makeTransactional(java.lang.Object)

makeTransient

void makeTransient()
Delegates to the current JDO state.
See Also:
JDOState.makeTransient(com.solarmetric.kodo.runtime.StateManagerImpl), PersistenceManager.makeTransient(java.lang.Object)

evict

void evict()
Delegates to the current JDO state.
See Also:
JDOState.evict(com.solarmetric.kodo.runtime.StateManagerImpl), PersistenceManager.evict(java.lang.Object)

refresh

void refresh()
Refreshes the state of the instance with data from the data store.
See Also:
PersistenceManager.refresh(java.lang.Object)

retrieve

void retrieve()
Retrives all unloaded persistent state of the instance from the data store.
See Also:
PersistenceManager.retrieve(java.lang.Object)

preSerialize

public void preSerialize(PersistenceCapable pc)
Specified by:
preSerialize in interface StateManager

isTransactional

public boolean isTransactional(PersistenceCapable pc)
Specified by:
isTransactional in interface StateManager

isPersistent

public boolean isPersistent(PersistenceCapable pc)
Specified by:
isPersistent in interface StateManager

isNew

public boolean isNew(PersistenceCapable pc)
Specified by:
isNew in interface StateManager

isDeleted

public boolean isDeleted(PersistenceCapable pc)
Specified by:
isDeleted in interface StateManager

isDirty

public boolean isDirty(PersistenceCapable pc)
Specified by:
isDirty in interface StateManager

getPersistenceManager

public PersistenceManager getPersistenceManager(PersistenceCapable pc)
Specified by:
getPersistenceManager in interface StateManager

getObjectId

public Object getObjectId(PersistenceCapable pc)
Specified by:
getObjectId in interface StateManager

getTransactionalObjectId

public Object getTransactionalObjectId(PersistenceCapable pc)
Specified by:
getTransactionalObjectId in interface StateManager

replacingFlags

public final byte replacingFlags(PersistenceCapable pc)
Specified by:
replacingFlags in interface StateManager

replacingStateManager

public StateManager replacingStateManager(PersistenceCapable pc,
                                          StateManager sm)
Specified by:
replacingStateManager in interface StateManager

isLoaded

public boolean isLoaded(PersistenceCapable pc,
                        int field)
Specified by:
isLoaded in interface StateManager

makeDirty

public void makeDirty(PersistenceCapable pc,
                      String field)
Specified by:
makeDirty in interface StateManager

getBooleanField

public boolean getBooleanField(PersistenceCapable pc,
                               int field,
                               boolean curVal)
Specified by:
getBooleanField in interface StateManager

getByteField

public byte getByteField(PersistenceCapable pc,
                         int field,
                         byte curVal)
Specified by:
getByteField in interface StateManager

getCharField

public char getCharField(PersistenceCapable pc,
                         int field,
                         char curVal)
Specified by:
getCharField in interface StateManager

getDoubleField

public double getDoubleField(PersistenceCapable pc,
                             int field,
                             double curVal)
Specified by:
getDoubleField in interface StateManager

getFloatField

public float getFloatField(PersistenceCapable pc,
                           int field,
                           float curVal)
Specified by:
getFloatField in interface StateManager

getIntField

public int getIntField(PersistenceCapable pc,
                       int field,
                       int curVal)
Specified by:
getIntField in interface StateManager

getLongField

public long getLongField(PersistenceCapable pc,
                         int field,
                         long curVal)
Specified by:
getLongField in interface StateManager

getObjectField

public Object getObjectField(PersistenceCapable pc,
                             int field,
                             Object curVal)
Specified by:
getObjectField in interface StateManager

getShortField

public short getShortField(PersistenceCapable pc,
                           int field,
                           short curVal)
Specified by:
getShortField in interface StateManager

getStringField

public String getStringField(PersistenceCapable pc,
                             int field,
                             String curVal)
Specified by:
getStringField in interface StateManager

setBooleanField

public void setBooleanField(PersistenceCapable pc,
                            int field,
                            boolean curVal,
                            boolean newVal)
Specified by:
setBooleanField in interface StateManager

setByteField

public void setByteField(PersistenceCapable pc,
                         int field,
                         byte curVal,
                         byte newVal)
Specified by:
setByteField in interface StateManager

setCharField

public void setCharField(PersistenceCapable pc,
                         int field,
                         char curVal,
                         char newVal)
Specified by:
setCharField in interface StateManager

setDoubleField

public void setDoubleField(PersistenceCapable pc,
                           int field,
                           double curVal,
                           double newVal)
Specified by:
setDoubleField in interface StateManager

setFloatField

public void setFloatField(PersistenceCapable pc,
                          int field,
                          float curVal,
                          float newVal)
Specified by:
setFloatField in interface StateManager

setIntField

public void setIntField(PersistenceCapable pc,
                        int field,
                        int curVal,
                        int newVal)
Specified by:
setIntField in interface StateManager

setLongField

public void setLongField(PersistenceCapable pc,
                         int field,
                         long curVal,
                         long newVal)
Specified by:
setLongField in interface StateManager

setObjectField

public void setObjectField(PersistenceCapable pc,
                           int field,
                           Object curVal,
                           Object newVal)
Specified by:
setObjectField in interface StateManager

setShortField

public void setShortField(PersistenceCapable pc,
                          int field,
                          short curVal,
                          short newVal)
Specified by:
setShortField in interface StateManager

setStringField

public void setStringField(PersistenceCapable pc,
                           int field,
                           String curVal,
                           String newVal)
Specified by:
setStringField in interface StateManager

providedBooleanField

public void providedBooleanField(PersistenceCapable pc,
                                 int field,
                                 boolean curVal)
Specified by:
providedBooleanField in interface StateManager

providedByteField

public void providedByteField(PersistenceCapable pc,
                              int field,
                              byte curVal)
Specified by:
providedByteField in interface StateManager

providedCharField

public void providedCharField(PersistenceCapable pc,
                              int field,
                              char curVal)
Specified by:
providedCharField in interface StateManager

providedDoubleField

public void providedDoubleField(PersistenceCapable pc,
                                int field,
                                double curVal)
Specified by:
providedDoubleField in interface StateManager

providedFloatField

public void providedFloatField(PersistenceCapable pc,
                               int field,
                               float curVal)
Specified by:
providedFloatField in interface StateManager

providedIntField

public void providedIntField(PersistenceCapable pc,
                             int field,
                             int curVal)
Specified by:
providedIntField in interface StateManager

providedLongField

public void providedLongField(PersistenceCapable pc,
                              int field,
                              long curVal)
Specified by:
providedLongField in interface StateManager

providedObjectField

public void providedObjectField(PersistenceCapable pc,
                                int field,
                                Object curVal)
Specified by:
providedObjectField in interface StateManager

providedShortField

public void providedShortField(PersistenceCapable pc,
                               int field,
                               short curVal)
Specified by:
providedShortField in interface StateManager

providedStringField

public void providedStringField(PersistenceCapable pc,
                                int field,
                                String curVal)
Specified by:
providedStringField in interface StateManager

replacingBooleanField

public boolean replacingBooleanField(PersistenceCapable pc,
                                     int field)
Specified by:
replacingBooleanField in interface StateManager

replacingByteField

public byte replacingByteField(PersistenceCapable pc,
                               int field)
Specified by:
replacingByteField in interface StateManager

replacingCharField

public char replacingCharField(PersistenceCapable pc,
                               int field)
Specified by:
replacingCharField in interface StateManager

replacingDoubleField

public double replacingDoubleField(PersistenceCapable pc,
                                   int field)
Specified by:
replacingDoubleField in interface StateManager

replacingFloatField

public float replacingFloatField(PersistenceCapable pc,
                                 int field)
Specified by:
replacingFloatField in interface StateManager

replacingIntField

public int replacingIntField(PersistenceCapable pc,
                             int field)
Specified by:
replacingIntField in interface StateManager

replacingLongField

public long replacingLongField(PersistenceCapable pc,
                               int field)
Specified by:
replacingLongField in interface StateManager

replacingObjectField

public Object replacingObjectField(PersistenceCapable pc,
                                   int field)
Specified by:
replacingObjectField in interface StateManager

replacingShortField

public short replacingShortField(PersistenceCapable pc,
                                 int field)
Specified by:
replacingShortField in interface StateManager

replacingStringField

public String replacingStringField(PersistenceCapable pc,
                                   int field)
Specified by:
replacingStringField in interface StateManager

fetchBooleanField

public boolean fetchBooleanField(int field)
Overrides:
fetchBooleanField in class FieldManager

fetchByteField

public byte fetchByteField(int field)
Overrides:
fetchByteField in class FieldManager

fetchCharField

public char fetchCharField(int field)
Overrides:
fetchCharField in class FieldManager

fetchDoubleField

public double fetchDoubleField(int field)
Overrides:
fetchDoubleField in class FieldManager

fetchFloatField

public float fetchFloatField(int field)
Overrides:
fetchFloatField in class FieldManager

fetchIntField

public int fetchIntField(int field)
Overrides:
fetchIntField in class FieldManager

fetchLongField

public long fetchLongField(int field)
Overrides:
fetchLongField in class FieldManager

fetchObjectField

public Object fetchObjectField(int field)
Overrides:
fetchObjectField in class FieldManager

fetchShortField

public short fetchShortField(int field)
Overrides:
fetchShortField in class FieldManager

fetchStringField

public String fetchStringField(int field)
Overrides:
fetchStringField in class FieldManager

storeBooleanField

public void storeBooleanField(int field,
                              boolean curVal)
Overrides:
storeBooleanField in class FieldManager

storeByteField

public void storeByteField(int field,
                           byte curVal)
Overrides:
storeByteField in class FieldManager

storeCharField

public void storeCharField(int field,
                           char curVal)
Overrides:
storeCharField in class FieldManager

storeDoubleField

public void storeDoubleField(int field,
                             double curVal)
Overrides:
storeDoubleField in class FieldManager

storeFloatField

public void storeFloatField(int field,
                            float curVal)
Overrides:
storeFloatField in class FieldManager

storeIntField

public void storeIntField(int field,
                          int curVal)
Overrides:
storeIntField in class FieldManager

storeLongField

public void storeLongField(int field,
                           long curVal)
Overrides:
storeLongField in class FieldManager

storeObjectField

public void storeObjectField(int field,
                             Object curVal)
Overrides:
storeObjectField in class FieldManager

storeShortField

public void storeShortField(int field,
                            short curVal)
Overrides:
storeShortField in class FieldManager

storeStringField

public void storeStringField(int field,
                             String curVal)
Overrides:
storeStringField in class FieldManager

proxy

public Object proxy(FieldMetaData fmd,
                    Object val)
Proxy the given field if needed.

setLoaded

void setLoaded(boolean val)
Records that all instance fields are/are not loaded, and changes the JDO flags of the instance accordingly. Primary key and non-persistent fields are not affected.

setDirty

void setDirty(boolean val)
Records that all instance fields are/are not dirty, and changes the JDO flags of the instance accordingly.

clearFields

void clearFields()
Calls the InstanceCallbacks.jdoPreClear() method on the instance, clears all managed fields, and calls the setLoaded(boolean) method with a value of false. Primary key fields are not cleared.

saveFields

void saveFields()
If the fields aren't already saved, saves the currently loaded field state of the instance, along with the array of currently loaded field numbers and the current JDO flags. These values can then all be restored with a subsequent call to rollbackFields().

clearSavedFields

void clearSavedFields()
Notification that the state will not need to be rolled back to that of the last call to saveFields().

rollbackFields

void rollbackFields()
Rollback the state of the instance to the saved state from the last call to saveFields(), or to default values if never saved.

updateObjectId

void updateObjectId()
Update the object id to the latest pk values.

preFlush

void preFlush()
Persists all first class object fields, and checks for illegal null values.

preStore

void preStore()
Invokes InstanceCallbacks.jdoPreStore(), if implemented.

preDelete

void preDelete()
Cascade deletes to all dependent fields.

replaceSecondClassObjectFields

void replaceSecondClassObjectFields()
Replaces all second class object fields with fresh proxied instances containing the same information as the originals.

replaceFlags

void replaceFlags(byte flags)
Replaces the JDO flags of the managed instance with the given value.

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.