com.objectwave.persist
Class BrokerTransactionLog

java.lang.Object
  |
  +--com.objectwave.transactionalSupport.TransactionLog
        |
        +--com.objectwave.persist.BrokerTransactionLog

public class BrokerTransactionLog
extends TransactionLog

Provide some database specific transactional stuff. If we have an RDBTransaction log this log can provide support to saving change objects. CAUTION : - IF A QUERY IS EXECUTED WITH AN OBJECT THAT WAS ONCE MARKED DIRTY, THAT OBJECT WILL BE REMOVED FROM THE TRANSACTION LOG. COMMIT CHANGES BEFORE USING AN OBJECT AS A QUERY!!!!

Version:
$Id: BrokerTransactionLog.java,v 2.1 2001/06/15 13:45:32 dave_hoag Exp $
Author:
dhoag

Nested Class Summary
 
Nested classes inherited from class com.objectwave.transactionalSupport.TransactionLog
TransactionLog.Test
 
Field Summary
 
Fields inherited from class com.objectwave.transactionalSupport.TransactionLog
committing, editedObjects, editedObjectsCount, lastObj, parentTransaction, subTransaction, transactionManager
 
Constructor Summary
BrokerTransactionLog()
           
BrokerTransactionLog(java.lang.String brokerType)
           
 
Method Summary
protected  void actualCommit()
          Called by super class when we are ready to really commit the values.
protected  void commit(boolean force)
          Copy the values from the object editing view into the domain object.
 void forceCommit()
          Commit the values ignoring any transaction conflicts.
protected  com.objectwave.persist.BrokerChangeList getModifiedObjects(boolean force)
          Select those objects that need to be saved to and delete from the relational database.
protected  void initialize(java.lang.String brokerType)
           
protected  void restoreObject(ObjectEditingView view, boolean force)
          Copy the values from the ObjectEditor into the Object.
 void rollback()
          Return the object back to it's original state, and discard the changes made in this transaction.
 void setBroker(Broker brok)
          Sets the Broker attribute of the BrokerTransactionLog object
 
Methods inherited from class com.objectwave.transactionalSupport.TransactionLog
addObject, addSubTransaction, addTransactionSupport, chainCommit, clearUpChanges, commit, commit, commitRootLevelTransaction, commitSubTransaction, contains, contains, getCurrentInstance, getEditedObjects, getNewTransaction, getParentTransaction, getSubTransaction, hasTransactions, limitedRollback, migrateChangesTo, removeObject, reset, rollback, setAllowNesting, setContext, setDefaultInstance, setTransactionManager, startRootTransaction, startRootTransaction, startRootTransaction, startTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrokerTransactionLog

public BrokerTransactionLog()

BrokerTransactionLog

public BrokerTransactionLog(java.lang.String brokerType)
                     throws QueryException
Parameters:
brokerType -
Throws:
QueryException
Method Detail

setBroker

public void setBroker(Broker brok)
Sets the Broker attribute of the BrokerTransactionLog object

Parameters:
brok - The new Broker value

getModifiedObjects

protected com.objectwave.persist.BrokerChangeList getModifiedObjects(boolean force)
                                                              throws UpdateException
Select those objects that need to be saved to and delete from the relational database. I considered having this object 'delete' any values that are dropped from a collection, but that is not necessarily what I want to do. It is up to the application developer to mark what objects are to be deleted. Side effect of 'commiting' changes into object.

Parameters:
force -
Returns:
The ModifiedObjects value
Throws:
UpdateException

forceCommit

public void forceCommit()
Description copied from class: TransactionLog
Commit the values ignoring any transaction conflicts.

Overrides:
forceCommit in class TransactionLog

rollback

public void rollback()
Description copied from class: TransactionLog
Return the object back to it's original state, and discard the changes made in this transaction.

Overrides:
rollback in class TransactionLog

actualCommit

protected void actualCommit()
                     throws UpdateException
Called by super class when we are ready to really commit the values. This only occurs for top level Transactions. Changes in nested transactions are migrated to top level transactions by calls to commit().

Overrides:
actualCommit in class TransactionLog
Throws:
UpdateException

commit

protected void commit(boolean force)
               throws UpdateException
Copy the values from the object editing view into the domain object. Try to save all of the persistent objects to the database.

Parameters:
force -
Throws:
UpdateException

initialize

protected void initialize(java.lang.String brokerType)
                   throws QueryException
Parameters:
brokerType -
Throws:
QueryException

restoreObject

protected void restoreObject(ObjectEditingView view,
                             boolean force)
                      throws UpdateException
Copy the values from the ObjectEditor into the Object. Used to 'rollback' changes into the object.

Parameters:
view -
force -
Throws:
UpdateException