com.extentech.ExtenBean
Class Transaction

java.lang.Object
  extended by com.extentech.ExtenBean.Transaction

public class Transaction
extends java.lang.Object

Provides a simple transaction mechanism for DataObjects. The controller must create a transaction. then add DataObjects to the transaction to register them as part of the transaction. Begintrans() will initiate the saved state of the transacted objects. A call to commit iterates through the DataObjects and performs an updateObject() for each. If one update fails, the entire set of DataObjects is reset to its original (pre-begintrans()) state.

Version:
1.1
Author:
John McMahon -- Copyright ©2011Extentech Inc.
See Also:
ExtenBeanFactory, DataObject, colinfo

Constructor Summary
Transaction()
           
 
Method Summary
 void addObject(DataObject o)
           
 void begintrans()
           
 boolean commit()
           
 void rollback()
           
 void setFactory(PersistenceEngine d)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction()
Method Detail

setFactory

public void setFactory(PersistenceEngine d)

addObject

public void addObject(DataObject o)

begintrans

public void begintrans()

rollback

public void rollback()
              throws java.sql.SQLException
Throws:
java.sql.SQLException

commit

public boolean commit()
               throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2011 Extentech Inc. All Rights Reserved.