| java.lang.Object com.triactive.jdo.state.StateManagerImpl
Constructor Summary | |
public | StateManagerImpl(PersistenceManager pm, PersistenceCapable pc) Constructs a state manager to manage an existing persistence-capable
instance that is not persistent. | public | StateManagerImpl(PersistenceManager pm, Class pcClass, Object id) Constructs a state manager to manage a new, hollow instance having the
given object ID.
This constructor is used for creating new instances of existing
persistent objects (i.e. |
Method Summary | |
void | clearPersistentFields() | public void | deletePersistent() Deletes the instance. | void | discardSavedFields() | void | disconnect() | public void | dump(PrintWriter out) | void | enlistInTransaction() | public void | evict() | void | evictFromTransaction() | public void | flush() Flushes any dirty fields to the data store.
Note that "dirty" in this case is not equated to being in the P_DIRTY
state. | public boolean | getBooleanField(PersistenceCapable pc, int field, boolean currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public byte | getByteField(PersistenceCapable pc, int field, byte currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public char | getCharField(PersistenceCapable pc, int field, char currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public double | getDoubleField(PersistenceCapable pc, int field, double currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public Object | getField(int field) Reads the current value of the specified field.
This has the same effect on the state of the instance as if user code
attempted to read the field.
Parameters: field - The field number to read.The value of the field. | public float | getFloatField(PersistenceCapable pc, int field, float currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public int | getIntField(PersistenceCapable pc, int field, int currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public long | getLongField(PersistenceCapable pc, int field, long currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public PersistenceCapable | getObject() | public Object | getObjectField(PersistenceCapable pc, int field, Object currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public Object | getObjectId() | public Object | getObjectId(PersistenceCapable pc) Return the object representing the JDO identity of the calling instance. | public javax.jdo.PersistenceManager | getPersistenceManager(PersistenceCapable pc) Return the PersistenceManager that owns this instance. | public PersistenceManager | getPersistenceManager() | public short | getShortField(PersistenceCapable pc, int field, short currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public StoreManager | getStoreManager() | public String | getStringField(PersistenceCapable pc, int field, String currentValue) This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). | public Object | getTransactionalObjectId(PersistenceCapable pc) Return the object representing the JDO identity
of the calling instance. | public boolean | isDeleted(PersistenceCapable pc) Tests whether this object has been deleted. | public boolean | isDirty(PersistenceCapable pc) Tests whether this object is dirty. | public boolean | isLoaded(PersistenceCapable pc, int field) Return true if the field is cached in the calling instance.
In the TriActive implementation of this method, isLoaded() will always
return true. | public boolean | isNew(PersistenceCapable pc) Tests whether this object has been newly made persistent. | public boolean | isPersistent(PersistenceCapable pc) Tests whether this object is persistent. | public boolean | isTransactional(PersistenceCapable pc) Tests whether this object is transactional.
Instances that respect transaction boundaries return true. | void | loadDFGFields() Fetchs from the database all fields in the default fetch group not
already loaded. | void | loadUnloadedFields() Fetchs from the database all fields not currently loaded. | public void | makeDirty(int field) Marks the given field dirty. | public void | makeDirty(PersistenceCapable pc, String fieldName) Mark the associated PersistenceCapable field dirty. | public void | makeNontransactional() | public boolean | makePersistent() Makes the instance persistent. | public void | makeTransactional() | public void | makeTransient() | public void | offerPrefetchedFields(int[] fieldNumbers, FieldManager fieldManager) Offers the specified pre-fetched fields to the state manager. | public void | postCommit() | void | preDelete() | public void | preRollback() This method is invoked when a rollback is performed in a Transaction
involving the PersistenceCapable managed by this StateManager. | public void | preSerialize(PersistenceCapable pc) Guarantee that the serializable transactional and persistent fields
are loaded into the instance. | public synchronized void | provideFields(int fieldNumbers, FieldManager fm) Called from the StoreManager after StoreManager.update() is called to obtain
updated values from the PersistenceCapable associated with this StateManager.
Parameters: fieldNumbers - An array of field numbers to be updated by the Store Parameters: fm - The updated values are stored in this object. | public void | providedBooleanField(PersistenceCapable pc, int field, boolean currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedByteField(PersistenceCapable pc, int field, byte currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedCharField(PersistenceCapable pc, int field, char currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedDoubleField(PersistenceCapable pc, int field, double currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedFloatField(PersistenceCapable pc, int field, float currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedIntField(PersistenceCapable pc, int field, int currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedLongField(PersistenceCapable pc, int field, long currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedObjectField(PersistenceCapable pc, int field, Object currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedShortField(PersistenceCapable pc, int field, short currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | providedStringField(PersistenceCapable pc, int field, String currentValue) This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. | public void | refresh() | void | refreshLoadedFields() Refreshes from the database all fields currently loaded. | public synchronized void | replaceFields(int fieldNumbers, FieldManager fm) Called to refresh data in the PersistenceCapable object associated with
this StateManager.
Unwrapped values for SCO fields are wrapped with an appropriate SCO
wrapper object.
Parameters: fieldNumbers - An array of field numbers to be refreshed. Parameters: fm - Provides the updated values. | void | replaceSCOFields() Passes all SCO field values through replaceFields(), which will wrap any
unwrapped values with an appropriate SCO wrapper. | public boolean | replacingBooleanField(PersistenceCapable pc, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a boolean field. | public byte | replacingByteField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a byte field. | public char | replacingCharField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a char field. | public double | replacingDoubleField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a double field. | public byte | replacingFlags(PersistenceCapable pc) The StateManager uses this method to supply the value of jdoFlags to the
associated PersistenceCapable instance. | public float | replacingFloatField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a float field. | public int | replacingIntField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a int field. | public long | replacingLongField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a long field. | public Object | replacingObjectField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of an Object field. | public short | replacingShortField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a short field. | public StateManager | replacingStateManager(PersistenceCapable pc, StateManager sm) Replace the current value of jdoStateManager.
This method is called by the PersistenceCapable whenever
jdoReplaceStateManager is called and there is already
an owning StateManager. | public String | replacingStringField(PersistenceCapable obj, int field) This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a String field. | void | restoreFields() | public void | retrieve(boolean DFGOnly) | void | saveFields() | public void | setBooleanField(PersistenceCapable pc, int field, boolean currentValue, boolean newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setByteField(PersistenceCapable pc, int field, byte currentValue, byte newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setCharField(PersistenceCapable pc, int field, char currentValue, char newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setDoubleField(PersistenceCapable pc, int field, double currentValue, double newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setField(int field, Object currentValue, Object newValue) Updates the current value of the specified field.
This has the same effect on the state of the instance as if user code
attempted to write the field.
Parameters: field - The field number to write. Parameters: currentValue - The current value of the field. | public void | setFloatField(PersistenceCapable pc, int field, float currentValue, float newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setIntField(PersistenceCapable pc, int field, int currentValue, int newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setLongField(PersistenceCapable pc, int field, long currentValue, long newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setObjectField(PersistenceCapable pc, int field, Object currentValue, Object newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setShortField(PersistenceCapable pc, int field, short currentValue, short newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public void | setStringField(PersistenceCapable pc, int field, String currentValue, String newValue) This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable. | public String | toString() | public void | validate() Validates that the instance exists in the data store. | Object | wrapSCOInstance(int field, Object value) |
StateManagerImpl | public StateManagerImpl(PersistenceManager pm, PersistenceCapable pc)(Code) | | Constructs a state manager to manage an existing persistence-capable
instance that is not persistent.
All mutable SCO fields are wrapped in suitable wrapper objects and the
PC instance transitions to a TransientClean state.
Parameters: pm - The persistence manager controlling this state manager. Parameters: pc - The instance to be managed. |
StateManagerImpl | public StateManagerImpl(PersistenceManager pm, Class pcClass, Object id)(Code) | | Constructs a state manager to manage a new, hollow instance having the
given object ID.
This constructor is used for creating new instances of existing
persistent objects (i.e. via pm.getObjectById()).
Parameters: pm - The persistence manager controlling this state manager. Parameters: pcClass - The class of the new instance to be created. Parameters: id - The JDO identity of the object. |
clearPersistentFields | void clearPersistentFields()(Code) | | |
deletePersistent | public void deletePersistent()(Code) | | Deletes the instance.
If the object is already deleted, this method does nothing.
Otherwise, the object is removed from the data store.
Any failure will leave the instance in its previous life-cycle state.
|
discardSavedFields | void discardSavedFields()(Code) | | |
disconnect | void disconnect()(Code) | | |
enlistInTransaction | void enlistInTransaction()(Code) | | |
evict | public void evict()(Code) | | |
evictFromTransaction | void evictFromTransaction()(Code) | | |
flush | public void flush()(Code) | | Flushes any dirty fields to the data store.
Note that "dirty" in this case is not equated to being in the P_DIRTY
state. The P_DIRTY state means that at least one field in the object has
been written by the user during the current transaction, whereas for the
purposes of this method, a field is "dirty" if it's been written by the
user but not yet updated in the data store. The difference is, it's
possible for an object's state to be P_DIRTY, yet have no "dirty" fields
because flush() has been called at least once during the transaction.
|
getBooleanField | public boolean getBooleanField(PersistenceCapable pc, int field, boolean currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getByteField | public byte getByteField(PersistenceCapable pc, int field, byte currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getCharField | public char getCharField(PersistenceCapable pc, int field, char currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getDoubleField | public double getDoubleField(PersistenceCapable pc, int field, double currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getField | public Object getField(int field)(Code) | | Reads the current value of the specified field.
This has the same effect on the state of the instance as if user code
attempted to read the field.
Parameters: field - The field number to read.The value of the field. Primitives are boxed in appropriatejava.lang wrapper classes. |
getFloatField | public float getFloatField(PersistenceCapable pc, int field, float currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getIntField | public int getIntField(PersistenceCapable pc, int field, int currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getLongField | public long getLongField(PersistenceCapable pc, int field, long currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getObject | public PersistenceCapable getObject()(Code) | | |
getObjectField | public Object getObjectField(PersistenceCapable pc, int field, Object currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getObjectId | public Object getObjectId(PersistenceCapable pc)(Code) | | Return the object representing the JDO identity of the calling instance.
According to the JDO specification, if the JDO identity is being changed
in the current transaction, this method returns the JDO identify as of the
beginning of the transaction.
Parameters: pc - the calling PersistenceCapable instance the object representing the JDO identity of the calling instance |
getPersistenceManager | public javax.jdo.PersistenceManager getPersistenceManager(PersistenceCapable pc)(Code) | | Return the PersistenceManager that owns this instance.
Parameters: pc - the calling PersistenceCapable instancethe PersistenceManager that owns this instance |
getShortField | public short getShortField(PersistenceCapable pc, int field, short currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getStringField | public String getStringField(PersistenceCapable pc, int field, String currentValue)(Code) | | This method is called by the associated PersistenceCapable if the
value for the specified field is not cached (i.e., StateManager.isLoaded()
fails). In this implementation of the StateManager, isLoaded() has a
side effect of loading unloaded information and will always return true.
As such, this method should never be called.
|
getTransactionalObjectId | public Object getTransactionalObjectId(PersistenceCapable pc)(Code) | | Return the object representing the JDO identity
of the calling instance. If the JDO identity is being changed in
the current transaction, this method returns the current identity as
changed in the transaction.
Parameters: pc - the calling PersistenceCapable instance the object representing the JDO identity of the calling instance |
isDeleted | public boolean isDeleted(PersistenceCapable pc)(Code) | | Tests whether this object has been deleted.
Instances that have been deleted in the current transaction return true.
Transient instances return false.
See Also: PersistenceManager.deletePersistent(Object pc) Parameters: pc - the calling PersistenceCapable instance true if this instance was deletedin the current transaction. |
isDirty | public boolean isDirty(PersistenceCapable pc)(Code) | | Tests whether this object is dirty.
Instances that have been modified, deleted, or newly
made persistent in the current transaction return true.
Transient nontransactional instances return false (JDO spec), but the
TriActive implementation does not currently support the transient
transactional state.
See Also: PersistenceCapable.jdoMakeDirty(String fieldName) Parameters: pc - the calling PersistenceCapable instance true if this instance has been modified in the current transaction. |
isLoaded | public boolean isLoaded(PersistenceCapable pc, int field)(Code) | | Return true if the field is cached in the calling instance.
In the TriActive implementation of this method, isLoaded() will always
return true. If the field is not loaded, it will be loaded as a side effect
of the call to this method. If it is in the default fetch group, the default
fetch group, including this field, will be loaded.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the absolute field number always returns true (this implementation) |
isNew | public boolean isNew(PersistenceCapable pc)(Code) | | Tests whether this object has been newly made persistent.
Instances that have been made persistent in the current transaction
return true.
Transient instances return false.
See Also: PersistenceManager.makePersistent(Object pc) Parameters: pc - the calling PersistenceCapable instance true if this instance was made persistentin the current transaction. |
isPersistent | public boolean isPersistent(PersistenceCapable pc)(Code) | | Tests whether this object is persistent.
Instances whose state is stored in the data store return true.
Transient instances return false.
See Also: PersistenceManager.makePersistent(Object pc) Parameters: pc - the calling PersistenceCapable instance true if this instance is persistent. |
isTransactional | public boolean isTransactional(PersistenceCapable pc)(Code) | | Tests whether this object is transactional.
Instances that respect transaction boundaries return true. These instances
include transient instances made transactional as a result of being the
target of a makeTransactional method call; newly made persistent or deleted
persistent instances; persistent instances read in data store
transactions; and persistent instances modified in optimistic transactions.
Transient nontransactional instances return false.
Parameters: pc - the calling PersistenceCapable instance true if this instance is transactional. |
loadDFGFields | void loadDFGFields()(Code) | | Fetchs from the database all fields in the default fetch group not
already loaded.
Called by, or immediately after, life-cycle transitions.
|
loadUnloadedFields | void loadUnloadedFields()(Code) | | Fetchs from the database all fields not currently loaded.
Called by life-cycle transitions.
|
makeDirty | public void makeDirty(int field)(Code) | | Marks the given field dirty.
|
makeDirty | public void makeDirty(PersistenceCapable pc, String fieldName)(Code) | | Mark the associated PersistenceCapable field dirty.
Parameters: pc - the calling PersistenceCapable instance Parameters: fieldName - the name of the field |
makeNontransactional | public void makeNontransactional()(Code) | | |
makePersistent | public boolean makePersistent()(Code) | | Makes the instance persistent.
If the object is already persistent, this method does nothing.
Otherwise, a new object ID for the instance is obtained from the store
manager and the object is inserted in the data store.
Any failure will leave the instance in its previous life-cycle state.
true if the object was successfully made persistent,false if the object was already persistent. |
makeTransactional | public void makeTransactional()(Code) | | |
makeTransient | public void makeTransient()(Code) | | |
offerPrefetchedFields | public void offerPrefetchedFields(int[] fieldNumbers, FieldManager fieldManager)(Code) | | Offers the specified pre-fetched fields to the state manager.
If the instance is in a state that can benefit from newly available field
values, the fields are replaced in the instance and a state change occurs
as though the instance itself had read a field.
Called by pm.getObjectById() when given prefetched fields.
|
postCommit | public void postCommit()(Code) | | This method is invoked when a commit is performed in a Transaction
involving the PersistenceCapable managed by this StateManager
|
preDelete | void preDelete()(Code) | | |
preRollback | public void preRollback()(Code) | | This method is invoked when a rollback is performed in a Transaction
involving the PersistenceCapable managed by this StateManager.
|
preSerialize | public void preSerialize(PersistenceCapable pc)(Code) | | Guarantee that the serializable transactional and persistent fields
are loaded into the instance. This method is called by the generated
jdoPreSerialize method prior to serialization of the instance.
Parameters: pc - the calling PersistenceCapable instance |
provideFields | public synchronized void provideFields(int fieldNumbers, FieldManager fm)(Code) | | Called from the StoreManager after StoreManager.update() is called to obtain
updated values from the PersistenceCapable associated with this StateManager.
Parameters: fieldNumbers - An array of field numbers to be updated by the Store Parameters: fm - The updated values are stored in this object. This object is only validfor the duration of this call. |
providedBooleanField | public void providedBooleanField(PersistenceCapable pc, int field, boolean currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedByteField | public void providedByteField(PersistenceCapable pc, int field, byte currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedCharField | public void providedCharField(PersistenceCapable pc, int field, char currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedDoubleField | public void providedDoubleField(PersistenceCapable pc, int field, double currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedFloatField | public void providedFloatField(PersistenceCapable pc, int field, float currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedIntField | public void providedIntField(PersistenceCapable pc, int field, int currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedLongField | public void providedLongField(PersistenceCapable pc, int field, long currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedObjectField | public void providedObjectField(PersistenceCapable pc, int field, Object currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedShortField | public void providedShortField(PersistenceCapable pc, int field, short currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
providedStringField | public void providedStringField(PersistenceCapable pc, int field, String currentValue)(Code) | | This method is called from the associated PersistenceCapable when its
PersistenceCapable.jdoProvideFields() method is invoked. Its purpose is
to provide the value of the specified field to the StateManager.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field |
refresh | public void refresh()(Code) | | |
refreshLoadedFields | void refreshLoadedFields()(Code) | | Refreshes from the database all fields currently loaded.
Called by life-cycle transitions.
|
replaceFields | public synchronized void replaceFields(int fieldNumbers, FieldManager fm)(Code) | | Called to refresh data in the PersistenceCapable object associated with
this StateManager.
Unwrapped values for SCO fields are wrapped with an appropriate SCO
wrapper object.
Parameters: fieldNumbers - An array of field numbers to be refreshed. Parameters: fm - Provides the updated values. This object is only used for theduration of the call. |
replaceSCOFields | void replaceSCOFields()(Code) | | Passes all SCO field values through replaceFields(), which will wrap any
unwrapped values with an appropriate SCO wrapper.
|
replacingBooleanField | public boolean replacingBooleanField(PersistenceCapable pc, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a boolean field.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingByteField | public byte replacingByteField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a byte field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingCharField | public char replacingCharField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a char field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingDoubleField | public double replacingDoubleField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a double field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingFlags | public byte replacingFlags(PersistenceCapable pc)(Code) | | The StateManager uses this method to supply the value of jdoFlags to the
associated PersistenceCapable instance.
Parameters: pc - the calling PersistenceCapable instancethe value of jdoFlags to be stored in the PersistenceCapable instance |
replacingFloatField | public float replacingFloatField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a float field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingIntField | public int replacingIntField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a int field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingLongField | public long replacingLongField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a long field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingObjectField | public Object replacingObjectField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of an Object field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingShortField | public short replacingShortField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a short field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
replacingStateManager | public StateManager replacingStateManager(PersistenceCapable pc, StateManager sm)(Code) | | Replace the current value of jdoStateManager.
This method is called by the PersistenceCapable whenever
jdoReplaceStateManager is called and there is already
an owning StateManager. This is a security precaution
to ensure that the owning StateManager is the only
source of any change to its reference in the PersistenceCapable.
the new value for the jdoStateManager Parameters: pc - the calling PersistenceCapable instance Parameters: sm - the proposed new value for the jdoStateManager |
replacingStringField | public String replacingStringField(PersistenceCapable obj, int field)(Code) | | This method is invoked by the PersistenceCapable object's
jdoReplaceField() method to refresh the value of a String field.
Parameters: obj - the calling PersistenceCapable instance Parameters: field - the field number the new value for the field |
restoreFields | void restoreFields()(Code) | | |
retrieve | public void retrieve(boolean DFGOnly)(Code) | | |
saveFields | void saveFields()(Code) | | |
setBooleanField | public void setBooleanField(PersistenceCapable pc, int field, boolean currentValue, boolean newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setByteField | public void setByteField(PersistenceCapable pc, int field, byte currentValue, byte newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setCharField | public void setCharField(PersistenceCapable pc, int field, char currentValue, char newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setDoubleField | public void setDoubleField(PersistenceCapable pc, int field, double currentValue, double newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setField | public void setField(int field, Object currentValue, Object newValue)(Code) | | Updates the current value of the specified field.
This has the same effect on the state of the instance as if user code
attempted to write the field.
Parameters: field - The field number to write. Parameters: currentValue - The current value of the field. Used to determine whether or notthe write is redundant. If necessary, the value can be obtainedusing StateManagerImpl.getField. Parameters: newValue - The new value of the field. Primitives must be boxed in appropriatejava.lang wrapper classes. |
setFloatField | public void setFloatField(PersistenceCapable pc, int field, float currentValue, float newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setIntField | public void setIntField(PersistenceCapable pc, int field, int currentValue, int newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setLongField | public void setLongField(PersistenceCapable pc, int field, long currentValue, long newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setObjectField | public void setObjectField(PersistenceCapable pc, int field, Object currentValue, Object newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setShortField | public void setShortField(PersistenceCapable pc, int field, short currentValue, short newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
setStringField | public void setStringField(PersistenceCapable pc, int field, String currentValue, String newValue)(Code) | | This method is called by the associated PersistenceCapable when the
corresponding mutator method (setXXX()) is called on the PersistenceCapable.
Parameters: pc - the calling PersistenceCapable instance Parameters: field - the field number Parameters: currentValue - the current value of the field Parameters: newValue - the new value for the field |
validate | public void validate()(Code) | | Validates that the instance exists in the data store.
Called by pm.getObjectById() when validate == true.
|
|
|