| java.lang.Object org.apache.ojb.odmg.ObjectEnvelope
Method Summary | |
void | addLinkOneToN(CollectionDescriptor col, Object source, boolean unlink) | void | addLinkOneToOne(ObjectReferenceDescriptor ord, boolean unlink) | public void | addedOneToOne(ObjectReferenceDescriptor ord, Object refObjOrProxy, Identity oid) | public void | addedXToN(CollectionDescriptor cod, Object refObjOrProxy, Identity oid) | public void | afterAbort() | public void | afterCommit() | public void | beforeAbort() | public void | beforeCommit() We need to implement the Two-Phase Commit
protocol.
beginCommit is where we say if we can or cannot
commit the transaction. | public void | cleanup(boolean reuse, boolean wasInsert) This method should be called before transaction ends
to allow cleanup of used resources, e.g. | public void | deletedOneToOne(ObjectReferenceDescriptor ord, Object refObjOrProxy, Identity oid, boolean needsUnlink) | public void | deletedXToN(CollectionDescriptor cod, Object refObjOrProxy, Identity oid) | public void | doDelete() | public void | doEvictFromCache() | public void | doInsert() | public void | doUpdate() | public Map | getBeforeImage() | public PersistenceBrokerInternal | getBroker() | ClassDescriptor | getClassDescriptor() | public Map | getCurrentImage() | ObjectEnvelopeTable | getEnvelopeTable() | public Identity | getIdentity() | public ModificationState | getModificationState() Returns the Modification-state. | public Object | getObject() Returns the managed materialized object. | public Object | getRealObject() | TransactionImpl | getTx() | public boolean | hasChanged(PersistenceBroker broker) For internal use only! Only call immediately before commit to guarantee
that all changes can be detected (because this method cache the detected "change state"
thus on eager call changes could be ignored). | public boolean | isDeleted(Identity id) Checks if the object with the given identity has been deleted
within the transaction. | public boolean | isWriteLocked() | void | markReferenceElements(PersistenceBroker broker) | public boolean | needsDelete() Returns true if the underlying Object needs an UPDATE statement, else returns false. | public boolean | needsInsert() Returns true if the underlying Object needs an INSERT statement, else returns false. | public boolean | needsUpdate() Returns true if the underlying Object needs an UPDATE statement, else returns false. | public Identity | refreshIdentity() Replace the current with a new generated identity object and
returns the old one. | public void | refreshObjectIfNeeded(Object obj) | public void | setModificationState(ModificationState newModificationState) set the Modification state to a new value. | public void | setWriteLocked(boolean writeLocked) | public String | toString() returns a String representation. |
IS_MATERIALIZED_OBJECT | final static int IS_MATERIALIZED_OBJECT(Code) | | |
IS_MATERIALIZED_PROXY | final static int IS_MATERIALIZED_PROXY(Code) | | |
IS_UNMATERIALIZED_PROXY | final static int IS_UNMATERIALIZED_PROXY(Code) | | |
serialVersionUID | final static long serialVersionUID(Code) | | |
afterAbort | public void afterAbort()(Code) | | Method declaration
|
afterCommit | public void afterCommit()(Code) | | Method declaration
|
beforeAbort | public void beforeAbort()(Code) | | Method declaration
|
beforeCommit | public void beforeCommit()(Code) | | We need to implement the Two-Phase Commit
protocol.
beginCommit is where we say if we can or cannot
commit the transaction. At the begining however,
we need to attain the after image so we can isolate
everything.
We should issue the call against the database
at this point. If we get a SQL Exception, we
should throw the org.odmg.TransactionAbortedException.
We should also check to see if the object is
TransactionAware. If so, we should give it a chance
to kill the transaction before we toss it to the
database.
|
cleanup | public void cleanup(boolean reuse, boolean wasInsert)(Code) | | This method should be called before transaction ends
to allow cleanup of used resources, e.g. remove proxy listener objects
to avoid invoke of registered objects after tx end.
|
doDelete | public void doDelete()(Code) | | |
doEvictFromCache | public void doEvictFromCache()(Code) | | |
doInsert | public void doInsert()(Code) | | |
doUpdate | public void doUpdate()(Code) | | |
getBeforeImage | public Map getBeforeImage()(Code) | | |
getCurrentImage | public Map getCurrentImage()(Code) | | |
getModificationState | public ModificationState getModificationState()(Code) | | Returns the Modification-state.
org.apache.ojb.server.states.ModificationState |
getObject | public Object getObject()(Code) | | Returns the managed materialized object.
|
hasChanged | public boolean hasChanged(PersistenceBroker broker)(Code) | | For internal use only! Only call immediately before commit to guarantee
that all changes can be detected (because this method cache the detected "change state"
thus on eager call changes could be ignored). Checks whether object and internal clone
differ and returns true if so, returns false else.
boolean The result. |
isDeleted | public boolean isDeleted(Identity id)(Code) | | Checks if the object with the given identity has been deleted
within the transaction.
Parameters: id - The identity true if the object has been deleted throws: PersistenceBrokerException - |
isWriteLocked | public boolean isWriteLocked()(Code) | | |
markReferenceElements | void markReferenceElements(PersistenceBroker broker)(Code) | | Mark new or deleted reference elements
Parameters: broker - |
needsDelete | public boolean needsDelete()(Code) | | Returns true if the underlying Object needs an UPDATE statement, else returns false.
|
needsInsert | public boolean needsInsert()(Code) | | Returns true if the underlying Object needs an INSERT statement, else returns false.
|
needsUpdate | public boolean needsUpdate()(Code) | | Returns true if the underlying Object needs an UPDATE statement, else returns false.
|
refreshIdentity | public Identity refreshIdentity()(Code) | | Replace the current with a new generated identity object and
returns the old one.
|
refreshObjectIfNeeded | public void refreshObjectIfNeeded(Object obj)(Code) | | |
setModificationState | public void setModificationState(ModificationState newModificationState)(Code) | | set the Modification state to a new value. Used during state transitions.
Parameters: newModificationState - org.apache.ojb.server.states.ModificationState |
setWriteLocked | public void setWriteLocked(boolean writeLocked)(Code) | | |
toString | public String toString()(Code) | | returns a String representation.
java.lang.String |
|
|