public class JdbcDatabaseConnection extends Object implements com.j256.ormlite.support.DatabaseConnection
Connection
object which we delegate to.Constructor and Description |
---|
JdbcDatabaseConnection(Connection connection) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeQuietly() |
void |
commit(Savepoint savepoint) |
com.j256.ormlite.support.CompiledStatement |
compileStatement(String statement,
com.j256.ormlite.stmt.StatementBuilder.StatementType type,
com.j256.ormlite.field.FieldType[] argFieldTypes,
int resultFlags,
boolean cacheStore) |
int |
delete(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argFieldTypes) |
int |
executeStatement(String statementStr,
int resultFlags) |
Connection |
getUnderlyingConnection() |
int |
insert(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argFieldTypes,
com.j256.ormlite.support.GeneratedKeyHolder keyHolder) |
boolean |
isAutoCommit() |
boolean |
isAutoCommitSupported() |
boolean |
isClosed()
Returns whether the connection has already been closed.
|
boolean |
isTableExists(String tableName) |
long |
queryForLong(String statement) |
long |
queryForLong(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argFieldTypes) |
<T> Object |
queryForOne(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argFieldTypes,
com.j256.ormlite.stmt.GenericRowMapper<T> rowMapper,
com.j256.ormlite.dao.ObjectCache objectCache) |
void |
releaseSavePoint(Savepoint savePoint) |
void |
rollback(Savepoint savepoint) |
void |
setAutoCommit(boolean autoCommit) |
void |
setInternalConnection(Connection connection)
Deprecated.
Please use
setInternalConnection(Connection) |
Savepoint |
setSavePoint(String name) |
void |
setUnderlyingConnection(Connection connection)
Set the internal database connection.
|
int |
update(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argFieldTypes) |
public JdbcDatabaseConnection(Connection connection)
public boolean isAutoCommitSupported()
isAutoCommitSupported
in interface com.j256.ormlite.support.DatabaseConnection
public boolean isAutoCommit() throws SQLException
isAutoCommit
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public void setAutoCommit(boolean autoCommit) throws SQLException
setAutoCommit
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public Savepoint setSavePoint(String name) throws SQLException
setSavePoint
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public void commit(Savepoint savepoint) throws SQLException
commit
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public void rollback(Savepoint savepoint) throws SQLException
rollback
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public void releaseSavePoint(Savepoint savePoint) throws SQLException
releaseSavePoint
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public int executeStatement(String statementStr, int resultFlags) throws SQLException
executeStatement
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public com.j256.ormlite.support.CompiledStatement compileStatement(String statement, com.j256.ormlite.stmt.StatementBuilder.StatementType type, com.j256.ormlite.field.FieldType[] argFieldTypes, int resultFlags, boolean cacheStore) throws SQLException
compileStatement
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public void close() throws Exception
close
in interface AutoCloseable
Exception
public void closeQuietly()
closeQuietly
in interface com.j256.ormlite.support.DatabaseConnection
public boolean isClosed() throws SQLException
JdbcConnectionSource
.isClosed
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public int insert(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes, com.j256.ormlite.support.GeneratedKeyHolder keyHolder) throws SQLException
insert
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public int update(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes) throws SQLException
update
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public int delete(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes) throws SQLException
delete
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public <T> Object queryForOne(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes, com.j256.ormlite.stmt.GenericRowMapper<T> rowMapper, com.j256.ormlite.dao.ObjectCache objectCache) throws SQLException
queryForOne
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public long queryForLong(String statement) throws SQLException
queryForLong
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public long queryForLong(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes) throws SQLException
queryForLong
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public boolean isTableExists(String tableName) throws SQLException
isTableExists
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
public Connection getUnderlyingConnection()
getUnderlyingConnection
in interface com.j256.ormlite.support.DatabaseConnection
@Deprecated public void setInternalConnection(Connection connection)
setInternalConnection(Connection)
public void setUnderlyingConnection(Connection connection)
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.