Uses of Class
org.apache.empire.db.DBRecordBase
Packages that use DBRecordBase
Package
Description
This package contains the core Empire-DB implementation classes.
This package contains classes for exception handling of database related errors.
-
Uses of DBRecordBase in org.apache.empire.db
Subclasses of DBRecordBase in org.apache.empire.dbModifier and TypeClassDescriptionclassThis 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.classThis 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 beanFields in org.apache.empire.db declared as DBRecordBaseMethods in org.apache.empire.db with type parameters of type DBRecordBaseModifier and TypeMethodDescriptionprotected <R extends DBRecordBase>
DBRecordListFactory<R>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)final <R extends DBRecordBase>
List<R>DBUtils.queryRecordList(DBCommand cmd, DBRowSet rowset, Class<R> recordType) Executes a query and returns a list of DBRecord items<R extends DBRecordBase>
List<R>DBUtils.queryRecordList(DBCommand cmd, DBRecordListFactory<R> factory, int first, int pageSize) Executes a query and returns a list of DBRecord items<R extends DBRecordBase>
voidDBRowSet.updateRecord(R record) Updates or Inserts a record in the database.
Whether an update or insert is performed depends on the record state.
Only modified fields will be inserted or updated in the database.Methods in org.apache.empire.db that return DBRecordBaseModifier and TypeMethodDescriptionDBRecordBase.clone()Sets the value of a column in the record.Deprecated.Methods in org.apache.empire.db with parameters of type DBRecordBaseModifier and TypeMethodDescriptionprotected booleanDBQuery.addJoinRestriction(DBCommand cmd, DBColumn updCol, DBColumn joinCol, Object[] key, DBRecordBase record) Adds join restrictions to the supplied command object.protected voidDBRowSet.checkParamRecord(DBRecordBase record, boolean checkValid) Internally used for parameter checkingDBTable.checkUniqueConstraints(DBRecordBase record) Checks weather a unique constraint is violated when inserting or updating a record.protected voidDBRowSet.completeInitRecord(DBRecordBase record) Completes the record initialization.
Override this function to do post initialization processing.voidDBCommandExpr.DBCmdQuery.createRecord(DBRecordBase record, Object[] initalKey, boolean deferredInit) throws ERR_NOTSUPPORTEDvoidDBQuery.createRecord(DBRecordBase record, Object[] initalKey, boolean deferredInit) Returns an error, because it is not possible to add a record to a query.abstract voidDBRowSet.createRecord(DBRecordBase record, Object[] initalKey, boolean deferredInit) voidDBTable.createRecord(DBRecordBase record, Object[] initalKey, boolean deferredInit) Gets all table fields and the fields properties.voidDBView.createRecord(DBRecordBase record, Object[] initalKey, boolean deferredInit) protected Object[]DBQuery.getRecordKey(DBRecordBase record) Returns the record key for a given record.protected final ObjectDBRowSet.getRowsetData(DBRecordBase record) Returns additional data stored on a record by the RowSetprotected voidDBRecordBase.initData(DBRecordBase other) This method may be used to copy the record in order to preserve its statevoidDBQuery.initRecord(DBRecordBase record, RecordData recData, boolean newRecord) Add rowset datavoidDBReader.initRecord(DBRecordBase rec) initializes a DBRecord object with the values of the current row.protected voidDBRowSet.initRecord(DBRecordBase record, Object[] key, DBRowSet.FieldInitMode fieldInitMode, boolean newRecord) Initializes a DBRecord for this RowSet and sets primary key values.final voidDBRowSet.initRecord(DBRecordBase record, RecordData recData) Initializes a DBRecord for this rowset for an existing recordvoidDBRowSet.initRecord(DBRecordBase record, RecordData recData, boolean newRecord) Initializes a DBRecord for this rowset using the record data provided (i.e. from a DBReader)
The record may then be modified and updated.
At least all primary key columns must be supplied.
We strongly recommend to supply the value of the update timestamp column in order to detect concurrent changes.protected voidDBRowSet.initRecordDefaultValues(DBRecordBase record, DBRowSet.FieldInitMode fieldInitMode) initializes the Record Default Valuesprotected voidDBTable.initRecordDefaultValues(DBRecordBase record, DBRowSet.FieldInitMode fieldInitMode) initializes the Record Default ValuesbooleanDBRecordBase.isSame(DBRecordBase other) Compares the record to another oneprotected voidDBRowSet.prepareInitRecord(DBRecordBase record, boolean newRecord) Initialize this DBRowSet object and sets it's initial state.voidDBCommandExpr.DBCmdQuery.readRecord(DBRecordBase record, DBCompareExpr whereConstraints) throws ERR_NOTSUPPORTEDvoidDBQuery.readRecord(DBRecordBase record, DBCompareExpr whereConstraints) Creates a select SQL-Command of the query call the InitRecord method to execute the SQL-Command.protected voidDBRowSet.readRecord(DBRecordBase record, DBCommand cmd) Reads a single record from the database using the given command object.
If a record is found the DBRecord object will hold all record data.voidDBRowSet.readRecord(DBRecordBase record, DBCompareExpr whereConstraints) Reads a record from the databasevoidDBRowSet.readRecord(DBRecordBase record, DBCompareExpr whereConstraints, DBRowSet.PartialMode mode, DBColumn... columns) Reads the partial record for a given primary key from the databasevoidDBRecordBase.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 keyprotected final voidDBRowSet.setRowsetData(DBRecordBase record, Object rowsetData) May be used by a Rowset to store additional data on a recordvoidDBCommandExpr.DBCmdQuery.updateRecord(DBRecordBase rec) throws ERR_NOTSUPPORTEDvoidDBQuery.updateRecord(DBRecordBase record) Updates a query record by creating individual update commands for each table.voidDBView.updateRecord(DBRecordBase rec) Constructors in org.apache.empire.db with parameters of type DBRecordBase -
Uses of DBRecordBase in org.apache.empire.db.exceptions
Constructors in org.apache.empire.db.exceptions with parameters of type DBRecordBase -
Uses of DBRecordBase in org.apache.empire.db.generic
Subclasses of DBRecordBase in org.apache.empire.db.generic -
Uses of DBRecordBase in org.apache.empire.db.list
Classes in org.apache.empire.db.list with type parameters of type DBRecordBaseModifier and TypeInterfaceDescriptioninterfaceDBRecordListFactory<T extends DBRecordBase>classDBRecordListFactoryImpl<T extends DBRecordBase>DBRecordListFactoryImpl Implements the DBRecordListFactory interfaceMethods in org.apache.empire.db.list with type parameters of type DBRecordBaseModifier and TypeMethodDescriptionprotected static <T extends DBRecordBase>
Constructor<T>DBRecordListFactoryImpl.findRecordConstructor(Class<T> recordClass, Class<? extends DBContext> contextClass, Class<? extends DBRowSet> rowsetClass) Finds a constructor for recordClass