| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.persistence.db
public class DbTransaction
Implements the transaction interface in terms of a database transaction The
DbTransaction also abstracts the concept of database connection by providing
a wrapper for the Connection object
Implements:
Transaction
Links:
Implementation Implementation Link
Implements the transaction interface in terms of a database transaction The
DbTransaction also abstracts the concept of database connection by providing
a wrapper for the Connection object
| Nested Class Summary |
public class |
QueryLock |
| Field Summary |
QueryLock |
|
private static String |
|
private Connection |
|
private int |
|
private static Logger |
|
private QueryLock |
|
QueryLock |
NONE |
QueryLock |
ROW_LEVEL_NO_WAIT |
QueryLock |
ROW_LEVEL_WAIT |
| Constructor Summary |
public void |
|
public void |
|
public void |
|
| Method Summary |
public void |
|
public void |
|
public void |
|
public Connection |
|
public QueryLock |
|
public void |
|
public void |
|
private void |
|
public void |
|
private static String className
Multiplicity:
1
Static.
private Connection con
Multiplicity:
1
private int isolationLevel
Multiplicity:
1
private static Logger logger
Multiplicity:
1
Static.
QueryLock queryLock
private QueryLock queryLock
Multiplicity:
1
public void DbTransaction (Connection con, Integer isolationLevel)
Constructor for the DbTransaction object
Parameters:
con a valid Connection object
isolationLevel the isolation level for the specified transaction
can be one of READ_UNCOMMITED, READ_COMMITED, REPEATABLE_READ, and
SERIALIZED
Stereotype:
create
public void DbTransaction (Connection con)
Constructor for the DbTransaction object
Parameters:
con a valid Connection object
Stereotype:
create
public void DbTransaction ()
Stereotype:
create
public void begin ()
Starts the transaction by setting the isolation level on the wrapped
connection
Exceptions:
PersistenceException if an error occurs setting the isolation
level
Throws:
PersistenceException
public void commit ()
Commits the console transaction by propagating the request to the wrapped
connection
Exceptions:
PersistenceException if an error occurs commiting the
transaction
Throws:
PersistenceException
public void end ()
Ends the transaction by closing the wrapped connection
Exceptions:
PersistenceException if an error occurs closing the transaction
Throws:
PersistenceException
public Connection getConnection ()
Gets the connection attribute of the DbTransaction object
Return:
The connection value
public QueryLock getQueryLock ()
public void rollback ()
Rolls back the transaction by propagating the request to the wrapped
Connection
Exceptions:
PersistenceException if an error occurs commiting the
transaction
Throws:
PersistenceException
public void setConnection (Connection con)
Sets the connection attribute of the DbTransaction object
Parameters:
con The new connection value
private void setIsolationLevel ()
Translate the console isolation level to a JDBC isolation level and assign
it to the Connection
Exceptions:
SQLException if an error occurs assigning the specified
isolation level
Throws:
SQLException
public void setQueryLock (QueryLock queryLock)
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|