|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.mim.lib.AbstractStateImpl
public abstract class AbstractStateImpl
This class is the basic implementation of the StateItf interface. It is used at the top of the XXXFields class inheritance.
Field Summary | |
---|---|
byte |
detachedStatus
|
boolean |
hasBeenFlush
|
protected boolean |
isToMerge
|
protected byte |
jdoStatus
This version is allocated: - before attach - before detach - before commit |
PersistentObjectItf |
speedoPO
|
Constructor Summary | |
---|---|
AbstractStateImpl()
|
|
AbstractStateImpl(PersistentObjectItf thepo)
|
Method Summary | |
---|---|
boolean |
checkVersion(StateItf sa)
check the validity of the version of sa compared to the persistent object this. |
CacheEntry |
getCacheEntry()
|
byte |
getDetachedStatus()
Gets the current status of this detached object |
java.lang.Object |
getMemoryInstance()
|
PersistentObjectItf |
getSpeedoPO()
|
java.lang.Object |
getUserKey(int cacheId)
|
long |
getVersion()
Return the version of the object as a long |
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. |
boolean |
isToMerge()
indicates if the StateItf has to be merge with the reference state at commit time. |
void |
makeToMerge(java.lang.Object thinLock)
Mark the current state with the flag 'toMerge'. |
State |
merge(State oldState)
This action updates the old state with the change (delta) done in the transaction on this state. |
void |
prepareWrite()
Prepare to write (relations consistency management) |
void |
setCacheEntry(CacheEntry ce)
|
void |
setDetachedStatus(byte newValue)
Forces the new value of the detached status |
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)
It assignes the PersistentObjectItf attached to this state representation. |
void |
speedoChangeStatus(byte action)
Changes the status of this object |
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()
Gets the current status of this object |
void |
speedoSetStatus(byte newValue)
Forces the new value of the status |
void |
workingSetClosed()
The context has been closed (ex: transaction end). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.speedo.mim.api.StateItf |
---|
attachCopy, deletePersistent, detachCopy, forceDetachedDirty, loadFields, makePersistent, makePersistentOnAttach, refresh, restoreDetachedNone, retrieve, unSwizzle |
Field Detail |
---|
protected byte jdoStatus
public byte detachedStatus
protected boolean isToMerge
public PersistentObjectItf speedoPO
public boolean hasBeenFlush
Constructor Detail |
---|
public AbstractStateImpl()
public AbstractStateImpl(PersistentObjectItf thepo)
Method Detail |
---|
public CacheEntry getCacheEntry()
getCacheEntry
in interface State
public void setCacheEntry(CacheEntry ce)
setCacheEntry
in interface State
public java.lang.Object getMemoryInstance()
getMemoryInstance
in interface org.objectweb.jorm.api.PAccessor
public void speedoChangeStatus(byte action)
speedoChangeStatus
in interface StateItf
action
- the action that may change the statusLifeCycle
public byte speedoGetStatus()
speedoGetStatus
in interface StateItf
LifeCycle
public void speedoSetStatus(byte newValue)
speedoSetStatus
in interface StateItf
newValue
- the new status of this objectLifeCycle
public byte getDetachedStatus()
StateItf
getDetachedStatus
in interface StateItf
public void setDetachedStatus(byte newValue)
StateItf
setDetachedStatus
in interface StateItf
newValue
- the new status of this objectpublic PersistentObjectItf getSpeedoPO()
getSpeedoPO
in interface StateItf
public void setSpeedoPO(PersistentObjectItf sp)
setSpeedoPO
in interface StateItf
public void prepareWrite()
StateItf
prepareWrite
in interface StateItf
public void workingSetClosed()
StateItf
workingSetClosed
in interface StateItf
public boolean hasBeenFlush()
StateItf
hasBeenFlush
in interface StateItf
public void setFlushed(boolean val)
StateItf
setFlushed
in interface StateItf
val
- is the boolean which must be assigned.public void speedoChangeVersion()
StateItf
speedoChangeVersion
in interface StateItf
public boolean checkVersion(StateItf sa)
StateItf
checkVersion
in interface StateItf
public long getVersion()
StateItf
getVersion
in interface StateItf
public boolean isToMerge()
StateItf
isToMerge
in interface StateItf
public void makeToMerge(java.lang.Object thinLock)
StateItf
makeToMerge
in interface StateItf
thinLock
- is an object representing the thin lockpublic State merge(State oldState)
StateItf
merge
in interface StateItf
oldState
- is the state which has to be updated
public java.lang.Object getUserKey(int cacheId)
public void indexFieldModified(int cacheId, boolean rebind)
StateItf
indexFieldModified
in interface StateItf
cacheId
- is the cache identifier. The value Integer.MAX_VALUE
means that all user cache must be updated.rebind
- if true, the speedoAcessor is rebound
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |