public class DatabaseConnectionDecorator extends Object implements com.j256.ormlite.support.DatabaseConnection
Constructor and Description |
---|
DatabaseConnectionDecorator(com.j256.ormlite.support.DatabaseConnection delegate) |
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) |
protected com.j256.ormlite.support.DatabaseConnection |
getDelegate() |
int |
insert(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argfieldTypes,
com.j256.ormlite.support.GeneratedKeyHolder keyHolder) |
boolean |
isAutoCommit() |
boolean |
isAutoCommitSupported() |
boolean |
isClosed() |
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 |
rollback(Savepoint savePoint) |
void |
setAutoCommit(boolean autoCommit) |
Savepoint |
setSavePoint(String savePointName) |
int |
update(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argfieldTypes) |
public DatabaseConnectionDecorator(@Nonnull com.j256.ormlite.support.DatabaseConnection delegate)
@Nonnull protected com.j256.ormlite.support.DatabaseConnection getDelegate()
public boolean isAutoCommitSupported() throws SQLException
isAutoCommitSupported
in interface com.j256.ormlite.support.DatabaseConnection
SQLException
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 savePointName) 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 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 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 void closeQuietly()
closeQuietly
in interface com.j256.ormlite.support.DatabaseConnection
public boolean isClosed() throws SQLException
isClosed
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 void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException