Package | Description |
---|---|
com.j256.ormlite.dao |
Database Access Object classes.
|
com.j256.ormlite.db |
Per-database type and SQL information.
|
com.j256.ormlite.field |
Object field information.
|
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.
|
com.j256.ormlite.table |
Object table information.
|
Modifier and Type | Field and Description |
---|---|
protected ConnectionSource |
BaseDaoImpl.connectionSource |
Modifier and Type | Method and Description |
---|---|
ConnectionSource |
BaseDaoImpl.getConnectionSource() |
ConnectionSource |
Dao.getConnectionSource()
Return the associated ConnectionSource or null if none set on the DAO yet.
|
ConnectionSource |
RuntimeExceptionDao.getConnectionSource() |
Modifier and Type | Method and Description |
---|---|
static <D extends Dao<T,?>,T> |
DaoManager.createDao(ConnectionSource connectionSource,
Class<T> clazz)
Helper method to create a DAO object without having to define a class.
|
static <T,ID> RuntimeExceptionDao<T,ID> |
RuntimeExceptionDao.createDao(ConnectionSource connectionSource,
Class<T> clazz)
Call through to
DaoManager.createDao(ConnectionSource, Class) with the returned DAO wrapped in a
RuntimeExceptionDao. |
static <D extends Dao<T,?>,T> |
DaoManager.createDao(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Helper method to create a DAO object without having to define a class.
|
static <T,ID> RuntimeExceptionDao<T,ID> |
RuntimeExceptionDao.createDao(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Call through to
DaoManager.createDao(ConnectionSource, DatabaseTableConfig) with the returned DAO wrapped
in a RuntimeExceptionDao. |
static <D extends Dao<T,?>,T> |
DaoManager.lookupDao(ConnectionSource connectionSource,
Class<T> clazz)
Helper method to lookup a DAO if it has already been associated with the class.
|
static <D extends Dao<T,?>,T> |
DaoManager.lookupDao(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Helper method to lookup a DAO if it has already been associated with the table-config.
|
static void |
DaoManager.registerDao(ConnectionSource connectionSource,
Dao<?,?> dao)
Register the DAO with the cache.
|
static void |
DaoManager.registerDaoWithTableConfig(ConnectionSource connectionSource,
Dao<?,?> dao)
Same as
DaoManager.registerDao(ConnectionSource, Dao) but this allows you to register it just with its
DatabaseTableConfig . |
void |
BaseDaoImpl.setConnectionSource(ConnectionSource connectionSource) |
static void |
DaoManager.unregisterDao(ConnectionSource connectionSource,
Dao<?,?> dao)
Remove a DAO from the cache.
|
static void |
DaoManager.unregisterDaos(ConnectionSource connectionSource)
Remove all DAOs from the cache for the connection source.
|
Constructor and Description |
---|
BaseDaoImpl(ConnectionSource connectionSource,
Class<T> dataClass)
Construct our base DAO class.
|
BaseDaoImpl(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Construct our base DAO class.
|
Modifier and Type | Method and Description |
---|---|
<T> DatabaseTableConfig<T> |
DatabaseType.extractDatabaseTableConfig(ConnectionSource connectionSource,
Class<T> clazz)
Extract and return a custom database configuration for this class.
|
<T> DatabaseTableConfig<T> |
BaseDatabaseType.extractDatabaseTableConfig(ConnectionSource connectionSource,
Class<T> clazz) |
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.
|
<FT,FID> void |
FieldType.configDaoInformation(ConnectionSource connectionSource,
Class<?> parentClass)
Because we go recursive in a lot of situations if we construct DAOs inside of the FieldType constructor, we have
to do this 2nd pass initialization so we can better use the DAO caches.
|
Modifier and Type | Class and Description |
---|---|
class |
WrappedConnectionSource
Wrapped connection source that uses proxy objects to track database connections and compiled statements.
|
Modifier and Type | Field and Description |
---|---|
protected ConnectionSource |
WrappedConnectionSource.cs |
Modifier and Type | Method and Description |
---|---|
static <T> T |
TransactionManager.callInTransaction(ConnectionSource connectionSource,
Callable<T> callable)
Same as
TransactionManager.callInTransaction(Callable) except as a static method with a connection source. |
static <T> T |
TransactionManager.callInTransaction(String tableName,
ConnectionSource connectionSource,
Callable<T> callable)
Same as
TransactionManager.callInTransaction(ConnectionSource, Callable) except this has a table-name. |
void |
TransactionManager.setConnectionSource(ConnectionSource connectionSource) |
Constructor and Description |
---|
TransactionManager(ConnectionSource connectionSource)
Constructor for direct java code wiring.
|
WrappedConnectionSource(ConnectionSource cs) |
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. |
<CT> CT |
StatementExecutor.callBatchTasks(ConnectionSource connectionSource,
Callable<CT> callable)
Call batch tasks inside of a connection which may, or may not, have been "saved".
|
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.
|
<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.
|
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 | Field and Description |
---|---|
protected ConnectionSource |
BaseMappedStatement.connectionSource |
Modifier and Type | Class and Description |
---|---|
class |
BaseConnectionSource
Connection source base class which provides the save/clear mechanism using a thread local.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ConnectionSource |
BaseSchemaUtils.getConnectionSource()
Return the connection-source to be used to generate the schema statements.
|
Modifier and Type | Method and Description |
---|---|
static <T> int |
TableUtils.clearTable(ConnectionSource connectionSource,
Class<T> dataClass)
Clear all data out of the table.
|
static <T> int |
TableUtils.clearTable(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Clear all data out of the table.
|
static <T> int |
SchemaUtils.createSchema(ConnectionSource connectionSource,
Class<T> dataClass)
Issue the database statements to create the schema associated with a class.
|
static <T> int |
SchemaUtils.createSchema(ConnectionSource connectionSource,
String schemaName)
Issue the database statements to create the schema associated with a schema configuration.
|
static <T> int |
SchemaUtils.createSchemaIfNotExists(ConnectionSource connectionSource,
Class<T> dataClass)
Create a schema if it does not already exist.
|
static <T> int |
SchemaUtils.createSchemaIfNotExists(ConnectionSource connectionSource,
String schemaName)
Create a schema if it does not already exist.
|
static <T> int |
TableUtils.createTable(ConnectionSource connectionSource,
Class<T> dataClass)
Issue the database statements to create the table associated with a class.
|
static <T> int |
TableUtils.createTable(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Issue the database statements to create the table associated with a table configuration.
|
static <T> int |
TableUtils.createTableIfNotExists(ConnectionSource connectionSource,
Class<T> dataClass)
Create a table if it does not already exist.
|
static <T> int |
TableUtils.createTableIfNotExists(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Create a table if it does not already exist.
|
static <T,ID> int |
SchemaUtils.dropSchema(ConnectionSource connectionSource,
Class<T> dataClass,
boolean ignoreErrors)
Issue the database statements to drop the schema associated with a class.
|
static <T,ID> int |
SchemaUtils.dropSchema(ConnectionSource connectionSource,
String schemaName,
boolean ignoreErrors)
Issue the database statements to drop the schema associated with a schema configuration.
|
static <T,ID> int |
TableUtils.dropTable(ConnectionSource connectionSource,
Class<T> dataClass,
boolean ignoreErrors)
Issue the database statements to drop the table associated with a class.
|
static <T,ID> int |
TableUtils.dropTable(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig,
boolean ignoreErrors)
Issue the database statements to drop the table associated with a table configuration.
|
static <T,ID> List<String> |
TableUtils.getCreateTableStatements(ConnectionSource connectionSource,
Class<T> dataClass)
Return an list of SQL statements that need to be run to create a table.
|
static <T,ID> List<String> |
TableUtils.getCreateTableStatements(ConnectionSource connectionSource,
DatabaseTableConfig<T> tableConfig)
Return an list of SQL statements that need to be run to create a table.
|
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.