Package | Description |
---|---|
org.sormula |
Fundamental classes.
|
org.sormula.active.operation |
Thread-safe and transaction-compliant database operations used by
ActiveTable . |
org.sormula.cache |
Fundamental classes used to implement caching that is specified by
Cached.type() . |
org.sormula.cache.writable |
The abstract
WritableCache and supporting classes that are
used for implementing a cache that writes rows to the database. |
org.sormula.log |
Logging classes used by sormula.
|
org.sormula.operation |
Classes that perform SQL operations such as select, update, insert, save, and delete.
|
org.sormula.operation.cascade.lazy |
Implementation of lazy loading.
|
org.sormula.reflect |
Classes for performing Java reflection operations.
|
org.sormula.selector |
Classes that select subsets of rows.
|
org.sormula.translator |
Classes that provide mapping between columns and Java class members.
|
Modifier and Type | Method and Description |
---|---|
void |
Transaction.begin()
Starts the transaction.
|
void |
NoOpTransaction.begin()
Starts the transaction.
|
void |
Transaction.commit()
Commits the transaction by invoking
Connection.commit() . |
void |
NoOpTransaction.commit()
Commits the transaction by invoking
Connection.commit() . |
int |
Table.delete(java.lang.Object... parameters)
Deletes by primary key.
|
int |
Table.delete(R row)
Deletes by primary key.
|
int |
Table.deleteAll()
Deletes all rows in table.
|
int |
Table.deleteAll(java.util.Collection<R> rows)
Deletes many rows by primary key.
|
int |
Table.deleteAllBatch(java.util.Collection<R> rows)
Deletes many rows by primary key in batch mode.
|
int |
Table.deleteBatch(R row)
Deletes by primary key in batch mode.
|
void |
Table.flush()
Writes uncommitted cache changes to database and then evicts all rows from cache.
|
void |
Database.flush()
Invokes
Table.flush() on all known table objects in this database. |
<R> Table<R> |
Database.getTable(java.lang.Class<R> rowClass)
Gets table object for reading/writing row objects of type R from/to
table.
|
<R> Table<R> |
Database.getTable(java.lang.Class<R> rowClass,
boolean create)
Gets table object for reading/writing row objects of type R from/to
table.
|
protected void |
Database.init(java.lang.String schema)
Invoked by constructor to initialize.
|
protected Transaction |
Database.initTransaction(java.sql.Connection connection)
Constructs a transaction to use.
|
protected void |
Table.initTypeTranslatorMap()
Initializes type translators for table.
|
protected void |
Database.initTypeTranslatorMap()
Invoked by constructor to initialize default type translators and type translators
annotated on
Database class. |
int |
Table.insert(R row)
Inserts one row into table.
|
int |
Table.insertAll(java.util.Collection<R> rows)
Inserts collection of rows.
|
int |
Table.insertAllBatch(java.util.Collection<R> rows)
Inserts a collection of rows in batch mode.
|
int |
Table.insertBatch(R row)
Inserts row into table in batch mode.
|
R |
Table.newRow()
Creates new instance of row.
|
void |
Transaction.rollback()
Aborts the transaction by invoking
Connection.rollback() . |
void |
NoOpTransaction.rollback()
Aborts the transaction by invoking
Connection.rollback() . |
int |
Table.save(R row)
Uses
SaveOperation to update an existing row or insert row if it
is not already in database. |
int |
Table.saveAll(java.util.Collection<R> rows)
Uses
SaveOperation to update an existing rows or insert rows if they
are not already in database. |
int |
Table.saveAllBatch(java.util.Collection<R> rows)
Saves a collection of rows in batch mode.
|
int |
Table.saveBatch(R row)
Inserts or updates row in batch mode.
|
R |
Table.select(java.lang.Object... primaryKeys)
Selects one row in table using primary key.
|
java.util.List<R> |
Table.selectAll()
Selects all rows in table.
|
java.util.List<R> |
Table.selectAllCustom(java.lang.String customSql,
java.lang.Object... parameters)
Select list of rows using custom sql.
|
java.util.List<R> |
Table.selectAllWhere(java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects list of rows for where condition and parameters.
|
java.util.List<R> |
Table.selectAllWhereOrdered(java.lang.String whereConditionName,
java.lang.String orderByName,
java.lang.Object... parameters)
Selects list of rows for where condition and parameters.
|
<T> T |
Table.selectAvg(java.lang.String expression)
Selects average value.
|
<T> T |
Table.selectAvg(java.lang.String expression,
java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects average value.
|
int |
Table.selectCount()
Gets count of all rows in table.
|
<T> T |
Table.selectCount(java.lang.String expression)
Selects count of rows.
|
int |
Table.selectCount(java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects count for a subset of rows.
|
<T> T |
Table.selectCount(java.lang.String expression,
java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects count of rows.
|
R |
Table.selectCustom(java.lang.String customSql,
java.lang.Object... parameters)
Selects one row using custom sql.
|
<T> T |
Table.selectMax(java.lang.String expression)
Selects maximum value.
|
<T> T |
Table.selectMax(java.lang.String expression,
java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects maximum value.
|
<T> T |
Table.selectMin(java.lang.String expression)
Selects minimum value.
|
<T> T |
Table.selectMin(java.lang.String expression,
java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects minimum value.
|
<T> T |
Table.selectSum(java.lang.String expression)
Selects sum.
|
<T> T |
Table.selectSum(java.lang.String expression,
java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects sum.
|
R |
Table.selectWhere(java.lang.String whereConditionName,
java.lang.Object... parameters)
Selects one row for where condition and parameters.
|
void |
Transaction.setConnection(java.sql.Connection connection)
Sets new connection for transaction.
|
void |
Database.setConnection(java.sql.Connection connection)
Sets new connection to use by this class and all related classes.
|
int |
Table.update(R row)
Updates one row in table by primary key.
|
int |
Table.updateAll(java.util.Collection<R> rows)
Updates collection of rows using primary key.
|
int |
Table.updateAllBatch(java.util.Collection<R> rows)
Updates collection of rows using primary key in batch mode.
|
int |
Table.updateBatch(R row)
Updates row in table by primary key in batch mode.
|
Constructor and Description |
---|
CachedTable(Database database,
java.lang.Class<R> rowClass) |
CachedTable(Table<R> table) |
Database(javax.sql.DataSource dataSource)
Constructs for no schema.
|
Database(javax.sql.DataSource dataSource,
java.lang.String schema)
Constructs for schema.
|
Database(java.lang.String dataSourceName)
Constructs for JNDI name and no schema.
|
Database(java.lang.String dataSourceName,
java.lang.String schema)
Constructs for JNDI name and schema.
|
Table(Database database,
java.lang.Class<R> rowClass)
Constructs for a database and the class that used for row objects.
|
Modifier and Type | Method and Description |
---|---|
<R> Table<R> |
OperationDatabase.getTable(java.lang.Class<R> rowClass)
Gets table object for reading/writing row objects of type R from/to
table.
|
Constructor and Description |
---|
OperationTable(OperationDatabase operationDatabase,
java.lang.Class<R> rowClass)
Constructs for an operation database and class or record.
|
Modifier and Type | Class and Description |
---|---|
class |
CacheException
Exception that originals from classes in org.sormula.cache packages.
|
class |
DuplicateCacheException
Indicates that a duplicate set of primary key(s) already exists in the cache.
|
class |
IllegalCacheOperationException
Invalid use of method by invoking methods in a manner that violates the cache contract.
|
class |
IllegalCacheStateException
Invalid cache state caused by cache activity outside of a transaction or failure to
commit or rollback transaction.
|
Modifier and Type | Class and Description |
---|---|
class |
CacheWriteException
Thrown when cache has error writing to the database.
|
Modifier and Type | Class and Description |
---|---|
class |
LogException
Exception that originates in the log package.
|
Modifier and Type | Class and Description |
---|---|
class |
BatchException
Used for one of several error conditions that can occur when
ModifyOperation.setBatch(boolean) is set to true. |
class |
MissingFieldException
Indicates a field name was not found in a class.
|
class |
OperationException
Exception that originates in the operation package.
|
class |
ReadOnlyException
Indicates an insert, update, or delete was attempted for a table that is
read only.
|
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractLazySelector.begin()
Starts a transaction for
AbstractLazySelector.lazySelect(Field) . |
protected void |
AbstractLazySelector.commit()
Commits the transaction for
AbstractLazySelector.lazySelect(Field) . |
protected void |
AbstractLazySelector.rollback()
Rolls back the transaction for
AbstractLazySelector.lazySelect(Field) . |
Modifier and Type | Class and Description |
---|---|
class |
ReflectException
Exception that originates in the reflect package.
|
Modifier and Type | Class and Description |
---|---|
class |
SelectorException
Exception that originates in the selector package.
|
Modifier and Type | Class and Description |
---|---|
class |
NoColumnTranslatorException
Failed column translator lookup exception.
|
class |
NoTypeTranslatorException
No type translator defined.
|
class |
TranslatorException
Exception that originates in the translator package.
|