public static class GcDbAccess.ConnectionBean extends Object
Constructor and Description |
---|
ConnectionBean() |
Modifier and Type | Method and Description |
---|---|
static void |
closeIfStarted(GcDbAccess.ConnectionBean connectionBean)
close the connection if started
|
Connection |
getConnection() |
boolean |
isConnectionStarted()
if the connection was started or reused from threadlocal
|
boolean |
isInTransaction()
if we are in a transaction
|
boolean |
isTransactionStarted()
if a transaction was started
|
void |
setConnection(Connection connection1) |
void |
setConnectionStarted(boolean connectionStarted1) |
void |
setInTransaction(boolean inTransaction1)
if we are in a transaction
|
void |
setTransactionStarted(boolean transactionStarted1)
if a transaction was started
|
static void |
transactionEnd(GcDbAccess.ConnectionBean connectionBean,
GcTransactionEnd transactionEnd,
boolean endOnlyIfStarted,
boolean errorIfNoTransaction,
boolean endTransaction)
end a transaction
|
public boolean isInTransaction()
public void setInTransaction(boolean inTransaction1)
inTransaction1
- the inTransaction to setpublic Connection getConnection()
public void setConnection(Connection connection1)
connection1
- the connection to setpublic boolean isTransactionStarted()
public void setTransactionStarted(boolean transactionStarted1)
transactionStarted1
- the transactionStarted to setpublic boolean isConnectionStarted()
public void setConnectionStarted(boolean connectionStarted1)
connectionStarted1
- the connectionStarted to setpublic static void transactionEnd(GcDbAccess.ConnectionBean connectionBean, GcTransactionEnd transactionEnd, boolean endOnlyIfStarted, boolean errorIfNoTransaction, boolean endTransaction)
connectionBean
- transactionEnd
- endOnlyIfStarted
- only a connection and just end it with commit...errorIfNoTransaction
- endTransaction
- public static void closeIfStarted(GcDbAccess.ConnectionBean connectionBean)
connectionBean
- Copyright © 2016 Internet2. All rights reserved.