|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ojb.otm.core.ConcreteEditingContext
Concrete implementation of EditingContext.
EditingContext| Constructor Summary | |
ConcreteEditingContext(Transaction tx,
PersistenceBroker pb)
|
|
| Method Summary | |
void |
afterMaterialization(IndirectionHandler handler,
java.lang.Object object)
this callback is invoked after an Object is materialized within an IndirectionHandler. |
void |
beforeMaterialization(IndirectionHandler handler,
Identity oid)
this callback is invoked before an Object is materialized within an IndirectionHandler. |
void |
cache(Identity oid,
java.lang.Object obj)
makes object obj persistent to the Objectcache under the key oid. |
void |
checkpoint()
Writes all changes in this context into the persistent store. |
void |
clear()
clear the ObjectCache. |
void |
commit()
Commit this context into the persistent store. |
void |
deletePersistent(Identity oid,
java.lang.Object object)
|
java.util.Collection |
getAllObjectsInContext()
|
void |
insert(Identity oid,
java.lang.Object obj,
int lock)
Insert the given object into the EditingContext, acquiring the specified lock. |
java.lang.Object |
lookup(Identity oid)
Lookup object with the given oid in the Context. |
State |
lookupState(Identity oid)
lookup the state of an object, given the oid, in the context |
void |
remove(Identity oid)
Remove a managed object from the management of this EditingContext. |
void |
rollback()
Rollback all changes made during this transaction. |
void |
setState(Identity oid,
State state)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConcreteEditingContext(Transaction tx,
PersistenceBroker pb)
| Method Detail |
public void insert(Identity oid,
java.lang.Object obj,
int lock)
throws LockingException
EditingContext
insert in interface EditingContextoid - the identity of the object to be insertedobj - the object to insertlock - the lock to be acquired.
LockingException - thrown by the Lock Manager to avoid deadlocks. The insertion
could be re-attempted if the lock fails.EditingContext.insert(Identity, Object, int)public void remove(Identity oid)
EditingContext
remove in interface EditingContextoid - the Identity of the object to be removed from this context.EditingContext.remove(Identity)
public void deletePersistent(Identity oid,
java.lang.Object object)
throws LockingException
LockingExceptionpublic java.lang.Object lookup(Identity oid)
EditingContext
lookup in interface EditingContextoid - the oid of the object to lookupEditingContext.lookup(Identity)
public State lookupState(Identity oid)
throws LockingException
EditingContext
lookupState in interface EditingContextoid -
LockingExceptionEditingContext.lookupState(Identity)
public void setState(Identity oid,
State state)
setState in interface EditingContextEditingContext.setState(Identity, State)public java.util.Collection getAllObjectsInContext()
getAllObjectsInContext in interface EditingContext
public void beforeMaterialization(IndirectionHandler handler,
Identity oid)
MaterializationListener
beforeMaterialization in interface MaterializationListenerhandler - the invoking handleroid - the identity of the object to be materialized
public void afterMaterialization(IndirectionHandler handler,
java.lang.Object object)
MaterializationListener
afterMaterialization in interface MaterializationListenerhandler - the invoking handlerobject - the materialized Object
public void commit()
throws TransactionAbortedException
TransactionAbortedException
public void checkpoint()
throws TransactionAbortedException
TransactionAbortedExceptionpublic void rollback()
public void cache(Identity oid,
java.lang.Object obj)
ObjectCache
cache in interface ObjectCachepublic void clear()
ObjectCache
clear in interface ObjectCache
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||