edu.internet2.middleware.grouper.internal.dao.hib3
Class Hib3TransactionDAO

java.lang.Object
  extended by edu.internet2.middleware.grouper.internal.dao.hib3.Hib3TransactionDAO
All Implemented Interfaces:
TransactionDAO

public class Hib3TransactionDAO
extends Object
implements TransactionDAO

Author:
mchyzer

Constructor Summary
Hib3TransactionDAO()
           
 
Method Summary
 boolean transactionActive(GrouperTransaction grouperTransaction)
          call this to see if a transaction is active (exists and not committed or rolledback)
 Object transactionCallback(GrouperTransactionType grouperTransactionType, GrouperTransactionHandler grouperTransactionHandler, GrouperTransaction grouperTransaction)
          any runtime exceptions will propagate to the outer method call
 boolean transactionCommit(GrouperTransaction grouperTransaction, GrouperCommitType grouperCommitType)
          call this to commit a transaction
 boolean transactionRollback(GrouperTransaction grouperTransaction, GrouperRollbackType grouperRollbackType)
          call this to rollback a transaction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hib3TransactionDAO

public Hib3TransactionDAO()
Method Detail

transactionActive

public boolean transactionActive(GrouperTransaction grouperTransaction)
Description copied from interface: TransactionDAO
call this to see if a transaction is active (exists and not committed or rolledback)

Specified by:
transactionActive in interface TransactionDAO
Parameters:
grouperTransaction - is the state of the transaction, can hold payload
Returns:
the object returned from the callback
See Also:
TransactionDAO.transactionActive(edu.internet2.middleware.grouper.hibernate.GrouperTransaction)

transactionCallback

public Object transactionCallback(GrouperTransactionType grouperTransactionType,
                                  GrouperTransactionHandler grouperTransactionHandler,
                                  GrouperTransaction grouperTransaction)
                           throws GrouperDAOException
any runtime exceptions will propagate to the outer method call

Specified by:
transactionCallback in interface TransactionDAO
Parameters:
grouperTransactionType - is enum of how the transaction should work.
grouperTransactionHandler - will get the callback
grouperTransaction - is the state of the transaction, can hold payload
Returns:
the object returned from the callback
Throws:
GrouperDAOException - if something wrong inside, its whatever your methods throw
See Also:
TransactionDAO.transactionCallback(edu.internet2.middleware.grouper.hibernate.GrouperTransactionType, edu.internet2.middleware.grouper.hibernate.GrouperTransactionHandler, edu.internet2.middleware.grouper.hibernate.GrouperTransaction)

transactionCommit

public boolean transactionCommit(GrouperTransaction grouperTransaction,
                                 GrouperCommitType grouperCommitType)
Description copied from interface: TransactionDAO
call this to commit a transaction

Specified by:
transactionCommit in interface TransactionDAO
Parameters:
grouperTransaction - is the state of the transaction, can hold payload
grouperCommitType - type of commit (now or only under certain circumstances?)
Returns:
if committed
See Also:
TransactionDAO.transactionCommit(edu.internet2.middleware.grouper.hibernate.GrouperTransaction, edu.internet2.middleware.grouper.hibernate.GrouperCommitType)

transactionRollback

public boolean transactionRollback(GrouperTransaction grouperTransaction,
                                   GrouperRollbackType grouperRollbackType)
Description copied from interface: TransactionDAO
call this to rollback a transaction

Specified by:
transactionRollback in interface TransactionDAO
Parameters:
grouperTransaction - is the state of the transaction, can hold payload
grouperRollbackType - type of commit (now or only under certain circumstances?)
Returns:
if rolled back
See Also:
TransactionDAO.transactionRollback(edu.internet2.middleware.grouper.hibernate.GrouperTransaction, edu.internet2.middleware.grouper.hibernate.GrouperRollbackType)