|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.odmg.ObjectEnvelope
ObjectEnvelope is used during ODMG transactions as a wrapper for a persistent objects declaration
Nested Class Summary | |
static class |
ObjectEnvelope.ImageExcetion
Thrown if something unexpected is happen when handling the object images for state detection. |
Constructor Summary | |
ObjectEnvelope(ObjectEnvelopeTable buffer,
Identity oid,
java.lang.Object obj,
boolean isNewObject)
Create a wrapper by providing an Object. |
Method Summary | |
void |
afterAbort()
Method declaration |
void |
afterCommit()
Method declaration |
void |
beforeAbort()
Method declaration |
void |
beforeCommit()
We need to implement the Two-Phase Commit protocol. |
void |
close()
|
void |
doDelete()
|
void |
doEvictFromCache()
|
void |
doInsert()
|
void |
doUpdate()
|
java.util.Map |
getBeforeImage()
|
PersistenceBroker |
getBroker()
|
java.util.Map |
getCurrentImage()
|
Identity |
getIdentity()
|
org.apache.ojb.odmg.states.ModificationState |
getModificationState()
returns the Modification-state. |
java.lang.Object |
getObject()
returns the managed object. |
boolean |
hasChanged(PersistenceBroker broker)
checks whether object and internal clone differ and returns true if so, returns false else. |
boolean |
isDeleted(Identity id)
Checks if the object with the given identity has been deleted within the transaction. |
boolean |
isWriteLocked()
|
boolean |
needsDelete()
returns true if the underlying Object needs an UPDATE statement, else returns false. |
boolean |
needsInsert()
returns true if the underlying Object needs an INSERT statement, else returns false. |
boolean |
needsUpdate()
returns true if the underlying Object needs an UPDATE statement, else returns false. |
void |
refreshObjectIfNeeded(java.lang.Object obj)
|
void |
refreshObjectImage()
|
void |
setModificationState(org.apache.ojb.odmg.states.ModificationState newModificationState)
set the Modification state to a new value. |
void |
setWriteLocked(boolean writeLocked)
|
java.lang.String |
toString()
returns a String representation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ObjectEnvelope(ObjectEnvelopeTable buffer, Identity oid, java.lang.Object obj, boolean isNewObject)
Method Detail |
public PersistenceBroker getBroker()
public java.util.Map getBeforeImage()
public java.util.Map getCurrentImage()
public void close()
public void refreshObjectImage()
public Identity getIdentity()
public java.lang.Object getObject()
public void refreshObjectIfNeeded(java.lang.Object obj)
public void beforeCommit()
public void afterCommit()
public void beforeAbort()
public void afterAbort()
public org.apache.ojb.odmg.states.ModificationState getModificationState()
public boolean needsInsert()
needsInsert
in interface ObjectModification
public boolean needsUpdate()
needsUpdate
in interface ObjectModification
public boolean needsDelete()
public boolean isDeleted(Identity id)
id
- The identity
PersistenceBrokerException
public void setModificationState(org.apache.ojb.odmg.states.ModificationState newModificationState)
newModificationState
- org.apache.ojb.server.states.ModificationStatepublic java.lang.String toString()
public boolean hasChanged(PersistenceBroker broker)
public void doUpdate()
public void doInsert()
public void doDelete()
public void doEvictFromCache()
public boolean isWriteLocked()
public void setWriteLocked(boolean writeLocked)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |