public class AndroidDatabaseConnection extends Object implements com.j256.ormlite.support.DatabaseConnection
| Constructor and Description |
|---|
AndroidDatabaseConnection(android.database.sqlite.SQLiteDatabase db,
boolean readWrite) |
AndroidDatabaseConnection(android.database.sqlite.SQLiteDatabase db,
boolean readWrite,
boolean cancelQueriesEnabled) |
| 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() |
boolean |
isReadWrite()
Return whether this connection is read-write or not (real-only).
|
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) |
Savepoint |
setSavePoint(String name) |
String |
toString() |
int |
update(String statement,
Object[] args,
com.j256.ormlite.field.FieldType[] argFieldTypes) |
public AndroidDatabaseConnection(android.database.sqlite.SQLiteDatabase db,
boolean readWrite)
public AndroidDatabaseConnection(android.database.sqlite.SQLiteDatabase db,
boolean readWrite,
boolean cancelQueriesEnabled)
public boolean isAutoCommitSupported()
isAutoCommitSupported in interface com.j256.ormlite.support.DatabaseConnectionpublic boolean isAutoCommit()
throws SQLException
isAutoCommit in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic void setAutoCommit(boolean autoCommit)
setAutoCommit in interface com.j256.ormlite.support.DatabaseConnectionpublic Savepoint setSavePoint(String name) throws SQLException
setSavePoint in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic boolean isReadWrite()
public void commit(Savepoint savepoint) throws SQLException
commit in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic void rollback(Savepoint savepoint) throws SQLException
rollback in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic void releaseSavePoint(Savepoint savePoint)
releaseSavePoint in interface com.j256.ormlite.support.DatabaseConnectionpublic int executeStatement(String statementStr, int resultFlags) throws SQLException
executeStatement in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic 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)
compileStatement in interface com.j256.ormlite.support.DatabaseConnectionpublic 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.DatabaseConnectionSQLExceptionpublic int update(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes) throws SQLException
update in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic int delete(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes) throws SQLException
delete in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic <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.DatabaseConnectionSQLExceptionpublic long queryForLong(String statement) throws SQLException
queryForLong in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic long queryForLong(String statement, Object[] args, com.j256.ormlite.field.FieldType[] argFieldTypes) throws SQLException
queryForLong in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic void closeQuietly()
closeQuietly in interface com.j256.ormlite.support.DatabaseConnectionpublic boolean isClosed()
throws SQLException
isClosed in interface com.j256.ormlite.support.DatabaseConnectionSQLExceptionpublic boolean isTableExists(String tableName)
isTableExists in interface com.j256.ormlite.support.DatabaseConnectionpublic Connection getUnderlyingConnection()
getUnderlyingConnection in interface com.j256.ormlite.support.DatabaseConnectionThis documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.