|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use DatabaseConnection | |
---|---|
com.j256.ormlite.dao | Database Access Object classes. |
com.j256.ormlite.misc | Miscellaneous classes. |
com.j256.ormlite.stmt | SQL statement generation and processing. |
com.j256.ormlite.stmt.mapped | Compiled SQL query statements. |
com.j256.ormlite.support | Database support classes. |
Uses of DatabaseConnection in com.j256.ormlite.dao |
---|
Methods in com.j256.ormlite.dao that return DatabaseConnection | |
---|---|
DatabaseConnection |
RuntimeExceptionDao.startThreadConnection()
|
DatabaseConnection |
Dao.startThreadConnection()
WARNING: This method is for advanced users only. |
DatabaseConnection |
BaseDaoImpl.startThreadConnection()
|
Methods in com.j256.ormlite.dao with parameters of type DatabaseConnection | |
---|---|
void |
RuntimeExceptionDao.commit(DatabaseConnection connection)
|
void |
Dao.commit(DatabaseConnection connection)
If you have previously set auto-commit to false using Dao.setAutoCommit(DatabaseConnection, boolean) then
this will commit all changes to the database made from that point up to now on the connection returned by the
Dao.startThreadConnection() . |
void |
BaseDaoImpl.commit(DatabaseConnection connection)
|
void |
RuntimeExceptionDao.endThreadConnection(DatabaseConnection connection)
|
void |
Dao.endThreadConnection(DatabaseConnection connection)
WARNING: This method is for advanced users only. |
void |
BaseDaoImpl.endThreadConnection(DatabaseConnection connection)
|
boolean |
RuntimeExceptionDao.isAutoCommit(DatabaseConnection connection)
|
boolean |
Dao.isAutoCommit(DatabaseConnection connection)
Return true if the database connection returned by the Dao.startThreadConnection() is in auto-commit mode
otherwise false. |
boolean |
BaseDaoImpl.isAutoCommit(DatabaseConnection connection)
|
void |
RuntimeExceptionDao.rollBack(DatabaseConnection connection)
|
void |
Dao.rollBack(DatabaseConnection connection)
If you have previously set auto-commit to false using Dao.setAutoCommit(DatabaseConnection, boolean) then
this will roll-back and flush all changes to the database made from that point up to now on the connection
returned by the Dao.startThreadConnection() . |
void |
BaseDaoImpl.rollBack(DatabaseConnection connection)
|
void |
RuntimeExceptionDao.setAutoCommit(DatabaseConnection connection,
boolean autoCommit)
|
void |
Dao.setAutoCommit(DatabaseConnection connection,
boolean autoCommit)
Set auto-commit mode to be true or false on the connection returned by the Dao.startThreadConnection() . |
void |
BaseDaoImpl.setAutoCommit(DatabaseConnection connection,
boolean autoCommit)
|
Uses of DatabaseConnection in com.j256.ormlite.misc |
---|
Methods in com.j256.ormlite.misc with parameters of type DatabaseConnection | ||
---|---|---|
static
|
TransactionManager.callInTransaction(DatabaseConnection connection,
boolean saved,
DatabaseType databaseType,
Callable<T> callable)
Same as TransactionManager.callInTransaction(Callable) except as a static method on a connection. |
|
static
|
TransactionManager.callInTransaction(DatabaseConnection connection,
DatabaseType databaseType,
Callable<T> callable)
Same as TransactionManager.callInTransaction(Callable) except as a static method on a connection. |
Uses of DatabaseConnection in com.j256.ormlite.stmt |
---|
Methods in com.j256.ormlite.stmt with parameters of type DatabaseConnection | ||
---|---|---|
|
StatementExecutor.callBatchTasks(DatabaseConnection connection,
boolean saved,
Callable<CT> callable)
Call batch tasks inside of a connection which may, or may not, have been "saved". |
|
CompiledStatement |
PreparedStmt.compile(DatabaseConnection databaseConnection,
StatementBuilder.StatementType type)
Create and return the associated compiled statement. |
|
CompiledStatement |
PreparedStmt.compile(DatabaseConnection databaseConnection,
StatementBuilder.StatementType type,
int resultFlags)
Like compile(DatabaseConnection, StatementType) but allows to specify the result flags. |
|
int |
StatementExecutor.create(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Create a new entry in the database from an object. |
|
int |
StatementExecutor.delete(DatabaseConnection databaseConnection,
PreparedDelete<T> preparedDelete)
Delete rows that match the prepared statement. |
|
int |
StatementExecutor.delete(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Delete an object from the database. |
|
int |
StatementExecutor.deleteById(DatabaseConnection databaseConnection,
ID id,
ObjectCache objectCache)
Delete an object from the database by id. |
|
int |
StatementExecutor.deleteIds(DatabaseConnection databaseConnection,
Collection<ID> ids,
ObjectCache objectCache)
Delete a collection of objects from the database. |
|
int |
StatementExecutor.deleteObjects(DatabaseConnection databaseConnection,
Collection<T> datas,
ObjectCache objectCache)
Delete a collection of objects from the database. |
|
int |
StatementExecutor.executeRaw(DatabaseConnection connection,
String statement,
String[] arguments)
Return true if it worked else false. |
|
boolean |
StatementExecutor.ifExists(DatabaseConnection connection,
ID id)
|
|
long |
StatementExecutor.queryForCountStar(DatabaseConnection databaseConnection)
Return a long value which is the number of rows in the table. |
|
long |
StatementExecutor.queryForCountStar(DatabaseConnection databaseConnection,
PreparedStmt<T> preparedStmt)
Return a long value which is the number of rows in the table. |
|
T |
StatementExecutor.queryForFirst(DatabaseConnection databaseConnection,
PreparedStmt<T> preparedStmt,
ObjectCache objectCache)
Return the first object that matches the PreparedStmt or null if none. |
|
T |
StatementExecutor.queryForId(DatabaseConnection databaseConnection,
ID id,
ObjectCache objectCache)
Return the object associated with the id or null if none. |
|
int |
StatementExecutor.refresh(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Does a query for the object's Id and copies in each of the field values from the database to refresh the data parameter. |
|
int |
StatementExecutor.update(DatabaseConnection databaseConnection,
PreparedUpdate<T> preparedUpdate)
Update rows in the database. |
|
int |
StatementExecutor.update(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Update an object in the database. |
|
int |
StatementExecutor.updateId(DatabaseConnection databaseConnection,
T data,
ID newId,
ObjectCache objectCache)
Update an object in the database to change its id to the newId parameter. |
|
int |
StatementExecutor.updateRaw(DatabaseConnection connection,
String statement,
String[] arguments)
Return the number of rows affected. |
Constructors in com.j256.ormlite.stmt with parameters of type DatabaseConnection | |
---|---|
RawResultsImpl(ConnectionSource connectionSource,
DatabaseConnection connection,
String query,
Class<?> clazz,
CompiledStatement compiledStmt,
String[] columnNames,
GenericRowMapper<T> rowMapper,
ObjectCache objectCache)
|
|
SelectIterator(Class<?> dataClass,
Dao<T,ID> classDao,
GenericRowMapper<T> rowMapper,
ConnectionSource connectionSource,
DatabaseConnection connection,
CompiledStatement compiledStmt,
String statement,
ObjectCache objectCache)
If the statement parameter is null then this won't log information |
Uses of DatabaseConnection in com.j256.ormlite.stmt.mapped |
---|
Methods in com.j256.ormlite.stmt.mapped with parameters of type DatabaseConnection | ||
---|---|---|
CompiledStatement |
MappedPreparedStmt.compile(DatabaseConnection databaseConnection,
StatementBuilder.StatementType type)
|
|
CompiledStatement |
MappedPreparedStmt.compile(DatabaseConnection databaseConnection,
StatementBuilder.StatementType type,
int resultFlags)
|
|
int |
MappedDelete.delete(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Delete the object from the database. |
|
int |
MappedDelete.deleteById(DatabaseConnection databaseConnection,
ID id,
ObjectCache objectCache)
Delete the object from the database. |
|
static
|
MappedDeleteCollection.deleteIds(DatabaseType databaseType,
TableInfo<T,ID> tableInfo,
DatabaseConnection databaseConnection,
Collection<ID> ids,
ObjectCache objectCache)
Delete all of the objects in the collection. |
|
static
|
MappedDeleteCollection.deleteObjects(DatabaseType databaseType,
TableInfo<T,ID> tableInfo,
DatabaseConnection databaseConnection,
Collection<T> datas,
ObjectCache objectCache)
Delete all of the objects in the collection. |
|
T |
MappedQueryForId.execute(DatabaseConnection databaseConnection,
ID id,
ObjectCache objectCache)
Query for an object in the database which matches the id argument. |
|
int |
MappedUpdateId.execute(DatabaseConnection databaseConnection,
T data,
ID newId,
ObjectCache objectCache)
Update the id field of the object in the database. |
|
int |
MappedRefresh.executeRefresh(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Execute our refresh query statement and then update all of the fields in data with the fields from the result. |
|
int |
MappedCreate.insert(DatabaseType databaseType,
DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Create an object in the database. |
|
int |
MappedUpdate.update(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Update the object in the database. |
Uses of DatabaseConnection in com.j256.ormlite.support |
---|
Methods in com.j256.ormlite.support that return DatabaseConnection | |
---|---|
DatabaseConnection |
ConnectionSource.getReadOnlyConnection()
Return a database connection suitable for read-only operations. |
DatabaseConnection |
ConnectionSource.getReadWriteConnection()
Return a database connection suitable for read or write operations. |
protected DatabaseConnection |
BaseConnectionSource.getSavedConnection()
Returns the connection that has been saved or null if none. |
DatabaseConnection |
ConnectionSource.getSpecialConnection()
Return the currently saved connection or null if none. |
DatabaseConnection |
BaseConnectionSource.getSpecialConnection()
|
Methods in com.j256.ormlite.support with parameters of type DatabaseConnection | |
---|---|
protected boolean |
BaseConnectionSource.clearSpecial(DatabaseConnection connection,
Logger logger)
Clear the connection that was previously saved. |
void |
ConnectionSource.clearSpecialConnection(DatabaseConnection connection)
Clear the saved connection. |
protected boolean |
BaseConnectionSource.isSavedConnection(DatabaseConnection connection)
Return true if the connection being released is the one that has been saved. |
void |
ConnectionSource.releaseConnection(DatabaseConnection connection)
Release a database connection previously returned by ConnectionSource.getReadOnlyConnection() or
ConnectionSource.getReadWriteConnection() . |
protected boolean |
BaseConnectionSource.saveSpecial(DatabaseConnection connection)
Save this connection as our special connection to be returned by the BaseConnectionSource.getSavedConnection() method. |
boolean |
ConnectionSource.saveSpecialConnection(DatabaseConnection connection)
Save this connection and return it for all calls to ConnectionSource.getReadOnlyConnection() and
ConnectionSource.getReadWriteConnection() unless the ConnectionSource.clearSpecialConnection(DatabaseConnection) method is
called, all This is used by the transaction mechanism since since all operations within a transaction must
operate on the same connection. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |