R
- record type of tablepublic class OperationTable<R extends ActiveRecord> extends Table<R>
Table
for use by one transaction within an ActiveOperation
. Uses a custom
RowTranslator
that ensures all records are attached to the active database for
this table.
Intended for use by ActiveOperation
only.
Constructor and Description |
---|
OperationTable(OperationDatabase operationDatabase,
java.lang.Class<R> rowClass)
Constructs for an operation database and class or record.
|
Modifier and Type | Method and Description |
---|---|
protected Cached |
initCachedAnnotation()
|
protected RowTranslator<R> |
initRowTranslator(Row rowAnnotation)
Creates a
RowTranslator for use by this table. |
begin, commit, delete, delete, deleteAll, deleteAll, deleteAllBatch, deleteBatch, flush, getCache, getDatabase, getLazySelectCascadeFields, getNameTranslators, getQualifiedTableName, getRequiredCascades, getRowClass, getRowTranslator, getTableName, getTypeTranslator, initCache, initNameTranslators, initTableName, initTypeTranslatorMap, insert, insertAll, insertAllBatch, insertBatch, isAutoGeneratedKeys, isCached, isReadOnly, newRow, putTypeTranslator, putTypeTranslator, rollback, save, saveAll, saveAllBatch, saveBatch, select, selectAll, selectAllCustom, selectAllWhere, selectAllWhereOrdered, selectAvg, selectAvg, selectCount, selectCount, selectCount, selectCount, selectCustom, selectMax, selectMax, selectMin, selectMin, selectSum, selectSum, selectWhere, setAutoGeneratedKeys, setReadOnly, setRequiredCascades, setTableName, translateName, update, updateAll, updateAllBatch, updateBatch
public OperationTable(OperationDatabase operationDatabase, java.lang.Class<R> rowClass) throws SormulaException
operationDatabase
- source of tables to use in active record operationrowClass
- type of recordSormulaException
- if errorprotected Cached initCachedAnnotation()
Cache
annotation in record, OperationDatabase
, and ActiveDatabase
.
Gets the annotation that defines caching. Subclasses can override to check for Cached
annotation in other classes if desired.initCachedAnnotation
in class Table<R extends ActiveRecord>
protected RowTranslator<R> initRowTranslator(Row rowAnnotation) throws TranslatorException
RowTranslator
for use by this table. Invoked by constructor.
Creates a RowTranslator
where ColumnsTranslator.read(ResultSet, int, Object)
and ColumnsTranslator.write(PreparedStatement, int, Object)
attach the active
database to the row using ActiveRecord.attach(ActiveDatabase)
.initRowTranslator
in class Table<R extends ActiveRecord>
rowAnnotation
- annotation on table or row classTranslatorException
- if error