Class GcDbAccess.ConnectionBean
java.lang.Object
edu.internet2.middleware.grouperClient.jdbc.GcDbAccess.ConnectionBean
- Enclosing class:
- GcDbAccess
returned from connection call
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcloseIfStarted(GcDbAccess.ConnectionBean connectionBean) close the connection if startedbooleanif the connection was started or reused from threadlocalbooleanif we are in a transactionbooleanif a transaction was startedvoidsetConnection(Connection connection1) voidsetConnectionStarted(boolean connectionStarted1) voidsetInTransaction(boolean inTransaction1) if we are in a transactionvoidsetTransactionStarted(boolean transactionStarted1) if a transaction was startedstatic voidtransactionEnd(GcDbAccess.ConnectionBean connectionBean, GcTransactionEnd transactionEnd, boolean endOnlyIfStarted, boolean errorIfNoTransaction, boolean endTransaction) end a transaction
-
Constructor Details
-
ConnectionBean
public ConnectionBean()
-
-
Method Details
-
isInTransaction
public boolean isInTransaction()if we are in a transaction- Returns:
- the inTransaction
-
setInTransaction
public void setInTransaction(boolean inTransaction1) if we are in a transaction- Parameters:
inTransaction1- the inTransaction to set
-
getConnection
- Returns:
- the connection
-
setConnection
- Parameters:
connection1- the connection to set
-
isTransactionStarted
public boolean isTransactionStarted()if a transaction was started- Returns:
- the transactionStarted
-
setTransactionStarted
public void setTransactionStarted(boolean transactionStarted1) if a transaction was started- Parameters:
transactionStarted1- the transactionStarted to set
-
isConnectionStarted
public boolean isConnectionStarted()if the connection was started or reused from threadlocal- Returns:
- the connectionStarted
-
setConnectionStarted
public void setConnectionStarted(boolean connectionStarted1) - Parameters:
connectionStarted1- the connectionStarted to set
-
transactionEnd
public static void transactionEnd(GcDbAccess.ConnectionBean connectionBean, GcTransactionEnd transactionEnd, boolean endOnlyIfStarted, boolean errorIfNoTransaction, boolean endTransaction) end a transaction- Parameters:
connectionBean-transactionEnd-endOnlyIfStarted- only a connection and just end it with commit...errorIfNoTransaction-endTransaction-
-
closeIfStarted
close the connection if started- Parameters:
connectionBean-
-