Package | Description |
---|---|
org.apache.empire.db |
This package contains the core Empire-DB implementation classes.
|
org.apache.empire.db.exceptions |
This package contains classes for exception handling of database related errors.
|
org.apache.empire.db.generic | |
org.apache.empire.db.list |
Modifier and Type | Class and Description |
---|---|
class |
DBRecord
This class represents a record from a database table, view or query
The class provides methods to create, read, update and delete records
If an Idendity-column (AUTOINC) is defined, the value will be set upon creation by the dbms to the next value
If a Timestamp-column is defined the value will be automatically set and concurrent changes of the record will be detected
If changes to the record are made, but a rollback on the connection is performed, the changes will be reverted (Rollback-Handling)
The record is Serializable either if the provided DBContext is serializable, or if the Context is provided on deserialization in a derived class.
|
class |
DBRecordBean
This class represents a record from a database table, view or query
Other than DBRecord it is not permanently attached to a context or rowset
Thus it has a Default constructor and is essentially a dynamic bean
|
Modifier and Type | Field and Description |
---|---|
DBRecordBase |
DBRecordBase.DBRecordRollbackHandler.record |
Modifier and Type | Method and Description |
---|---|
protected <R extends DBRecordBase> |
DBUtils.createDefaultRecordListFactory(Class<R> recordClass,
DBRowSet rowset)
Crates a default DBRecordListFactory for a DBRecord class
The DBRecord class must provide the following constructor
DBRecord(DBContext context, DBRowSet rowset)
|
<R extends DBRecordBase> |
DBUtils.queryRecordList(DBCommand cmd,
DBRecordListFactory<R> factory,
int first,
int pageSize)
Executes a query and returns a list of DBRecord items
|
<R extends DBRecordBase> |
DBUtils.queryRecordList(DBCommand cmd,
DBRowSet rowset,
Class<R> recordType)
Executes a query and returns a list of DBRecord items
|
<R extends DBRecordBase> |
DBRowSet.updateRecord(R record)
Updates or Inserts a record in the database.
|
Modifier and Type | Method and Description |
---|---|
DBRecordBase |
DBRecordBase.clone() |
DBRecordBase |
DBRecordBase.set(Column column,
Object value)
Sets the value of a column in the record.
|
DBRecordBase |
DBRecordBase.setValue(Column column,
Object value)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
DBQuery.addJoinRestriction(DBCommand cmd,
DBColumn updCol,
DBColumn joinCol,
DBColumn[] keyColumns,
Object[] key,
DBRecordBase record)
Adds join restrictions to the supplied command object.
|
protected void |
DBRowSet.checkParamRecord(DBRecordBase record,
boolean checkValid)
Internally used for parameter checking
|
DBIndex |
DBTable.checkUniqueConstraints(DBRecordBase record)
Checks weather a unique constraint is violated when inserting or updating a record.
|
protected void |
DBRowSet.completeInitRecord(DBRecordBase record)
Completes the record initialization.
|
void |
DBView.createRecord(DBRecordBase record,
Object[] initalKey,
boolean deferredInit) |
void |
DBTable.createRecord(DBRecordBase record,
Object[] initalKey,
boolean deferredInit)
Gets all table fields and the fields properties.
|
abstract void |
DBRowSet.createRecord(DBRecordBase record,
Object[] initalKey,
boolean deferredInit) |
void |
DBQuery.createRecord(DBRecordBase record,
Object[] initalKey,
boolean deferredInit)
Returns an error, because it is not possible to add a record to a query.
|
void |
DBCommandExpr.DBCmdQuery.createRecord(DBRecordBase record,
Object[] initalKey,
boolean deferredInit)
throws ERR_NOTSUPPORTED
|
protected Object[] |
DBQuery.getRecordKey(DBRecordBase record)
Returns a array of primary key columns by a specified DBRecord object.
|
protected Object |
DBRowSet.getRowsetData(DBRecordBase record)
Returns additional data stored on a record by the RowSet
|
void |
DBReader.initRecord(DBRecordBase rec)
initializes a DBRecord object with the values of the current row.
|
void |
DBRowSet.initRecord(DBRecordBase record,
DBRecordData recData)
Initializes a DBRecord for this rowset using the record data provided (i.e. from a DBReader)
The record may then be modified and updated. |
void |
DBQuery.initRecord(DBRecordBase record,
DBRecordData recData)
Add rowset data
|
protected void |
DBRowSet.initRecord(DBRecordBase record,
Object[] key,
DBRowSet.FieldInitMode fieldInitMode,
boolean newRecord)
Initializes a DBRecord for this RowSet and sets primary key values.
|
protected void |
DBTable.initRecordDefaultValues(DBRecordBase record,
DBRowSet.FieldInitMode fieldInitMode)
initializes the Record Default Values
|
protected void |
DBRowSet.initRecordDefaultValues(DBRecordBase record,
DBRowSet.FieldInitMode fieldInitMode)
initializes the Record Default Values
|
boolean |
DBRecordBase.isSame(DBRecordBase other)
Compares the record to another one
|
protected void |
DBRowSet.prepareInitRecord(DBRecordBase record,
boolean newRecord)
Initialize this DBRowSet object and sets it's initial state.
|
protected void |
DBRowSet.readRecord(DBRecordBase record,
DBCommand cmd)
Reads a single record from the database using the given command object.
|
void |
DBRowSet.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints)
Reads a record from the database
|
void |
DBQuery.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints)
Creates a select SQL-Command of the query call the InitRecord method to execute the SQL-Command.
|
void |
DBCommandExpr.DBCmdQuery.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints)
throws ERR_NOTSUPPORTED
|
void |
DBRowSet.readRecord(DBRecordBase record,
DBCompareExpr whereConstraints,
DBRowSet.PartialMode mode,
DBColumn... columns)
Reads the partial record for a given primary key from the database
|
void |
DBRecordBase.setParentRecord(DBColumn parentIdColumn,
DBRecordBase record)
For DBMS with IDENTITY-columns defer setting the parent-id until the record is inserted
The parent record must have a one-column primary key
|
protected void |
DBRowSet.setRowsetData(DBRecordBase record,
Object rowsetData)
May be used by a Rowset to store additional data on a record
|
void |
DBView.updateRecord(DBRecordBase rec) |
void |
DBQuery.updateRecord(DBRecordBase record)
Updates a query record by creating individual update commands for each table.
|
void |
DBCommandExpr.DBCmdQuery.updateRecord(DBRecordBase rec)
throws ERR_NOTSUPPORTED
|
Constructor and Description |
---|
DBRecordRollbackHandler(DBRecordBase record) |
Constructor and Description |
---|
RecordReadOnlyException(DBRecordBase record) |
Modifier and Type | Class and Description |
---|---|
class |
TRecord<CTX extends DBContext,T extends DBRowSet> |
Modifier and Type | Interface and Description |
---|---|
interface |
DBRecordListFactory<T extends DBRecordBase> |
class |
DBRecordListFactoryImpl<T extends DBRecordBase>
DBRecordListFactoryImpl
Implements the DBRecordListFactory interface
|
Modifier and Type | Method and Description |
---|---|
protected static <T extends DBRecordBase> |
DBRecordListFactoryImpl.findRecordConstructor(Class<T> recordClass,
Class<? extends DBContext> contextClass,
Class<? extends DBRowSet> rowsetClass)
Finds a constructor for recordClass
|
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.