|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.mim.lib.BasicSpeedoAccessor
This class is the basic implementation of the SpeedoAccessor 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 |
SpeedoProxy |
proxy
|
Constructor Summary | |
---|---|
BasicSpeedoAccessor()
|
|
BasicSpeedoAccessor(SpeedoProxy _proxy)
|
Method Summary | |
---|---|
void |
changeVersion()
change the version of this only if needed The version is computed by this method A call to changeVersion can have no effect. |
boolean |
checkVersion(SpeedoAccessor sa)
check the validity of the version of sa compared to the persistent object this. |
org.objectweb.perseus.cache.api.CacheEntry |
getCacheEntry()
|
byte |
getDetachedStatus()
Gets the current status of this detached object |
java.lang.Object |
getMemoryInstance()
|
SpeedoProxy |
getSpeedoProxy()
|
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 State has to be merge with the reference state at commit time. |
void |
jdoChangeStatus(byte action)
Changes the status of this object |
byte |
jdoGetStatus()
Gets the current status of this object |
void |
jdoSetStatus(byte newValue)
Forces the new value of the status |
void |
makeToMerge(java.lang.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()
Prepare to write (relations consistency management) |
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 |
setSpeedoProxy(SpeedoProxy sp)
It assignes the SpeedoProxy attached to this state representation. |
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.SpeedoAccessor |
---|
attachCopy, deletePersistent, detachCopy, forceDetachedDirty, loadFields, makePersistent, refresh, restoreDetachedNone, retrieve, unSwizzle |
Field Detail |
protected byte jdoStatus
public byte detachedStatus
protected boolean isToMerge
public SpeedoProxy proxy
public boolean hasBeenFlush
Constructor Detail |
public BasicSpeedoAccessor()
public BasicSpeedoAccessor(SpeedoProxy _proxy)
Method Detail |
public org.objectweb.perseus.cache.api.CacheEntry getCacheEntry()
getCacheEntry
in interface org.objectweb.perseus.persistence.api.State
public java.lang.Object getMemoryInstance()
getMemoryInstance
in interface org.objectweb.jorm.api.PAccessor
public void jdoChangeStatus(byte action)
jdoChangeStatus
in interface SpeedoAccessor
action
- the action that may change the statusLifeCycle
public byte jdoGetStatus()
jdoGetStatus
in interface SpeedoAccessor
LifeCycle
public void jdoSetStatus(byte newValue)
jdoSetStatus
in interface SpeedoAccessor
newValue
- the new status of this objectLifeCycle
public byte getDetachedStatus()
SpeedoAccessor
getDetachedStatus
in interface SpeedoAccessor
public void setDetachedStatus(byte newValue)
SpeedoAccessor
setDetachedStatus
in interface SpeedoAccessor
newValue
- the new status of this objectpublic SpeedoProxy getSpeedoProxy()
getSpeedoProxy
in interface SpeedoAccessor
public void setSpeedoProxy(SpeedoProxy sp)
setSpeedoProxy
in interface SpeedoAccessor
public void prepareWrite()
SpeedoAccessor
prepareWrite
in interface SpeedoAccessor
public void workingSetClosed()
SpeedoAccessor
workingSetClosed
in interface SpeedoAccessor
public boolean hasBeenFlush()
SpeedoAccessor
hasBeenFlush
in interface SpeedoAccessor
public void setFlushed(boolean val)
SpeedoAccessor
setFlushed
in interface SpeedoAccessor
val
- is the boolean which must be assigned.public void changeVersion()
SpeedoAccessor
changeVersion
in interface SpeedoAccessor
public boolean checkVersion(SpeedoAccessor sa)
SpeedoAccessor
checkVersion
in interface SpeedoAccessor
public long getVersion()
SpeedoAccessor
getVersion
in interface SpeedoAccessor
public boolean isToMerge()
SpeedoAccessor
isToMerge
in interface SpeedoAccessor
public void makeToMerge(java.lang.Object thinLock)
SpeedoAccessor
makeToMerge
in interface SpeedoAccessor
thinLock
- is an object representing the thin lockpublic org.objectweb.perseus.persistence.api.State merge(org.objectweb.perseus.persistence.api.State oldState)
SpeedoAccessor
merge
in interface SpeedoAccessor
oldState
- is the state which has to be updated
public java.lang.Object getUserKey(int cacheId)
public void indexFieldModified(int cacheId, boolean rebind)
SpeedoAccessor
indexFieldModified
in interface SpeedoAccessor
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 |