|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StateManager
Extension to SUN's JDO StateManager class. This makes the assumption that a StateManager corresponds to ONE PersistenceCapable object. As a result of this assumption various methods are added to the basic JDO definition.
Method Summary | |
---|---|
java.lang.Object |
attachCopy(javax.jdo.spi.PersistenceCapable detachedPC,
boolean embedded)
Method to attach to this the detached PersistenceCapable instance |
void |
changeActivityState(ActivityState activityState)
Update the acitvity state. |
void |
deletePersistent()
Method to delete the object from persistence. |
void |
detach(FetchPlanState state)
Method to detach the PersistenceCapable object. |
java.lang.Object |
detachCopy(FetchPlanState state)
Method to make detached copy of this instance |
void |
disconnect()
Disconnect the StateManager from the PersistenceManager and PC object. |
void |
dump(java.io.PrintWriter out)
Diagnostic method to dump the current state to the provided PrintWriter. |
void |
evict()
Method to change the object state to evicted. |
void |
flush()
Method to flush all changes to the datastore. |
AbstractClassMetaData |
getClassMetaData()
Accessor for the ClassMetaData for this object. |
java.lang.String[] |
getDirtyFieldNames()
Accessor for the names of all dirty fields. |
java.lang.Object |
getExternalObjectId(javax.jdo.spi.PersistenceCapable pc)
return a copy from the object Id |
int |
getHighestFieldNumber()
Accessor for the highest field number |
java.lang.Object |
getInternalObjectId()
Accessor for the id of the object managed by this StateManager. |
CachedPC |
getL2CacheableObject()
Accessor for an L2 cacheable form of this object. |
java.lang.String[] |
getLoadedFieldNames()
Accessor for the names of all loaded fields. |
MetaDataManager |
getMetaDataManager()
Accessor for the manager for MetaData. |
javax.jdo.spi.PersistenceCapable |
getObject()
Accessor for the object managed by this StateManager. |
PersistenceManager |
getPersistenceManager()
Returns the PersistenceManager that owns the StateManager instance |
StoreManager |
getStoreManager()
Accessor for the manager for the store. |
java.lang.Object |
getTransactionalVersion(javax.jdo.spi.PersistenceCapable pc)
Return the object representing the transactional version of the calling instance. |
boolean |
isInserting()
Tests whether this object is being inserted. |
void |
loadUnloadedFieldsInFetchPlan()
Fetchs from the database all fields that are not currently loaded and that are in the current fetch group. |
void |
makeDirty(int fieldNumber)
Method to mark the specified (absolute) field number as dirty. |
void |
makeNontransactional()
Method to make the managed object nontransactional. |
void |
makePersistent()
Method to make the managed object persistent. |
void |
makePersistentTransactionalTransient()
Method to make Transactional Transient instances persistent |
void |
makeTransactional()
Method to make the managed object transactional. |
void |
makeTransient(FetchPlanState state)
Method to make the managed object transient. |
java.lang.Object |
newSCOEmptyInstance(int fieldNumber)
Method to return an empty SCO wrapper for the specified field. |
java.lang.Object |
newSCOInstance(int fieldNumber,
java.lang.Object value,
boolean forUpdate)
Method to create a new SCO wrapper for a second class field. |
void |
nullifyFields()
Nullify fields with reference to PersistenceCapable or SCO instances |
void |
postCommit(javax.jdo.Transaction tx)
Convenience interceptor to allow operations to be performed after the commit is performed but before returning control to the application. |
void |
preRollback(javax.jdo.Transaction tx)
Convenience interceptor to allow operations to be performed before any rollback is performed. |
java.lang.Object |
provideField(int fieldNumber)
Method to return the current value of the specified field. |
void |
provideFields(int[] fieldNumbers,
FieldManager fm)
Method to obtain updated field values from the passed FieldManager. |
void |
refresh()
Method to refresh the values of the currently loaded fields in the managed object. |
void |
replaceField(int fieldNumber,
java.lang.Object value)
Method to change the value of the specified field. |
void |
replaceFields(int[] fieldNumbers,
FieldManager fm)
Method to update the data in the object with the values from the passed FieldManager |
void |
replaceNonLoadedFields(int[] fieldNumbers,
FieldManager fm)
Method to update the data in the object with the values from the passed FieldManager. |
java.lang.Object |
replaceSCOField(int fieldNumber,
java.lang.Object value)
Wrap a field value with a SCO instance |
void |
resetDetachState()
Convenience method to reset the detached state in the current object. |
void |
retrieve(boolean fgOnly)
Method to retrieve the fields for this object. |
void |
retrieve(javax.jdo.FetchPlan fetchPlan)
Method to retrieve the object. |
void |
runReachability(java.util.Set reachables)
Method to run reachability from this StateManager. |
void |
setPostStoreNewObjectId(java.lang.Object id)
If the id is obtained after inserting the object into the database, set new a new id for persistent classes (for example, increment). |
void |
setTransactionalVersion(java.lang.Object optimisticTransactionalVersion)
Sets the value for the version column in a transaction not yet committed |
void |
setVersion(java.lang.Object version)
Sets the value for the version column in the datastore. |
void |
updateFieldAfterInsert(javax.jdo.spi.PersistenceCapable pc,
int fieldNumber)
Marks the given field dirty for issuing an update after the insert. |
void |
validate()
Validates whether the persistence capable instance exists in the datastore. |
Methods inherited from interface javax.jdo.spi.StateManager |
---|
getBooleanField, getByteField, getCharField, getDoubleField, getFloatField, getIntField, getLongField, getObjectField, getObjectId, getPersistenceManager, getShortField, getStringField, getTransactionalObjectId, getVersion, isDeleted, isDirty, isLoaded, isNew, isPersistent, isTransactional, makeDirty, preSerialize, providedBooleanField, providedByteField, providedCharField, providedDoubleField, providedFloatField, providedIntField, providedLongField, providedObjectField, providedShortField, providedStringField, replacingBooleanField, replacingByteField, replacingCharField, replacingDetachedState, replacingDoubleField, replacingFlags, replacingFloatField, replacingIntField, replacingLongField, replacingObjectField, replacingShortField, replacingStateManager, replacingStringField, setBooleanField, setByteField, setCharField, setDoubleField, setFloatField, setIntField, setLongField, setObjectField, setShortField, setStringField |
Method Detail |
---|
javax.jdo.spi.PersistenceCapable getObject()
java.lang.Object getInternalObjectId()
java.lang.Object getExternalObjectId(javax.jdo.spi.PersistenceCapable pc)
pc
- the PersistenceCapable object
PersistenceManager getPersistenceManager()
StoreManager getStoreManager()
MetaDataManager getMetaDataManager()
void makeDirty(int fieldNumber)
fieldNumber
- The (absolute) field number of the fieldjava.lang.String[] getDirtyFieldNames()
java.lang.String[] getLoadedFieldNames()
void updateFieldAfterInsert(javax.jdo.spi.PersistenceCapable pc, int fieldNumber)
pc
- The Persistence Capable objectfieldNumber
- The no of field to mark as dirty.void changeActivityState(ActivityState activityState)
activityState
- the activity statevoid runReachability(java.util.Set reachables)
reachables
- List of reachable StateManagers so farvoid makeTransactional()
void makeNontransactional()
void makeTransient(FetchPlanState state)
state
- Object containing the state of any fetch plan processingvoid makePersistent()
void makePersistentTransactionalTransient()
void deletePersistent()
java.lang.Object attachCopy(javax.jdo.spi.PersistenceCapable detachedPC, boolean embedded)
detachedPC
- the detached PersistenceCapable instance to be attachedembedded
- Whether it is embedded
java.lang.Object detachCopy(FetchPlanState state)
state
- State for the detachment process
void detach(FetchPlanState state)
state
- State for the detachment processvoid validate()
void evict()
void refresh()
void retrieve(boolean fgOnly)
fgOnly
- Whether to retrieve just the current fetch plan fieldsvoid retrieve(javax.jdo.FetchPlan fetchPlan)
fetchPlan
- the fetch plan to load fieldsvoid postCommit(javax.jdo.Transaction tx)
tx
- The transactionvoid preRollback(javax.jdo.Transaction tx)
tx
- The transactionvoid flush()
java.lang.Object provideField(int fieldNumber)
fieldNumber
- (absolute) field number of the field
void provideFields(int[] fieldNumbers, FieldManager fm)
fieldNumbers
- The numbers of the fieldsfm
- The fieldManagervoid replaceField(int fieldNumber, java.lang.Object value)
fieldNumber
- (absolute) field number of the fieldvalue
- The new value.void replaceFields(int[] fieldNumbers, FieldManager fm)
fieldNumbers
- (absolute) field numbers of the fields to updatefm
- The FieldManagervoid replaceNonLoadedFields(int[] fieldNumbers, FieldManager fm)
fieldNumbers
- (absolute) field numbers of the fields to updatefm
- The FieldManagerjava.lang.Object newSCOInstance(int fieldNumber, java.lang.Object value, boolean forUpdate)
fieldNumber
- Number of the fieldvalue
- The value to give itforUpdate
- Whether it needs updating in the datastore
java.lang.Object replaceSCOField(int fieldNumber, java.lang.Object value)
fieldNumber
- value
- the value to be wrapped
java.lang.Object newSCOEmptyInstance(int fieldNumber)
fieldNumber
- (absolute) field number of the SCO field to wrap
boolean isInserting()
void setPostStoreNewObjectId(java.lang.Object id)
id
- the id received from the datastorevoid setVersion(java.lang.Object version)
version
- The versionjava.lang.Object getTransactionalVersion(javax.jdo.spi.PersistenceCapable pc)
pc
- the calling PersistenceCapable
instance
void setTransactionalVersion(java.lang.Object optimisticTransactionalVersion)
optimisticTransactionalVersion
- int getHighestFieldNumber()
CachedPC getL2CacheableObject()
void dump(java.io.PrintWriter out)
out
- The PrintWriterAbstractClassMetaData getClassMetaData()
void nullifyFields()
void loadUnloadedFieldsInFetchPlan()
void resetDetachState()
void disconnect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |