| org.objectweb.speedo.mim.api.StateItf
All known Subclasses: org.objectweb.speedo.mim.lib.AbstractStateImpl,
StateItf | public interface StateItf extends PAccessor,org.objectweb.perseus.persistence.api.State,Serializable(Code) | | This interface a state of an user instance.
author: S.Chassande-Barrioz |
Method Summary | |
void | attachCopy(POManagerItf pm, Map map, StateItf detached) This method is used during the attach operation. | boolean | checkVersion(StateItf sa) check the validity of the version of sa compared to the persistent object this. | void | deletePersistent(POManagerItf pm) Deletes persistent all inner elements of the persistent instance. | void | detachCopy(POManagerItf pm, Map map, StateItf clone, Collection fgHints) This method is used during the detach operation. | void | forceDetachedDirty() | byte | getDetachedStatus() | PersistentObjectItf | getSpeedoPO() | long | getVersion() | boolean | hasBeenFlush() indicates if the object has been flushed on the support in a writing
before the end of the working set (commit | rollback | close). | void | indexFieldModified(int cacheId, boolean rebind) The field uses in user cache, has been modified.
Parameters: cacheId - is the cache identifier. | boolean | isToMerge() indicates if the StateItf has to be merge with the reference state at commit
time. | void | loadFields(POManagerItf pm, long[] fields) Askes the loading of the some fields identified by the long array.
Parameters: pm - is the po manager to use to load references Parameters: fields - is an array of long. | void | makePersistent(POManagerItf pm) Makes persistent all inner elements of the persistent instance. | void | makePersistentOnAttach(POManagerItf pm, Map map) makes persistent on attach, taking into account the map
representing the attch context.
It enables to avoid cycles. | void | makeToMerge(Object thinLock) Mark the current state with the flag 'toMerge'. | org.objectweb.perseus.persistence.api.State | merge(org.objectweb.perseus.persistence.api.State oldState) This action updates the old state with the change (delta) done in the
transaction on this state. | void | prepareWrite() | void | refresh(POManagerItf pm, Map map, Collection fgHints) This method is used during the refresh operation. | void | restoreDetachedNone() | void | retrieve(POManagerItf pm, Map map, Collection fgHints) This method is used during the retrieve operation. | void | setDetachedStatus(byte newValue) | void | setFlushed(boolean val) Assignates a boolean value to indicate if the object has been flushed
on the support in a writing before the end of the working
set (commit | rollback | close). | void | setSpeedoPO(PersistentObjectItf sp) Assignes the PersistentObjectItf attached to this state representation. | void | speedoChangeStatus(byte action) | void | speedoChangeVersion() change the version of this only if needed
The version is computed by this method
A call to changeVersion can have no effect. | byte | speedoGetStatus() | void | speedoSetStatus(byte newValue) | void | unSwizzle() | void | workingSetClosed() The context has been closed (ex: transaction end). |
attachCopy | void attachCopy(POManagerItf pm, Map map, StateItf detached)(Code) | | This method is used during the attach operation. A call to this method
copy the field of the cloned state into the the current state. When a field
references a persistent object, according to the fetch plan, the
referenced can be attached too.
Parameters: pm - is the po manager used during the attach operation Parameters: map - is the map of the atttached object. The use of this map permitsto support cycle in the object graph. Parameters: detached - is the detached state used to update the current state |
checkVersion | boolean checkVersion(StateItf sa)(Code) | | check the validity of the version of sa compared to the persistent object this.
|
deletePersistent | void deletePersistent(POManagerItf pm)(Code) | | Deletes persistent all inner elements of the persistent instance. For a
class, it means deleting persistent all objects referenced by a persistent
field. For a genclass it means deleting persistent element of the genclass.
This method is called when a deletePersistent is called on the persistent
class (po) linked to this accessor.
Parameters: pm - is the po manager for making persistent inner element. |
detachCopy | void detachCopy(POManagerItf pm, Map map, StateItf clone, Collection fgHints)(Code) | | This method is used during the detach operation. A call to this method
copy the field of the state into the the cloned state. When a field
references a persistent object, according to the fetch plan, the
referenced can be detached too.
Parameters: pm - is the po manager used during the detach operation Parameters: map - is the map of the detached object. The use of this map permitsto support cycle in the object graph. Parameters: clone - is a clone of the current state Parameters: fgHints - represents the fetch plan. |
forceDetachedDirty | void forceDetachedDirty()(Code) | | Force the detached status to DETACHED_DIRTY and
all the xxxLoaded to true
|
getDetachedStatus | byte getDetachedStatus()(Code) | | Gets the current status of this detached object
the current state in the life cycle |
getVersion | long getVersion()(Code) | | Return the version of the object as a long
|
hasBeenFlush | boolean hasBeenFlush()(Code) | | indicates if the object has been flushed on the support in a writing
before the end of the working set (commit | rollback | close).
|
indexFieldModified | void indexFieldModified(int cacheId, boolean rebind)(Code) | | The field uses in user cache, has been modified.
Parameters: cacheId - is the cache identifier. The value Integer.MAX_VALUEmeans that all user cache must be updated. Parameters: rebind - if true, the speedoAcessor is rebound |
isToMerge | boolean isToMerge()(Code) | | indicates if the StateItf has to be merge with the reference state at commit
time.
|
loadFields | void loadFields(POManagerItf pm, long[] fields)(Code) | | Askes the loading of the some fields identified by the long array.
Parameters: pm - is the po manager to use to load references Parameters: fields - is an array of long. Each long is a bit mask indicatingfields to load. As a long is stored over 64 bits, each long of the arraycan represent only 64 persistent fields. If the class has 70 persistentfield, the parameter could be a long array size is 2. This parametercan be null if no field loading is required. |
makePersistent | void makePersistent(POManagerItf pm)(Code) | | Makes persistent all inner elements of the persistent instance. For a
class, it means making persistent all objects referenced by a persistent
field. For a genclass it means making persistent element of the genclass.
This method is called when a makePersistent is called on the persistent
class (PO) linked to this accessor.
Parameters: pm - is the po manager for making persistent inner element. |
makePersistentOnAttach | void makePersistentOnAttach(POManagerItf pm, Map map)(Code) | | makes persistent on attach, taking into account the map
representing the attch context.
It enables to avoid cycles.
Parameters: pm - is the po manager for making persistent inner element. Parameters: map - is the context of the attachment process. |
makeToMerge | void makeToMerge(Object thinLock)(Code) | | Mark the current state with the flag 'toMerge'. This status means at
commit time this state has to be merge with the referenceState (cache).
Since this method call and until the transaction end, the implementation
could register the change for the merge.
Parameters: thinLock - is an object representing the thin lock |
merge | org.objectweb.perseus.persistence.api.State merge(org.objectweb.perseus.persistence.api.State oldState)(Code) | | This action updates the old state with the change (delta) done in the
transaction on this state.
Parameters: oldState - is the state which has to be updated the updated state. |
prepareWrite | void prepareWrite()(Code) | | Prepare to write (relations consistency management)
|
refresh | void refresh(POManagerItf pm, Map map, Collection fgHints)(Code) | | This method is used during the refresh operation. A call to this method
refreshes the fields of the current state. When a field
references a persistent object, according to the fetch plan, the
referenced can be refreshed too.
Parameters: pm - is the po manager used during the refresh operation Parameters: map - is the map of the refreshed object. The use of this map permitsto support cycle in the object graph. Parameters: fgHints - represents the fetch plan. |
restoreDetachedNone | void restoreDetachedNone()(Code) | | Restore the detached status to DETACHED_NONE and
all the xxxLoaded to false
|
retrieve | void retrieve(POManagerItf pm, Map map, Collection fgHints)(Code) | | This method is used during the retrieve operation. A call to this method
retrieves the fields of the current state. When a field
references a persistent object, according to the fetch plan, the
referenced can be retrieved too.
Parameters: pm - is the po manager used during the retrieve operation Parameters: map - is the map of the retrieved object. The use of this map permitsto support cycle in the object graph. Parameters: fgHints - represents the fetch plan. |
setDetachedStatus | void setDetachedStatus(byte newValue)(Code) | | Forces the new value of the detached status
Parameters: newValue - the new status of this object |
setFlushed | void setFlushed(boolean val)(Code) | | Assignates a boolean value to indicate if the object has been flushed
on the support in a writing before the end of the working
set (commit | rollback | close).
Parameters: val - is the boolean which must be assigned. |
setSpeedoPO | void setSpeedoPO(PersistentObjectItf sp)(Code) | | Assignes the PersistentObjectItf attached to this state representation.
|
speedoChangeVersion | void speedoChangeVersion()(Code) | | change the version of this only if needed
The version is computed by this method
A call to changeVersion can have no effect.
|
unSwizzle | void unSwizzle()(Code) | | |
workingSetClosed | void workingSetClosed()(Code) | | The context has been closed (ex: transaction end).
|
|
|