|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.state.AbstractStateManager
org.datanucleus.state.JDOStateManagerImpl
public final class JDOStateManagerImpl
Implementation of the StateManager. Implemented here as one StateManager per Object so adds on functionality particular to each object. All PersistenceCapable objects will have a StateManager when they have had communication with the PersistenceManager. They will typically always have an identity also. The exception to that is for embedded/serialised objects.
| Field Summary |
|---|
| Fields inherited from class org.datanucleus.state.AbstractStateManager |
|---|
cmd, currFM, currFMmonitor, dirty, dirtyFields, loadedFields, LOCALISER, myFP, myID, myInternalID, myLC, myOM, myPC, myVersion, pcObjectType, restoreValues, transactionalVersion |
| Fields inherited from interface org.datanucleus.StateManager |
|---|
EMBEDDED_COLLECTION_ELEMENT_PC, EMBEDDED_MAP_KEY_PC, EMBEDDED_MAP_VALUE_PC, EMBEDDED_PC, PC |
| Constructor Summary | |
|---|---|
JDOStateManagerImpl(ObjectManager om,
AbstractClassMetaData cmd)
Basic constructor. |
|
| Method Summary | |
|---|---|
void |
addEmbeddedOwner(StateManager ownerSM,
int ownerFieldNumber)
Method to register an owner StateManager with this embedded/serialised object. |
void |
addInsertionNotifier(javax.jdo.spi.StateManager sm,
ActivityState activityState)
Method to add a notifier that we must contact when we have finished our insertion. |
void |
attach(boolean embedded)
Method to attach the object managed by this StateManager. |
java.lang.Object |
attachCopy(java.lang.Object obj,
boolean embedded)
Method to attach a copy of the detached persistable instance and return the (attached) copy. |
java.lang.Object |
cache(CacheState state)
Method called when this object is to be placed in the (level 2) cache. |
void |
changeActivityState(ActivityState activityState)
Change the activity state. |
void |
checkInheritance(FieldValues fv)
Look to the database to determine which class this object is. |
void |
checkManagedRelations()
Method to check all updated managed relations in this object. |
void |
clearFields()
Method to clear all fields of the object. |
void |
clearLoadedFlags()
Method to clear all loaded flags on the object. |
void |
clearManagedRelations()
Method to clear all initial values for bidirectional fields involved in "managed relationships". |
void |
clearNonPrimaryKeyFields()
Method to clear all fields that are not part of the primary key of the object. |
void |
clearSavedFields()
Method to clear all saved fields on the object. |
void |
copyFieldsFromObject(javax.jdo.spi.PersistenceCapable pc,
int[] fieldNumbers)
Convenience method to update our object with the field values from the passed object. |
void |
deletePersistent()
Method to delete the object from persistence. |
void |
detach(FetchPlanState state)
Method to detach this object. |
java.lang.Object |
detachCopy(FetchPlanState state)
Method to make detached copy of this instance If the object is detachable then the copy will be migrated to DETACHED state, otherwise will migrate the copy to TRANSIENT. |
void |
disconnect()
Disconnect the StateManager from the PersistenceManager and PC object. |
protected boolean |
disconnectClone(javax.jdo.spi.PersistenceCapable pc)
Method to disconnect any cloned persistence capable objects from their StateManager. |
void |
dump(java.io.PrintWriter out)
Utility to dump the contents of the StateManager. |
void |
enlistInTransaction()
Method to enlist the managed object in the current transaction. |
void |
evict()
Method to change the object state to evicted. |
void |
evictFromTransaction()
Method to evict the managed object from the current transaction. |
void |
flush()
Flushes any outstanding changes to the object to the datastore. |
boolean |
getAllFieldsLoaded()
Returns whether all fields are loaded. |
java.lang.Object |
getAssociatedValue(java.lang.Object key)
Accessor for an associated value stored with this object. |
boolean[] |
getDirtyFields()
Creates a copy of the AbstractStateManager.dirtyFields bitmap. |
StateManager[] |
getEmbeddedOwners()
Accessor for the owning StateManagers for the managed object when stored embedded. |
java.lang.Object |
getExternalObjectId(java.lang.Object obj)
Return an object id that the user can use. |
java.lang.Object |
getObjectId(javax.jdo.spi.PersistenceCapable pc)
Return the object representing the JDO identity of the calling instance. |
javax.jdo.PersistenceManager |
getPersistenceManager(javax.jdo.spi.PersistenceCapable pc)
Accessor for the PersistenceManager that owns this instance. |
java.lang.Object |
getReferencedPC()
Accessor for the referenced PC object when we are attaching or detaching. |
RelationshipManager |
getRelationshipManager()
Accessor for the relationship manager, and create if not existing and we are managing relations. |
java.lang.Object |
getTransactionalObjectId(javax.jdo.spi.PersistenceCapable pc)
Return the object representing the JDO identity of the calling instance. |
void |
initialiseForCachedPC(CachedPC cachedPC,
java.lang.Object id,
java.lang.Class pcClass)
Initialise to create a StateManager for a PersistenceCapable object, assigning the specified id to the object. |
void |
initialiseForDetached(java.lang.Object pc,
java.lang.Object id,
java.lang.Object version)
Initialises the StateManager to manage a PersistenceCapable object in detached state. |
void |
initialiseForEmbedded(java.lang.Object pc,
boolean copyPc)
Initialises a state manager to manage a PersistenceCapable instance that will be EMBEDDED/SERIALISED into another PersistenceCapable object. |
void |
initialiseForHollow(java.lang.Object id,
FieldValues fv,
java.lang.Class pcClass)
Initialises a state manager to manage a hollow instance having the given object ID and the given (optional) field values. |
void |
initialiseForHollowAppId(FieldValues fv,
java.lang.Class pcClass)
Initialises a state manager to manage a HOLLOW / P_CLEAN instance having the given FieldValues. |
void |
initialiseForHollowPreConstructed(java.lang.Object id,
java.lang.Object pc)
Initialises a state manager to manage the given hollow instance having the given object ID. |
void |
initialiseForPersistentClean(java.lang.Object id,
java.lang.Object pc)
Initialises a state manager to manage the passed persistent instance having the given object ID. |
void |
initialiseForPersistentNew(java.lang.Object pc,
FieldValues preInsertChanges)
Initialises a state manager to manage a transient instance that is becoming newly persistent. |
void |
initialiseForPNewToBeDeleted(java.lang.Object pc)
Initialises the StateManager to manage a PersistenceCapable object that is not persistent but is about to be deleted. |
void |
initialiseForTransactionalTransient(java.lang.Object pc)
Initialises a state manager to manage a Transactional Transient instance. |
boolean |
isDeleting()
Tests whether this object is being deleted. |
boolean |
isDetaching()
Tests whether this object is being detached. |
boolean |
isDirty()
Returns whether the object being managed is dirty. |
boolean |
isInserting()
Tests whether this object is being inserted. |
boolean |
isLoaded(javax.jdo.spi.PersistenceCapable pc,
int field)
Return true if the field is cached in the calling instance. |
boolean |
isUpdatingFieldForPostInsert()
Convenience method to return if we are in the phase of performing postInsert updates due to related objects having been inserted. |
boolean |
isWaitingToBeFlushedToDatastore()
Accessor for whether the instance is newly persistent yet hasnt yet been flushed to the datastore. |
void |
loadField(int fieldNumber)
Convenience method to load the specified field if not loaded. |
void |
loadFieldFromDatastore(int fieldNumber)
Convenience method to load a field from the datastore. |
void |
loadFieldsInFetchPlan(FetchPlanState state)
Method to load all unloaded fields in the FetchPlan. |
void |
loadFieldValues(FieldValues fv)
Convenience method to load the passed field values. |
protected void |
loadSpecifiedFields(int[] fieldNumbers)
Fetch the specified fields from the database. |
void |
loadUnloadedFields()
Fetch from the database all fields that are not currently loaded regardless of whether they are in the current fetch group or not. |
void |
loadUnloadedFieldsInFetchPlan()
Fetchs from the database all fields that are not currently loaded and that are in the current fetch group. |
void |
loadUnloadedFieldsOfClassInFetchPlan(FetchPlan fetchPlan)
Fetchs from the database all fields in the actual fetch plan. |
void |
locate()
Locate the object in the datastore. |
void |
makeDirty(int field)
Marks the given field dirty. |
void |
makeDirty(javax.jdo.spi.PersistenceCapable pc,
java.lang.String fieldName)
Mark the associated PersistenceCapable field dirty. |
void |
makeNontransactional()
Method to change the object state to nontransactional. |
void |
makePersistent()
Method to make the object persistent. |
void |
makePersistentTransactionalTransient()
Makes Transactional Transient instances persistent. |
void |
makeTransactional()
Method to change the object state to transactional. |
void |
makeTransient(FetchPlanState state)
Method to change the object state to transient. |
protected void |
markPKFieldsAsLoaded()
Convenience method to mark PK fields as loaded (if using app id). |
void |
nullifyFields()
Nullify fields with reference to PersistenceCapable or SCO instances |
void |
postCommit(Transaction tx)
This method is invoked just after a commit is performed in a Transaction involving the PersistenceCapable managed by this StateManager |
void |
preBegin(Transaction tx)
Method invoked just before a transaction starts for the ObjectManager managing us. |
void |
preRollback(Transaction tx)
This method is invoked just before a rollback is performed in a Transaction involving the PersistenceCapable managed by this StateManager. |
void |
preSerialize(javax.jdo.spi.PersistenceCapable pc)
Guarantee that the serializable transactional and persistent fields are loaded into the instance. |
void |
processManagedRelations()
Method to process all updated managed relations in this object. |
java.lang.Object |
provideField(int fieldNumber)
Method to return the current value of a particular field. |
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. |
void |
refresh()
Method to refresh the object. |
void |
refreshFieldsInFetchPlan()
Refreshes from the database all fields in fetch plan. |
void |
refreshLoadedFields()
Refreshes from the database all fields currently loaded. |
void |
registerTransactional()
Registers the pc class in the cache |
void |
removeEmbeddedOwner(javax.jdo.spi.StateManager ownerSM,
int ownerFieldNumber)
Method to remove an owner StateManager from this embedded/serialised objects owners list. |
void |
replaceAllLoadedSCOFieldsWithValues()
Method to replace all loaded SCO fields that have wrappers with their value. |
void |
replaceAllLoadedSCOFieldsWithWrappers()
Method to replace all loaded SCO fields with wrappers. |
void |
replaceField(int fieldNumber,
java.lang.Object value,
boolean makeDirty)
Method to change the value of a particular field. |
void |
replaceFields(int[] fieldNumbers,
FieldManager fm)
Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager. |
void |
replaceFields(int[] fieldNumbers,
FieldManager fm,
boolean replaceWhenDirty)
Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager. |
void |
replaceFieldValue(int fieldNumber,
java.lang.Object newValue)
Convenience method to change the value of a field that is assumed loaded. |
void |
replaceManagedPC(javax.jdo.spi.PersistenceCapable pc)
Method that replaces the PC managed by this StateManager to be the supplied object. |
void |
replaceNonLoadedFields(int[] fieldNumbers,
FieldManager fm)
Called from the StoreManager to refresh data in the PersistenceCapable object associated with this StateManager. |
java.lang.Object[] |
replacingDetachedState(javax.jdo.spi.Detachable pc,
java.lang.Object[] currentState)
Method to update the "detached state" in the detached object to obtain the "detached state" from the detached object, or to reset it (to null). |
byte |
replacingFlags(javax.jdo.spi.PersistenceCapable pc)
The StateManager uses this method to supply the value of jdoFlags to the associated PersistenceCapable instance. |
javax.jdo.spi.StateManager |
replacingStateManager(javax.jdo.spi.PersistenceCapable pc,
javax.jdo.spi.StateManager sm)
Replace the current value of jdoStateManager. |
void |
resetDetachState()
Convenience method to reset the detached state in the current object. |
void |
restoreFields()
Method to restore all fields of the object. |
void |
retrieve(boolean fgOnly)
Method to retrieve the object. |
void |
retrieve(FetchPlan fetchPlan)
Method to retrieve the object. |
void |
retrieveDetachState(StateManager sm)
Convenience method to retrieve the detach state from the passed State Manager's object |
void |
runReachability(java.util.Set reachables)
Method to mark an object for reachability. |
void |
saveFields()
Method to save all fields of the object. |
void |
setAssociatedValue(java.lang.Object key,
java.lang.Object value)
Method to set an associated value stored with this object. |
void |
setBooleanField(javax.jdo.spi.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. |
void |
setByteField(javax.jdo.spi.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. |
void |
setCharField(javax.jdo.spi.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. |
void |
setDoubleField(javax.jdo.spi.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. |
void |
setFloatField(javax.jdo.spi.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. |
void |
setIntField(javax.jdo.spi.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. |
void |
setLongField(javax.jdo.spi.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. |
void |
setObjectField(javax.jdo.spi.PersistenceCapable pc,
int field,
java.lang.Object currentValue,
java.lang.Object newValue)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable. |
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 |
setShortField(javax.jdo.spi.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. |
void |
setStoringPC()
Method to set the storing PC flag. |
void |
setStringField(javax.jdo.spi.PersistenceCapable pc,
int field,
java.lang.String currentValue,
java.lang.String newValue)
This method is called by the associated PersistenceCapable when the corresponding mutator method (setXXX()) is called on the PersistenceCapable. |
void |
unloadField(java.lang.String fieldName)
Convenience method to unload a field/property. |
void |
unloadNonFetchPlanFields()
Method that will unload all fields that are not in the FetchPlan. |
void |
unsetStoringPC()
Method to unset the storing PC flag. |
java.lang.Object |
unwrapSCOField(int fieldNumber,
java.lang.Object value,
boolean replaceFieldIfChanged)
Method to unwrap a SCO field (if it is wrapped currently). |
void |
updateFieldAfterInsert(java.lang.Object pc,
int fieldNumber)
Marks the given field as being required to be updated when the specified object has been inserted. |
void |
validate()
Validates whether the persistence capable instance exists in the datastore. |
java.lang.Object |
wrapSCOField(int fieldNumber,
java.lang.Object value,
boolean forInsert,
boolean forUpdate,
boolean replaceFieldIfChanged)
Method to create a new SCO wrapper for the specified field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.jdo.spi.StateManager |
|---|
getBooleanField, getByteField, getCharField, getDoubleField, getFloatField, getIntField, getLongField, getObjectField, getShortField, getStringField, getVersion, isDeleted, isDirty, isNew, isPersistent, isTransactional, providedBooleanField, providedByteField, providedCharField, providedDoubleField, providedFloatField, providedIntField, providedLongField, providedObjectField, providedShortField, providedStringField, replacingBooleanField, replacingByteField, replacingCharField, replacingDoubleField, replacingFloatField, replacingIntField, replacingLongField, replacingObjectField, replacingShortField, replacingStringField |
| Constructor Detail |
|---|
public JDOStateManagerImpl(ObjectManager om,
AbstractClassMetaData cmd)
om - The ObjectManagercmd - the metadata for the class.| Method Detail |
|---|
public void initialiseForHollow(java.lang.Object id,
FieldValues fv,
java.lang.Class pcClass)
initialiseForHollow in interface StateManagerid - the JDO identity of the object.fv - the initial field values of the object (optional)pcClass - Class of the object that this will manage the state for
public void initialiseForHollowAppId(FieldValues fv,
java.lang.Class pcClass)
initialiseForHollowAppId in interface StateManagerfv - the initial field values of the object.pcClass - Class of the object that this will manage the state for
public void initialiseForHollowPreConstructed(java.lang.Object id,
java.lang.Object pc)
initialiseForHollow(java.lang.Object, org.datanucleus.store.FieldValues, java.lang.Class) method, this method does not create a new instance and instead
takes a pre-constructed instance.
initialiseForHollowPreConstructed in interface StateManagerid - the identity of the object.pc - the object to be managed.
public void initialiseForPersistentClean(java.lang.Object id,
java.lang.Object pc)
initialiseForPersistentClean in interface StateManagerid - the identity of the object.pc - The object to be managed
public void initialiseForEmbedded(java.lang.Object pc,
boolean copyPc)
initialiseForEmbedded in interface StateManagerpc - The PersistenceCapable to manage (see copyPc also)copyPc - Whether the SM should manage a copy of the passed PC or that one
public void initialiseForPersistentNew(java.lang.Object pc,
FieldValues preInsertChanges)
This constructor is used for assigning state managers to existing instances that are transitioning to a persistent state.
initialiseForPersistentNew in interface StateManagerpc - the instance being make persistent.preInsertChanges - Any changes to make before insertingpublic void initialiseForTransactionalTransient(java.lang.Object pc)
This constructor is used for assigning state managers to Transient instances that are transitioning to a transient clean state.
initialiseForTransactionalTransient in interface StateManagerpc - the instance being make persistent.
public void initialiseForDetached(java.lang.Object pc,
java.lang.Object id,
java.lang.Object version)
initialiseForDetached in interface StateManagerpc - the detach object.id - the identity of the object.version - the detached versionpublic void initialiseForPNewToBeDeleted(java.lang.Object pc)
initialiseForPNewToBeDeleted in interface StateManagerpc - the object to delete
public void initialiseForCachedPC(CachedPC cachedPC,
java.lang.Object id,
java.lang.Class pcClass)
initialiseForCachedPC in interface StateManagercachedPC - The cached PC objectid - Id to assign to the PersistenceCapable objectpcClass - Class of the object that this will manage the state forpublic java.lang.Object cache(CacheState state)
cache in interface StateManagerstate - State for the cache process
public void checkInheritance(FieldValues fv)
checkInheritance in interface StateManagerfv - the initial field values of the object.public void loadFieldValues(FieldValues fv)
loadFieldValues in interface StateManagerfv - Field Values to load (including any fetch plan to use when loading)public void replaceManagedPC(javax.jdo.spi.PersistenceCapable pc)
replaceManagedPC in interface StateManagerpc - The PersistenceCapable to use
public void copyFieldsFromObject(javax.jdo.spi.PersistenceCapable pc,
int[] fieldNumbers)
copyFieldsFromObject in interface StateManagerpc - The object that we should copy fields frompublic void enlistInTransaction()
enlistInTransaction in interface StateManagerpublic void evictFromTransaction()
evictFromTransaction in interface StateManagerpublic void saveFields()
saveFields in interface StateManagerpublic void restoreFields()
restoreFields in interface StateManagerpublic void clearFields()
clearFields in interface StateManagerpublic void clearNonPrimaryKeyFields()
clearNonPrimaryKeyFields in interface StateManagerpublic void clearSavedFields()
clearSavedFields in interface StateManagerpublic void clearLoadedFlags()
clearLoadedFlags in interface StateManagerpublic void makeDirty(int field)
makeDirty in interface StateManagerfield - The no of field to mark as dirty.
public void makeDirty(javax.jdo.spi.PersistenceCapable pc,
java.lang.String fieldName)
pc - the calling PersistenceCapable instancefieldName - the name of the fieldpublic javax.jdo.PersistenceManager getPersistenceManager(javax.jdo.spi.PersistenceCapable pc)
pc - The PersistenceCapable instance
public java.lang.Object getObjectId(javax.jdo.spi.PersistenceCapable pc)
getObjectId in interface StateManagerpc - the calling PersistenceCapable instance
public void setPostStoreNewObjectId(java.lang.Object id)
setPostStoreNewObjectId in interface StateManagerid - the id received from the datastorepublic java.lang.Object getExternalObjectId(java.lang.Object obj)
getExternalObjectId in interface StateManagerobj - the PersistenceCapable object
public javax.jdo.spi.StateManager replacingStateManager(javax.jdo.spi.PersistenceCapable pc,
javax.jdo.spi.StateManager sm)
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.
pc - the calling PersistenceCapable instancesm - the proposed new value for the jdoStateManager
public java.lang.Object getTransactionalObjectId(javax.jdo.spi.PersistenceCapable pc)
pc - the calling PersistenceCapable instance
protected void loadSpecifiedFields(int[] fieldNumbers)
fieldNumbers - the numbers of the field(s) to fetch.public void loadField(int fieldNumber)
loadField in interface StateManagerfieldNumber - Absolute field numberpublic void loadUnloadedFields()
loadUnloadedFields in interface StateManagerpublic void loadFieldsInFetchPlan(FetchPlanState state)
loadFieldsInFetchPlan in interface StateManagerstate - The FetchPlan statepublic void loadUnloadedFieldsInFetchPlan()
loadUnloadedFieldsInFetchPlan in interface StateManagerpublic void loadUnloadedFieldsOfClassInFetchPlan(FetchPlan fetchPlan)
loadUnloadedFieldsOfClassInFetchPlan in interface StateManagerfetchPlan - The FetchPlanpublic void unloadField(java.lang.String fieldName)
unloadField in interface StateManagerfieldName - Name of the field/property
NucleusUserException - if the object managed by this StateManager is embeddedprotected void markPKFieldsAsLoaded()
public void refreshFieldsInFetchPlan()
refreshFieldsInFetchPlan in interface StateManagerpublic void refreshLoadedFields()
refreshLoadedFields in interface StateManagerpublic void unloadNonFetchPlanFields()
unloadNonFetchPlanFields in interface StateManagerpublic void loadFieldFromDatastore(int fieldNumber)
loadFieldFromDatastore in interface StateManagerfieldNumber - The field number.
public boolean isLoaded(javax.jdo.spi.PersistenceCapable pc,
int field)
isLoaded in interface StateManagerpc - the calling PersistenceCapable instancefield - the absolute field number
public boolean getAllFieldsLoaded()
getAllFieldsLoaded in interface StateManagerpublic boolean isDirty()
isDirty in interface StateManagerpublic boolean[] getDirtyFields()
AbstractStateManager.dirtyFields bitmap.
getDirtyFields in interface StateManagerAbstractStateManager.dirtyFields bitmap.
public void setBooleanField(javax.jdo.spi.PersistenceCapable pc,
int field,
boolean currentValue,
boolean newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setByteField(javax.jdo.spi.PersistenceCapable pc,
int field,
byte currentValue,
byte newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setCharField(javax.jdo.spi.PersistenceCapable pc,
int field,
char currentValue,
char newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setDoubleField(javax.jdo.spi.PersistenceCapable pc,
int field,
double currentValue,
double newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setFloatField(javax.jdo.spi.PersistenceCapable pc,
int field,
float currentValue,
float newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setIntField(javax.jdo.spi.PersistenceCapable pc,
int field,
int currentValue,
int newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setLongField(javax.jdo.spi.PersistenceCapable pc,
int field,
long currentValue,
long newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setShortField(javax.jdo.spi.PersistenceCapable pc,
int field,
short currentValue,
short newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setStringField(javax.jdo.spi.PersistenceCapable pc,
int field,
java.lang.String currentValue,
java.lang.String newValue)
pc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the field
public void setObjectField(javax.jdo.spi.PersistenceCapable pc,
int field,
java.lang.Object currentValue,
java.lang.Object newValue)
setObjectField in interface StateManagerpc - the calling PersistenceCapable instancefield - the field numbercurrentValue - the current value of the fieldnewValue - the new value for the fieldpublic RelationshipManager getRelationshipManager()
getRelationshipManager in interface StateManagerpublic void checkManagedRelations()
checkManagedRelations in interface StateManagerpublic void processManagedRelations()
processManagedRelations in interface StateManagerpublic void clearManagedRelations()
clearManagedRelations in interface StateManager
public void replaceFieldValue(int fieldNumber,
java.lang.Object newValue)
replaceFieldValue in interface StateManagerfieldNumber - Number of fieldnewValue - The new valuepublic byte replacingFlags(javax.jdo.spi.PersistenceCapable pc)
pc - the calling PersistenceCapable instance
public java.lang.Object provideField(int fieldNumber)
provideField in interface StateManagerfieldNumber - Number of field
public void replaceField(int fieldNumber,
java.lang.Object value,
boolean makeDirty)
replaceField in interface StateManagerfieldNumber - Number of fieldvalue - New valuemakeDirty - Whether to make the field dirty when replacing it
public void provideFields(int[] fieldNumbers,
FieldManager fm)
provideFields in interface StateManagerfieldNumbers - An array of field numbers to be updated by the Storefm - The updated values are stored in this object. This object is only valid
for the duration of this call.
public void replaceFields(int[] fieldNumbers,
FieldManager fm,
boolean replaceWhenDirty)
replaceFields in interface StateManagerfieldNumbers - An array of field numbers to be refreshed by the Storefm - The updated values are stored in this object. This object is only valid
for the duration of this call.replaceWhenDirty - Whether to replace the fields when they are dirty here
public void replaceFields(int[] fieldNumbers,
FieldManager fm)
replaceFields in interface StateManagerfieldNumbers - An array of field numbers to be refreshed by the Storefm - The updated values are stored in this object. This object is only valid
for the duration of this call.
public void replaceNonLoadedFields(int[] fieldNumbers,
FieldManager fm)
replaceNonLoadedFields in interface StateManagerfieldNumbers - An array of field numbers to be refreshed by the Storefm - The updated values are stored in this object. This object is only valid
for the duration of this call.
public void addEmbeddedOwner(StateManager ownerSM,
int ownerFieldNumber)
addEmbeddedOwner in interface StateManagerownerSM - The owning State Manager.ownerFieldNumber - The field number in the owner that the embedded/serialised object is stored as
public void removeEmbeddedOwner(javax.jdo.spi.StateManager ownerSM,
int ownerFieldNumber)
ownerSM - The owner to removeownerFieldNumber - The field in the owner where this object is storedpublic StateManager[] getEmbeddedOwners()
getEmbeddedOwners in interface StateManagerpublic void replaceAllLoadedSCOFieldsWithWrappers()
replaceAllLoadedSCOFieldsWithWrappers in interface StateManagerpublic void replaceAllLoadedSCOFieldsWithValues()
replaceAllLoadedSCOFieldsWithValues in interface StateManager
public java.lang.Object unwrapSCOField(int fieldNumber,
java.lang.Object value,
boolean replaceFieldIfChanged)
unwrapSCOField in interface StateManagerfieldNumber - The field numbervalue - The value for the fieldreplaceFieldIfChanged - Whether to replace the field value in the object if unwrapping the value
public java.lang.Object wrapSCOField(int fieldNumber,
java.lang.Object value,
boolean forInsert,
boolean forUpdate,
boolean replaceFieldIfChanged)
wrapSCOField in interface StateManagerfieldNumber - The field numbervalue - The value to initialise the wrapper with (if any)forInsert - Whether the creation of any wrapper should insert this value into the datastoreforUpdate - Whether the creation of any wrapper should update the datastore with this valuereplaceFieldIfChanged - Whether to replace the field in the object if wrapping the value
public void runReachability(java.util.Set reachables)
runReachability in interface StateManagerreachables - List of object ids currently logged as reachablepublic void makePersistent()
makePersistent in interface StateManagerpublic boolean isInserting()
isInserting in interface StateManagerpublic boolean isDeleting()
isDeleting in interface StateManagerpublic boolean isDetaching()
isDetaching in interface StateManagerpublic boolean isWaitingToBeFlushedToDatastore()
isWaitingToBeFlushedToDatastore in interface StateManagerpublic void changeActivityState(ActivityState activityState)
changeActivityState in interface StateManageractivityState - the new state
public void addInsertionNotifier(javax.jdo.spi.StateManager sm,
ActivityState activityState)
sm - the state manageractivityState - the ActivityState (unused)
public void updateFieldAfterInsert(java.lang.Object pc,
int fieldNumber)
updateFieldAfterInsert in interface StateManagerpc - The Persistable objectfieldNumber - Number of the field.public boolean isUpdatingFieldForPostInsert()
isUpdatingFieldForPostInsert in interface StateManager
public void setAssociatedValue(java.lang.Object key,
java.lang.Object value)
setAssociatedValue in interface StateManagerkey - Key for the valuevalue - The associated valuepublic java.lang.Object getAssociatedValue(java.lang.Object key)
getAssociatedValue in interface StateManagerkey - Key for the value
public void makePersistentTransactionalTransient()
makePersistentTransactionalTransient in interface StateManagerpublic void makeTransactional()
makeTransactional in interface StateManagerpublic void makeNontransactional()
makeNontransactional in interface StateManagerpublic void makeTransient(FetchPlanState state)
makeTransient in interface StateManagerstate - Object containing the state of any fetchplan processingpublic void detach(FetchPlanState state)
detach in interface StateManagerstate - State for the detachment processpublic java.lang.Object detachCopy(FetchPlanState state)
detachCopy in interface StateManagerstate - State for the detachment process
public java.lang.Object getReferencedPC()
getReferencedPC in interface StateManagerpublic void attach(boolean embedded)
attach in interface StateManagerembedded - Whether it is embedded
public java.lang.Object attachCopy(java.lang.Object obj,
boolean embedded)
attachCopy in interface StateManagerobj - the detached persistable instance to be attachedembedded - Whether the object is stored embedded/serialised in another object
public void deletePersistent()
deletePersistent in interface StateManagerpublic void locate()
locate in interface StateManagerNucleusObjectNotFoundException - if the object doesnt exist.public void nullifyFields()
nullifyFields in interface StateManagerpublic void validate()
validate in interface StateManagerpublic void evict()
evict in interface StateManagerpublic void refresh()
refresh in interface StateManagerpublic void retrieve(boolean fgOnly)
retrieve in interface StateManagerfgOnly - Only load the current fetch group fieldspublic void retrieve(FetchPlan fetchPlan)
retrieve in interface StateManagerfetchPlan - the fetch plan to load fieldspublic void preBegin(Transaction tx)
preBegin in interface StateManagertx - The transactionpublic void postCommit(Transaction tx)
postCommit in interface StateManagertx - The Transactionpublic void preRollback(Transaction tx)
preRollback in interface StateManagertx - The Transaction been rolled backpublic void setStoringPC()
setStoringPC in interface StateManagerpublic void unsetStoringPC()
unsetStoringPC in interface StateManagerpublic void preSerialize(javax.jdo.spi.PersistenceCapable pc)
pc - the calling PersistenceCapable instancepublic void flush()
flush in interface StateManagerprotected boolean disconnectClone(javax.jdo.spi.PersistenceCapable pc)
disconnectClone in class AbstractStateManagerpc - The PersistenceCapable object
public void disconnect()
disconnect in interface StateManagerpublic void registerTransactional()
registerTransactional in interface StateManagerpublic void retrieveDetachState(StateManager sm)
retrieveDetachState in interface StateManagersm - The State Managerpublic void resetDetachState()
resetDetachState in interface StateManager
public java.lang.Object[] replacingDetachedState(javax.jdo.spi.Detachable pc,
java.lang.Object[] currentState)
pc - The PersistenceCapable beind updatedcurrentState - The current state values
public void dump(java.io.PrintWriter out)
dump in interface StateManagerout - PrintWriter to dump to
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||