public interface Record extends RecordData
A object implementing the record interface is essentially a so called "dynamic bean".
This interface inherits from RecordData which provides further data access methods.
The Record interface is implemented by the class DBRecordBase
Modifier and Type | Method and Description |
---|---|
Column |
getColumn(int index)
Overridden to change return type from ColumnExpr to Column
|
EntityType |
getEntityType()
Returns the entity this Record belongs to
|
Options |
getFieldOptions(Column column)
returns the Options list for the given record field.
|
Object[] |
getKey()
returns an array of key values which uniquely identify the record.
|
Column[] |
getKeyColumns()
returns an array of key columns which uniquely identify the record.
|
boolean |
isFieldReadOnly(Column column)
returns true if the field is read-only.
|
boolean |
isFieldRequired(Column column)
returns true if the field is required.
|
boolean |
isFieldVisible(Column column)
returns true if the field is visible to the client.
|
boolean |
isModified()
returns true if the record has been modified.
|
boolean |
isNew()
returns true if this record is a new record.
|
boolean |
isReadOnly()
returns true if this record is readOnly.
|
boolean |
isValid()
returns true if the record is valid.
|
static Object[] |
key(Object... values)
varArgs to Array
|
Record |
set(Column column,
Object value)
sets a record value based on a column.
|
int |
setRecordValues(Object bean)
sets all record values from a particular bean.
|
int |
setRecordValues(Object bean,
Collection<Column> ignoreList)
sets all record values from a particular bean.
|
void |
setValue(int i,
Object value)
sets a record value based on the field index.
|
Object |
validateValue(Column column,
Object value)
Validates a value before it is set in the record.
|
boolean |
wasModified(Column column)
checks whether or not the field for the given column has been modified since it has been loaded.
|
get, getFieldCount, getFieldIndex, getFieldIndex, getValue, isNull, isNull, setBeanProperties
static Object[] key(Object... values)
values
- the list of key valuesboolean isValid()
boolean isReadOnly()
boolean isModified()
boolean isNew()
Column getColumn(int index)
getColumn
in interface RecordData
index
- field index of the column expressionColumn[] getKeyColumns()
Object[] getKey()
EntityType getEntityType()
boolean isFieldVisible(Column column)
column
- the column to check for visibilityboolean isFieldReadOnly(Column column)
column
- the requested columnboolean isFieldRequired(Column column)
column
- the requested columnOptions getFieldOptions(Column column)
column
- the column to check for visibilityvoid setValue(int i, Object value)
i
- index of the field for which to set the valuevalue
- the new field valueRecord set(Column column, Object value)
column
- the requested columnvalue
- the new record value for the given columnObject validateValue(Column column, Object value)
column
- the columnvalue
- the value to validateboolean wasModified(Column column)
column
- the requested columnint setRecordValues(Object bean, Collection<Column> ignoreList)
The bean must provide corresponding getter functions for all desired column.
In order to map column names to property names the property name is detected by ColumnExpr.getBeanPropertyName()
bean
- the Java Bean from which to read the value fromignoreList
- list of column to ignoreint setRecordValues(Object bean)
The bean must provide corresponding getter functions for all desired column.
bean
- the Java Bean from which to read the value fromCopyright © 2008–2023 Apache Software Foundation. All rights reserved.