Package | Description |
---|---|
com.j256.ormlite.dao |
Database Access Object classes.
|
com.j256.ormlite.field |
Object field information.
|
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.
|
Modifier and Type | Class and Description |
---|---|
class |
LruObjectCache
Cache for ORMLite which stores a certain number of items for each Class.
|
class |
ReferenceObjectCache
Cache for ORMLite which stores objects with a
WeakReference or SoftReference to them. |
Modifier and Type | Method and Description |
---|---|
ObjectCache |
BaseDaoImpl.getObjectCache() |
ObjectCache |
Dao.getObjectCache()
Returns the current object-cache being used by the DAO or null if none.
|
ObjectCache |
RuntimeExceptionDao.getObjectCache() |
Modifier and Type | Method and Description |
---|---|
void |
BaseDaoImpl.setObjectCache(ObjectCache objectCache) |
void |
Dao.setObjectCache(ObjectCache objectCache)
Same as
Dao.setObjectCache(boolean) except you specify the actual cache instance to use for the DAO. |
void |
RuntimeExceptionDao.setObjectCache(ObjectCache objectCache) |
Modifier and Type | Method and Description |
---|---|
void |
FieldType.assignField(ConnectionSource connectionSource,
Object data,
Object val,
boolean parentObject,
ObjectCache objectCache)
Assign to the data object the val corresponding to the fieldType.
|
Object |
FieldType.assignIdValue(ConnectionSource connectionSource,
Object data,
Number val,
ObjectCache objectCache)
Assign an ID value to this field.
|
Modifier and Type | Method and Description |
---|---|
SelectIterator<T,ID> |
StatementExecutor.buildIterator(BaseDaoImpl<T,ID> classDao,
ConnectionSource connectionSource,
int resultFlags,
ObjectCache objectCache)
Create and return a SelectIterator for the class using the default mapped query for all statement.
|
SelectIterator<T,ID> |
StatementExecutor.buildIterator(BaseDaoImpl<T,ID> classDao,
ConnectionSource connectionSource,
PreparedStmt<T> preparedStmt,
ObjectCache objectCache,
int resultFlags)
Create and return an
SelectIterator for the class using a prepared statement. |
int |
StatementExecutor.create(DatabaseConnection databaseConnection,
T data,
ObjectCache objectCache)
Create a new entry in the database from an object.
|
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.
|
List<T> |
StatementExecutor.query(ConnectionSource connectionSource,
PreparedStmt<T> preparedStmt,
ObjectCache objectCache)
Return a list of all of the data in the table that matches the
PreparedStmt . |
List<T> |
StatementExecutor.queryForAll(ConnectionSource connectionSource,
ObjectCache objectCache)
Return a list of all of the data 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.
|
<UO> GenericRawResults<UO> |
StatementExecutor.queryRaw(ConnectionSource connectionSource,
String query,
DatabaseResultsMapper<UO> mapper,
String[] arguments,
ObjectCache objectCache)
Return a results object associated with an internal iterator is mapped by the user's rowMapper.
|
<UO> GenericRawResults<UO> |
StatementExecutor.queryRaw(ConnectionSource connectionSource,
String query,
DataType[] columnTypes,
RawRowObjectMapper<UO> rowMapper,
String[] arguments,
ObjectCache objectCache)
Return a results object associated with an internal iterator is mapped by the user's rowMapper.
|
GenericRawResults<Object[]> |
StatementExecutor.queryRaw(ConnectionSource connectionSource,
String query,
DataType[] columnTypes,
String[] arguments,
ObjectCache objectCache)
Return a results object associated with an internal iterator that returns Object[] results.
|
<UO> GenericRawResults<UO> |
StatementExecutor.queryRaw(ConnectionSource connectionSource,
String query,
RawRowMapper<UO> rowMapper,
String[] arguments,
ObjectCache objectCache)
Return a results object associated with an internal iterator is mapped by the user's rowMapper.
|
GenericRawResults<String[]> |
StatementExecutor.queryRaw(ConnectionSource connectionSource,
String query,
String[] arguments,
ObjectCache objectCache)
Return a results object associated with an internal iterator that returns String[] results.
|
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,
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.
|
Constructor and Description |
---|
RawResultsImpl(ConnectionSource connectionSource,
DatabaseConnection connection,
Class<?> clazz,
CompiledStatement compiledStmt,
GenericRowMapper<T> rowMapper,
ObjectCache objectCache) |
SelectIterator(Class<?> dataClass,
Dao<T,ID> classDao,
GenericRowMapper<T> rowMapper,
ConnectionSource connectionSource,
DatabaseConnection connection,
CompiledStatement compiledStmt,
ObjectCache objectCache)
If the statement parameter is null then this won't log information
|
Modifier and Type | Method and Description |
---|---|
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 <T,ID> int |
MappedDeleteCollection.deleteIds(Dao<T,ID> dao,
TableInfo<T,ID> tableInfo,
DatabaseConnection databaseConnection,
Collection<ID> ids,
ObjectCache objectCache)
Delete all of the objects in the collection.
|
static <T,ID> int |
MappedDeleteCollection.deleteObjects(Dao<T,ID> dao,
TableInfo<T,ID> tableInfo,
DatabaseConnection databaseConnection,
Collection<T> datas,
ObjectCache objectCache)
Delete all of the objects in the collection.
|
T |
MappedQueryForFieldEq.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.
|
Modifier and Type | Method and Description |
---|---|
ObjectCache |
DatabaseResults.getObjectCacheForRetrieve()
Returns the object cache for looking up objects associated with these results or null if none.
|
ObjectCache |
DatabaseResults.getObjectCacheForStore()
Returns the object cache for storing objects generated by these results or null if none.
|
Modifier and Type | Method and Description |
---|---|
<T> Object |
DatabaseConnection.queryForOne(String statement,
Object[] args,
FieldType[] argfieldTypes,
GenericRowMapper<T> rowMapper,
ObjectCache objectCache)
Perform a SQL query with the associated SQL statement, arguments, and types and returns a single result.
|
<T> Object |
DatabaseConnectionProxy.queryForOne(String statement,
Object[] args,
FieldType[] argfieldTypes,
GenericRowMapper<T> rowMapper,
ObjectCache objectCache) |
DatabaseResults |
CompiledStatement.runQuery(ObjectCache objectCache)
Run the prepared query statement returning the results.
|
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.