com.objectwave.transactionalSupport
Interface ObjectEditingView

All Superinterfaces:
SetAndGetDelegateIF
All Known Implementing Classes:
NoFieldObjectEditor, ObjectEditor

public interface ObjectEditingView
extends SetAndGetDelegateIF

The interface to the object that will keep track of ObjectChanges.

Version:
$Id: ObjectEditingView.java,v 2.1 2002/02/01 21:43:07 dave_hoag Exp $
Author:
dhoag

Method Summary
 java.util.Enumeration changes(TransactionLog log)
          An enumeration of ObjectChangeRequest objects for this particular transaction log.
 void clearChanges(TransactionLog log)
          DO NOT USE THIS METHOD.
 void commit(TransactionLog log, boolean force)
          Commit the changes found in the transaction log to the transactional object.
 boolean containsAnyChanges()
          Broader in scope than isDirty.
 TransactionalObjectIF getDomainObject()
          The object for which this EditingView represents.
 boolean isDirty()
          Gets the Dirty attribute of the ObjectEditingView object
 boolean isTransient()
          Gets the Transient attribute of the ObjectEditingView object
 boolean lock(boolean wait)
          Pessimistically lock the object.
 void migrateChanges(TransactionLog log, TransactionLog newLog)
          Used by nested transactions.
 void rollback(TransactionLog log, boolean forget)
          Rollback the changes found in the transaction log to the transactional object.
 void setAsTransient(boolean value)
          Sets the AsTransient attribute of the ObjectEditingView object
 void unlock()
          This method was created in VisualAge.
 
Methods inherited from interface com.objectwave.transactionalSupport.SetAndGetDelegateIF
get, get, get, get, get, get, get, get, get, set, set, set, set, set, set, set, set, set, set, set
 

Method Detail

changes

public java.util.Enumeration changes(TransactionLog log)
An enumeration of ObjectChangeRequest objects for this particular transaction log.

Parameters:
log -
Returns:

clearChanges

public void clearChanges(TransactionLog log)
DO NOT USE THIS METHOD.

Parameters:
log -

commit

public void commit(TransactionLog log,
                   boolean force)
            throws UpdateException
Commit the changes found in the transaction log to the transactional object.

Parameters:
log -
force -
Throws:
UpdateException

containsAnyChanges

public boolean containsAnyChanges()
Broader in scope than isDirty. Are there ANY changes for ANY transaction log for this object.

Returns:

getDomainObject

public TransactionalObjectIF getDomainObject()
The object for which this EditingView represents.

Returns:
The DomainObject value

isDirty

public boolean isDirty()
Gets the Dirty attribute of the ObjectEditingView object

Returns:
The Dirty value

isTransient

public boolean isTransient()
Gets the Transient attribute of the ObjectEditingView object

Returns:
The Transient value

lock

public boolean lock(boolean wait)
Pessimistically lock the object. Note that a thread calling lock() must eventually call unlock(), to allow and waiting threads access to this object. Failure to unlock this object will likely lead to stagnant threads, a prime candidate for a deadlock situation. In short, always unlock the object. This locking scheme is also reference-counted to accomodate the rare scenario where a thread may lock an object several times: the object remains locked until it has been unlocked the same number of times that it has been locked.

Parameters:
wait - boolean true if the current thread should wait until lock is available. Otherwise return immediately.
Returns:
boolean true if and only if the object was successfully locked.

migrateChanges

public void migrateChanges(TransactionLog log,
                           TransactionLog newLog)
Used by nested transactions. A subtransaction has been commited. Move the sub transaction changes to the parent transaction.

Parameters:
log -
newLog -

rollback

public void rollback(TransactionLog log,
                     boolean forget)
Rollback the changes found in the transaction log to the transactional object.

Parameters:
log -
forget -

setAsTransient

public void setAsTransient(boolean value)
Sets the AsTransient attribute of the ObjectEditingView object

Parameters:
value - The new AsTransient value

unlock

public void unlock()
This method was created in VisualAge.