net.ontopia.persistence.proxy
Class RWTransaction

java.lang.Object
  extended by net.ontopia.persistence.proxy.AbstractTransaction
      extended by net.ontopia.persistence.proxy.RWTransaction
All Implemented Interfaces:
TransactionIF

public class RWTransaction
extends AbstractTransaction

INTERNAL: The read-write proxy transaction implementation.


Field Summary
protected  java.util.Set chgcre
           
protected  java.util.Set chgdel
           
protected  java.util.Set chgdty
           
protected  boolean flushing
           
 ObjectStates ostates
           
 boolean trackall
           
 
Fields inherited from class net.ontopia.persistence.proxy.AbstractTransaction
access, debug, id, identity_map, isactive, isclosed, lru, lrusize, mapping, oaccess, querymap, registrar, timestamp, txncache
 
Constructor Summary
RWTransaction(StorageAccessIF access)
           
 
Method Summary
 void assignIdentity(PersistentIF object)
           
 void create(PersistentIF object)
          INTERNAL: Registers the object with the transaction and marks it for creation in the data repository.
 void delete(PersistentIF object)
          INTERNAL: Unregisters the object with the transaction and marks it for deletion in the data repository.
 void flush()
          INTERNAL: Stores all pending changes in the data repository.
 boolean isClean()
          INTERNAL: Returns true the transaction is clean, i.e.
 boolean isObjectClean(IdentityIF identity)
           
 boolean isReadOnly()
          INTERNAL: Returns true if this is a read-only transaction.
 void objectCreated(PersistentIF object)
           
 void objectDeleted(PersistentIF object)
           
 void objectDirty(PersistentIF object)
          INTERNAL: Called by PersistentIFs when the object's data has changed.
 void objectRead(IdentityIF identity)
           
 void prefetch(java.lang.Object type, int[] fields, boolean[] traverse, java.util.Collection identities)
           
 void prefetch(java.lang.Object type, int field, boolean traverse, java.util.Collection identities)
           
protected  void transactionPostAbort()
           
protected  void transactionPostCommit()
           
protected  void transactionPreAbort()
           
protected  void transactionPreCommit()
           
 
Methods inherited from class net.ontopia.persistence.proxy.AbstractTransaction
_getObject, abort, begin, close, commit, createInstance, createQuery, executeQuery, extractFieldValues, extractNonDirty, getAccessRegistrar, getId, getObject, getObject, getObjectAccess, getQuery, getStorageAccess, isActive, isFieldLoaded, isObjectLoaded, loadField, registerQuery, toString, validate, writeIdentityMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

trackall

public boolean trackall

ostates

public ObjectStates ostates

chgcre

protected java.util.Set chgcre

chgdel

protected java.util.Set chgdel

chgdty

protected java.util.Set chgdty

flushing

protected boolean flushing
Constructor Detail

RWTransaction

public RWTransaction(StorageAccessIF access)
Method Detail

isClean

public boolean isClean()
Description copied from interface: TransactionIF
INTERNAL: Returns true the transaction is clean, i.e. no changes have been made.


isReadOnly

public boolean isReadOnly()
Description copied from interface: TransactionIF
INTERNAL: Returns true if this is a read-only transaction.


assignIdentity

public void assignIdentity(PersistentIF object)

create

public void create(PersistentIF object)
Description copied from interface: TransactionIF
INTERNAL: Registers the object with the transaction and marks it for creation in the data repository.


delete

public void delete(PersistentIF object)
Description copied from interface: TransactionIF
INTERNAL: Unregisters the object with the transaction and marks it for deletion in the data repository.


flush

public void flush()
Description copied from interface: TransactionIF
INTERNAL: Stores all pending changes in the data repository. Note that the transaction is not commited.

Specified by:
flush in interface TransactionIF
Specified by:
flush in class AbstractTransaction

objectDirty

public void objectDirty(PersistentIF object)
Description copied from interface: TransactionIF
INTERNAL: Called by PersistentIFs when the object's data has changed.


objectRead

public void objectRead(IdentityIF identity)

objectCreated

public void objectCreated(PersistentIF object)

objectDeleted

public void objectDeleted(PersistentIF object)

isObjectClean

public boolean isObjectClean(IdentityIF identity)

transactionPreCommit

protected void transactionPreCommit()
Specified by:
transactionPreCommit in class AbstractTransaction

transactionPostCommit

protected void transactionPostCommit()
Specified by:
transactionPostCommit in class AbstractTransaction

transactionPreAbort

protected void transactionPreAbort()
Specified by:
transactionPreAbort in class AbstractTransaction

transactionPostAbort

protected void transactionPostAbort()
Specified by:
transactionPostAbort in class AbstractTransaction

prefetch

public void prefetch(java.lang.Object type,
                     int field,
                     boolean traverse,
                     java.util.Collection identities)
Specified by:
prefetch in interface TransactionIF
Overrides:
prefetch in class AbstractTransaction

prefetch

public void prefetch(java.lang.Object type,
                     int[] fields,
                     boolean[] traverse,
                     java.util.Collection identities)
Specified by:
prefetch in interface TransactionIF
Overrides:
prefetch in class AbstractTransaction


Copyright © 2000-2012 Ontopia.