public class GenOrmTransactionConnection extends java.lang.Object implements GenOrmConnection
| Constructor and Description |
|---|
GenOrmTransactionConnection(GenOrmDSEnvelope dse) |
GenOrmTransactionConnection(GenOrmDSEnvelope dse,
java.sql.Connection con) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addToTransaction(GenOrmRecord goi)
Returns true if the record was added to a transaction
returns false if there is no transaction
|
void |
begin() |
void |
close() |
void |
commit() |
java.sql.Statement |
createStatement()
The connection will be closed when the statement is closed
|
void |
flush()
Flush all modified records that are part of the current transaction
|
GenOrmRecord |
getCachedRecord(GenOrmRecordKey key)
Returns the cached record if it exists, null otherwise
|
java.sql.Connection |
getConnection() |
GenOrmKeyGenerator |
getKeyGenerator(java.lang.String table) |
java.lang.Object |
getProperty(java.lang.String name)
Gets a property set on this connection
|
GenOrmRecord |
getUniqueRecord(GenOrmRecord rec)
Returns a unique record instance for this transaction.
|
boolean |
isCommitted() |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
The connection will be closed when the statement is closed
|
void |
rollback() |
void |
setConnection(java.sql.Connection con) |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property to be associated with this connection
|
GenOrmTransactionConnection |
setTransaction(boolean transaction) |
public GenOrmTransactionConnection(GenOrmDSEnvelope dse)
public GenOrmTransactionConnection(GenOrmDSEnvelope dse, java.sql.Connection con)
public GenOrmTransactionConnection setTransaction(boolean transaction)
public void begin()
public void setProperty(java.lang.String name,
java.lang.Object value)
setProperty in interface GenOrmConnectionpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface GenOrmConnectionpublic GenOrmRecord getUniqueRecord(GenOrmRecord rec)
getUniqueRecord in interface GenOrmConnectionpublic GenOrmRecord getCachedRecord(GenOrmRecordKey key)
getCachedRecord in interface GenOrmConnectionpublic void flush()
flush in interface GenOrmConnectionpublic void commit()
commit in interface GenOrmConnectionpublic boolean isCommitted()
isCommitted in interface GenOrmConnectionpublic void close()
close in interface GenOrmConnectionpublic void rollback()
rollback in interface GenOrmConnectionpublic void setConnection(java.sql.Connection con)
public java.sql.Connection getConnection()
getConnection in interface GenOrmConnectionpublic GenOrmKeyGenerator getKeyGenerator(java.lang.String table)
getKeyGenerator in interface GenOrmConnectionpublic boolean addToTransaction(GenOrmRecord goi)
GenOrmConnectionaddToTransaction in interface GenOrmConnectionpublic java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface GenOrmConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface GenOrmConnectionjava.sql.SQLException