|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.appserver.server.sql.standard.StandardDBTransaction
Standard implementation of SQL database transaction.
DBTransaction
Field Summary | |
protected java.lang.String |
databaseName
Name of used database |
Constructor Summary | |
protected |
StandardDBTransaction(DBConnection conn)
Construct a transaction object for use on the supplied dB connection. |
Method Summary | |
void |
commit()
Method to commit upates. |
void |
delete(Transaction transaction)
Method to delete an object in the database. |
protected void |
finalize()
If this object has not been released, this method ensures that garbage collection does so. |
java.lang.String |
getDatabaseName()
Method return name of used database |
CoreDO |
getDO(Transaction transaction)
Method find a DO in the transaction |
CoreDO |
getDO(Transaction transaction,
int action)
Method find a DO in the transaction |
boolean |
handleException(java.sql.SQLException e)
Exception handeler. |
void |
insert(Transaction transaction)
Method to insert an object in the database. |
protected void |
logDebug(java.lang.String str)
Logging. |
void |
release()
Frees all resources consumed by this transaction Connections are returned to the connection pool. |
void |
rollback()
Method to rollback changes. |
void |
setDatabaseName(java.lang.String dbName)
Method set name of used database |
void |
update(Transaction transaction)
Method to update an object in the database. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String databaseName
Constructor Detail |
protected StandardDBTransaction(DBConnection conn) throws java.sql.SQLException
conn
- The database connection to use.
java.sql.SQLException
- If a database access error occurs.Method Detail |
public CoreDO getDO(Transaction transaction)
DBTransaction
getDO
in interface DBTransaction
transaction
- Object that implements transaction interface.
public CoreDO getDO(Transaction transaction, int action)
getDO
in interface DBTransaction
transaction
- Object that implements transaction interface.action
- if not NONE=0, the DO is found only woth the matching action
public void update(Transaction transaction)
update
in interface DBTransaction
transaction
- Object that implements transaction interface.public void delete(Transaction transaction)
delete
in interface DBTransaction
transaction
- Object that implements transaction interface.public void insert(Transaction transaction)
insert
in interface DBTransaction
transaction
- Object that implements transaction interface.public void commit() throws java.sql.SQLException, DBRowUpdateException
commit
in interface DBTransaction
java.sql.SQLException
- If a database access error occurs.
DBRowUpdateException
- If a version error occurs.public void rollback() throws java.sql.SQLException
rollback
in interface DBTransaction
java.sql.SQLException
- If a database access error occurs.public void release()
release
in interface DBTransaction
public boolean handleException(java.sql.SQLException e)
handleException
in interface DBTransaction
protected void finalize()
finalize
in class java.lang.Object
protected void logDebug(java.lang.String str)
str
- The data to log.public java.lang.String getDatabaseName()
getDatabaseName
in interface DBTransaction
public void setDatabaseName(java.lang.String dbName)
setDatabaseName
in interface DBTransaction
dbName
- name of used database
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |