|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDataTableRecord
Data table records represent records created when populating instances of
IDataTable. The structure of data table records is determined by the
table definition, i.e. ITableDefinition, of the table alias the
respective data table is based on.
In constrast to instances of IDataBrowserRecord data table records
could be modified.
There are multiple setter methods for modifying record field values. The
following tables shows which java types are accepted as input for setting the
value of a record field depending on its jACOB field type. If a field value
is not accepted as input, the respective setter method would throw a
IllegalArgumentException.
| input \ for | jACOB field type | |||||||||||||
| Java type(s) | Text | Boolean | Integer | Long | Decimal | Float | Double | Time | Date | Timestamp | Enumeration | Longtext | Binary | Document |
| java.lang.String | x | x | x | x | x | x | x | x | x | x | x | X | ||
| boolean, java.lang.Boolean | x | X | X | |||||||||||
| int, java.lang.Integer | x | X | X | X | X | X | X | X | ||||||
| long, java.lang.Long | x | X | X | X | X | X | X | X | X | X | X | |||
| java.math.BigDecimal | x | X | X | X | X | |||||||||
| float, java.lang.Float | x | X | X | X | X | |||||||||
| double, java.lang.Double | x | X | X | X | X | |||||||||
| java.sql.Time | x | X | X | X | ||||||||||
| java.sql.Date | x | X | X | X | ||||||||||
| java.util.Date | x | X | X | X | X | |||||||||
| java.sql.Timestamp | x | X | X | X | X | |||||||||
| byte[] | x | X | X | |||||||||||
DataDocumentValue |
x | X | X | |||||||||||
| java.lang.Object | x | X | ||||||||||||
IDataRecord.getValue(int) or getOldValue(int) methods.
A lower x indicates that the java type is accepted as input but a
InvalidExpressionException could occur. This is the case if for
example a String value is too long or could not be converted to a valid
timestamp value.
Data table record instances could be obtained by means of
IDataTable.getRecord(int)
IDataTable.getSelectedRecord()
IDataTable.newRecord(IDataTransaction)
IDataTable.reloadSelectedRecord()
getLinkedRecord(ITableAlias)
getLinkedRecord(String)
IDataAccessor.cloneRecord(IDataTransaction, IDataTableRecord)
IDataAccessor.cloneRecord(IDataTransaction, IDataTableRecord, ITableAlias)
IDataAccessor.cloneRecord(IDataTransaction, IDataTableRecord, String)
| Field Summary |
|---|
| Fields inherited from interface de.tif.jacob.core.data.IDataRecord |
|---|
DEFAULT_STYLE, LONG_STYLE, MEDIUM_STYLE, SHORT_STYLE |
| Method Summary | |
|---|---|
void |
appendLongTextValue(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.String value)
Appends the given value to the field value of a long text record field. |
void |
appendToHistory(IDataTransaction transaction,
java.lang.String note)
Appends the given note to the modification history of this record. |
void |
delete(IDataTransaction transaction)
Deletes the record from the underlying data source. |
java.lang.String |
getBinaryReference(java.lang.String fieldName)
|
IDataTransaction |
getCurrentTransaction()
Return the current active transaction, which has been used to modify this record. |
java.lang.String |
getDocumentReference(java.lang.String fieldName)
|
ITableField |
getFieldDefinition(java.lang.String fieldName)
Returns the definition of the table field given by name. |
IDataKeyValue |
getKeyValue(IKey key)
Returns the key value of the specified key. |
IDataKeyValue |
getKeyValue(java.lang.String keyName)
Returns the key value of the specified key. |
IDataTableRecord |
getLinkedRecord(ITableAlias tableAlias)
Returns the record of the given table alias that is linked to this record. |
IDataTableRecord |
getLinkedRecord(java.lang.String tableAliasName)
Returns the record of the given table alias that is linked to this record. |
java.lang.String |
getLongTextReference(java.lang.String fieldName)
|
boolean |
getOldbooleanValue(java.lang.String fieldName)
Returns the specified old field value as a boolean value, i.e. |
java.lang.Boolean |
getOldBooleanValue(java.lang.String fieldName)
Returns the specified old field value in Boolean format,
i.e. the value returned reflects the value within the persistent data
store. |
byte[] |
getOldBytesValue(java.lang.String fieldName)
Returns the specified old field value as a byte[] array,
i.e. the value returned reflects the value within the persistent data
store. |
java.sql.Date |
getOldDateValue(java.lang.String fieldName)
Returns the specified old field value in Date format,
i.e. the value returned reflects the value within the persistent data
store. |
java.math.BigDecimal |
getOldDecimalValue(java.lang.String fieldName)
Returns the specified old field value in BigDecimal format,
i.e. the value returned reflects the value within the persistent data
store. |
DataDocumentValue |
getOldDocumentValue(java.lang.String fieldName)
Returns the specified old field value as a DataDocumentValue,
i.e. the value returned reflects the value within the persistent data
store. |
double |
getOlddoubleValue(java.lang.String fieldName)
Returns the specified old field value as a double value, i.e. |
java.lang.Double |
getOldDoubleValue(java.lang.String fieldName)
Returns the specified old field value in Double format,
i.e. the value returned reflects the value within the persistent data
store. |
float |
getOldfloatValue(java.lang.String fieldName)
Returns the specified old field value as a float value, i.e. |
java.lang.Float |
getOldFloatValue(java.lang.String fieldName)
Returns the specified old field value in Float format,
i.e. the value returned reflects the value within the persistent data
store. |
java.lang.Integer |
getOldIntegerValue(java.lang.String fieldName)
Returns the specified old field value in Integer format,
i.e. the value returned reflects the value within the persistent data
store. |
int |
getOldintValue(java.lang.String fieldName)
Returns the specified old field value as a int value, i.e. |
long |
getOldlongValue(java.lang.String fieldName)
Returns the specified old field value as a long value, i.e. |
java.lang.Long |
getOldLongValue(java.lang.String fieldName)
Returns the specified old field value in Long format,
i.e. the value returned reflects the value within the persistent data
store. |
java.math.BigDecimal |
getOldSaveDecimalValue(java.lang.String fieldName)
Similar behaviour than getOldDecimalValue(String) except that
0.0 is returned in case the value is null. |
java.lang.String |
getOldSaveStringValue(java.lang.String fieldName)
Similar behaviour than getOldStringValue(String) except that an
empty string is returned in case the value is null. |
java.lang.String |
getOldStringValue(int fieldIndex)
This method has the same behaviour as getOldValue(int) except
that the field value is returned as default string representation. |
java.lang.String |
getOldStringValue(java.lang.String fieldName)
This method has the same behaviour as getOldStringValue(int) except
that the field value is specified by name. |
java.lang.String |
getOldStringValue(java.lang.String fieldName,
java.util.Locale locale)
This method has the same behaviour as getOldStringValue(int)
except that the field value is specified by name and the given locale is
consider. |
java.lang.String |
getOldStringValue(java.lang.String fieldName,
java.util.Locale locale,
int style)
This method has the same behaviour as getOldStringValue(int)
except that the field value is specified by name and the given locale is
consider. |
java.sql.Timestamp |
getOldTimestampValue(java.lang.String fieldName)
Returns the specified old field value in Timestamp format,
i.e. the value returned reflects the value within the persistent data
store. |
java.sql.Time |
getOldTimeValue(java.lang.String fieldName)
Returns the specified old field value in Time format,
i.e. the value returned reflects the value within the persistent data
store. |
java.lang.Object |
getOldValue(int fieldIndex)
Returns the old field value, i.e. the value returned reflects the value within the persistent data store. |
java.lang.Object |
getOldValue(java.lang.String fieldName)
Returns the old field value, i.e. the value returned reflects the value within the persistent data store. |
IDataTable |
getTable()
Returns the parent data table. |
java.lang.Object |
getValue(ITableField field)
Returns the field value specified by the given table field instance. |
boolean |
hasChangedValue(int fieldIndex)
Checks whether the specified field value has been effectively changed within the current transaction. |
boolean |
hasChangedValue(java.lang.String fieldName)
This method has the same behaviour has hasChangedValue(int)except
that the field value is specified by name. |
boolean |
hasChangedValues()
Checks whether any field value has been effectively changed within the current transaction. |
boolean |
hasLinkedRecord(ITableAlias tableAlias)
Checks whether this record is linked to a record of the given table alias. |
boolean |
hasLinkedRecord(java.lang.String tableAliasName)
Checks whether this record is linked to a record of the given table alias. |
boolean |
hasNullValue(java.lang.String fieldName)
Checks whether the field value specified by its name is null,
i.e. the field value has not been set. |
boolean |
isDeleted()
Checks whether the record is going to be deleted (within the current transaction) or already has been deleted. |
boolean |
isNew()
Checks whether the record is a new record, i.e. is an uncommitted record or if called from DataTableRecordEventHandler.afterCommitAction(IDataTableRecord)
has just been committed. |
boolean |
isNormal()
Checks whether the record is in normal mode, i.e. is neither new nor updated nor deleted. |
boolean |
isUpdated()
Checks whether the record is currently updated or if called from DataTableRecordEventHandler.afterCommitAction(IDataTableRecord)
has just been updated. |
void |
prependLongTextValue(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.String value)
Prepends the given value to the field value of a long text record field. |
void |
resetLinkedRecord(IDataTransaction transaction,
ITableAlias tableAlias)
Unlinks this record from a record of the given table alias, if existing. |
void |
resetLinkedRecord(IDataTransaction transaction,
java.lang.String tableAliasName)
Unlinks this record from a record of the given table alias, if existing. |
boolean |
setBinaryValue(IDataTransaction transaction,
java.lang.String fieldName,
byte[] value)
Sets the value of a binary record field. |
boolean |
setBooleanValue(IDataTransaction transaction,
java.lang.String fieldName,
boolean value)
Sets the value of a record field to the given boolean value. |
boolean |
setDateValue(IDataTransaction transaction,
java.lang.String fieldName,
java.util.Date value)
Sets the value of a date or timestamp record field. |
boolean |
setDateValue(IDataTransaction transaction,
java.lang.String fieldName,
long timeMillis)
Sets the value of a date or timestamp record field. |
boolean |
setDecimalValue(IDataTransaction transaction,
java.lang.String fieldName,
java.math.BigDecimal value)
Sets the value of a decimal record field. |
boolean |
setDocumentValue(IDataTransaction transaction,
java.lang.String fieldName,
DataDocumentValue documentValue)
Sets the value of a document record field. |
boolean |
setDoubleValue(IDataTransaction transaction,
java.lang.String fieldName,
double value)
Sets the value of a record field to the given double value. |
boolean |
setFloatValue(IDataTransaction transaction,
java.lang.String fieldName,
float value)
Sets the value of a record field to the given float value. |
boolean |
setIntValue(IDataTransaction transaction,
java.lang.String fieldName,
int value)
Sets the value of a record field to the given int value. |
void |
setLinkedRecord(IDataTransaction transaction,
IDataRecord fromRecord)
Links this record with the given record. |
boolean |
setLongValue(IDataTransaction transaction,
java.lang.String fieldName,
long value)
Sets the value of a record field to the given long value. |
boolean |
setStringValue(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.String value)
Sets the value of a record field to the given String (expression). |
boolean |
setStringValue(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.String value,
java.util.Locale locale)
Sets the value of a record field to the given String (expression). |
boolean |
setStringValueWithTruncation(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.String value)
Sets the value of a record field to the given String (expression). |
boolean |
setStringValueWithTruncation(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.String value,
java.util.Locale locale)
Sets the value of a record field to the given String (expression). |
boolean |
setTimestampValue(IDataTransaction transaction,
java.lang.String fieldName,
long timeMillis)
Sets the value of a timestamp record field. |
boolean |
setTimestampValue(IDataTransaction transaction,
java.lang.String fieldName,
java.sql.Timestamp value)
Sets the value of a timestamp record field. |
boolean |
setTimeValue(IDataTransaction transaction,
java.lang.String fieldName,
java.sql.Time value)
Sets the value of a time record field. |
boolean |
setValue(IDataTransaction transaction,
ITableField field,
java.lang.Object value)
Sets the value of a record field. |
boolean |
setValue(IDataTransaction transaction,
java.lang.String fieldName,
java.lang.Object value)
Sets the value of a record field. |
| Method Detail |
|---|
IDataTable getTable()
java.lang.Object getValue(ITableField field)
The java type (class) of the field value returned is determined by the
field type. Please see IDataRecord!
field - the table field to get the value for
null
boolean hasNullValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException
null,
i.e. the field value has not been set.
Note: This method is equivalent to
null == , but could be much more
efficient in case of document, binary or long text values. This is because
these values need not necessarily being retrieved from data source.
IDataRecord.getValue(String)
fieldName - the name of the field
true if the field value is null,
otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this recordboolean setStringValue(IDataTransaction transaction, java.lang.String fieldName, java.lang.String value) throws java.lang.NoSuchFieldException, InvalidExpressionException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
InvalidExpressionException - if the field value is an invalid expression which can not be
resolved
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setStringValue(IDataTransaction transaction, java.lang.String fieldName, java.lang.String value, java.util.Locale locale) throws java.lang.NoSuchFieldException, InvalidExpressionException, RecordLockedException, java.lang.IllegalArgumentException
For example: When setting value to "04/15/2005 12:59:00 AM"
for a timestamp field, the execution of this method would be successful, if
the locale is set to Locale.US.
Nevertheless, a InvalidExpressionException would be thrown,
if the locale is set to Locale.GERMANY
The value is not saved to the data source until
IDataTransaction.commit()is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
valuelocale - the locale to consider or null to use default
locale of the respective application
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
InvalidExpressionException - if the field value is an invalid expression which can not be
resolved
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setStringValueWithTruncation(IDataTransaction transaction, java.lang.String fieldName, java.lang.String value) throws java.lang.NoSuchFieldException, InvalidExpressionException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
In contrast to setStringValue(IDataTransaction, String, String)
the given String value will be truncated, if the maximum field length of a
text field is exceeded.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
InvalidExpressionException - if the field value is an invalid expression which can not be
resolved
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setStringValueWithTruncation(IDataTransaction transaction, java.lang.String fieldName, java.lang.String value, java.util.Locale locale) throws java.lang.NoSuchFieldException, InvalidExpressionException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
In contrast to setStringValue(IDataTransaction, String, String, Locale)
the given String value will be truncated, if the maximum field length of a
text field is exceeded.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
valuelocale - the locale to consider or null to use default
locale of the respective application
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
InvalidExpressionException - if the field value is an invalid expression which can not be
resolved
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setDateValue(IDataTransaction transaction, java.lang.String fieldName, java.util.Date value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setDateValue(IDataTransaction transaction, java.lang.String fieldName, long timeMillis) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldtimeMillis - milliseconds since January 1, 1970, 00:00:00 GMT not to exceed the
milliseconds representation for the year 8099. A negative number
indicates the number of milliseconds before January 1, 1970,
00:00:00 GMT.
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setDecimalValue(IDataTransaction transaction, java.lang.String fieldName, java.math.BigDecimal value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setDoubleValue(IDataTransaction transaction, java.lang.String fieldName, double value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
double value. The
value is not saved to the data source until
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setFloatValue(IDataTransaction transaction, java.lang.String fieldName, float value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
float value. The
value is not saved to the data source until
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setIntValue(IDataTransaction transaction, java.lang.String fieldName, int value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
int value. The
value is not saved to the data source until
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setBooleanValue(IDataTransaction transaction, java.lang.String fieldName, boolean value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
boolean value. The
value is not saved to the data source until
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setLongValue(IDataTransaction transaction, java.lang.String fieldName, long value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
long value. The
value is not saved to the data source until
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setTimeValue(IDataTransaction transaction, java.lang.String fieldName, java.sql.Time value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setTimestampValue(IDataTransaction transaction, java.lang.String fieldName, java.sql.Timestamp value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setTimestampValue(IDataTransaction transaction, java.lang.String fieldName, long timeMillis) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldtimeMillis - milliseconds since January 1, 1970, 00:00:00 GMT not to exceed the
milliseconds representation for the year 8099. A negative number
indicates the number of milliseconds before January 1, 1970,
00:00:00 GMT.
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.void appendLongTextValue(IDataTransaction transaction, java.lang.String fieldName, java.lang.String value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to append
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the record field is not a long text record fieldvoid prependLongTextValue(IDataTransaction transaction, java.lang.String fieldName, java.lang.String value) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to prepend
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the record field is not a long text record fieldboolean setBinaryValue(IDataTransaction transaction, java.lang.String fieldName, byte[] value) throws java.lang.NoSuchFieldException, RecordLockedException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setDocumentValue(IDataTransaction transaction, java.lang.String fieldName, DataDocumentValue documentValue) throws java.lang.NoSuchFieldException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fielddocumentValue - the document value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the record field is not a document record fieldboolean setValue(IDataTransaction transaction, ITableField field, java.lang.Object value) throws InvalidExpressionException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfield - the table field to set the value forvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
InvalidExpressionException - if the field value is an invalid expression which can not be
resolved
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.boolean setValue(IDataTransaction transaction, java.lang.String fieldName, java.lang.Object value) throws java.lang.NoSuchFieldException, InvalidExpressionException, RecordLockedException, java.lang.IllegalArgumentException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationfieldName - the name of the fieldvalue - the field value to set or null to reset the field
value
true if the field value has been effectively
changed, otherwise false
java.lang.NoSuchFieldException - if no such field name exists for this record
InvalidExpressionException - if the field value is an invalid expression which can not be
resolved
RecordLockedException - if the record is currently locked by another user
java.lang.IllegalArgumentException - if the field value can not be converted to the requested format.
For valid conversions see IDataTableRecord.void appendToHistory(IDataTransaction transaction, java.lang.String note) throws RecordLockedException
IDataTransaction.commit() is called.
transaction - the transaction to register this modificationnote - the note to append to the modification history
RecordLockedException - if the record is currently locked by another user
java.lang.String getBinaryReference(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
java.lang.NoSuchFieldException
java.lang.ClassCastException
java.lang.String getLongTextReference(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
java.lang.NoSuchFieldException
java.lang.ClassCastException
java.lang.String getDocumentReference(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
java.lang.NoSuchFieldException
java.lang.ClassCastExceptionjava.lang.Object getOldValue(int fieldIndex)
IDataRecord.getValue(int).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldIndex - the field index of the value
null
java.lang.Object getOldValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException
IDataRecord.getValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the field name of the value
null
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.String getOldStringValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException
getOldStringValue(int) except
that the field value is specified by name.
fieldName - the field name of the value
null
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.String getOldStringValue(java.lang.String fieldName,
java.util.Locale locale)
throws java.lang.NoSuchFieldException
getOldStringValue(int)
except that the field value is specified by name and the given locale is
consider. For further information concerning locale handling see
IDataRecord.getStringValue(String, Locale).
fieldName - the name of the fieldlocale - the locale to consider or null to use default
locale of the respective application
null if the value does
not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.String getOldStringValue(java.lang.String fieldName,
java.util.Locale locale,
int style)
throws java.lang.NoSuchFieldException
getOldStringValue(int)
except that the field value is specified by name and the given locale is
consider. For further information concerning locale handling see
IDataRecord.getStringValue(String, Locale).
fieldName - the name of the fieldlocale - the locale to consider or null to use default
locale of the respective applicationstyle - the style to use
null if the value does
not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.String getOldSaveStringValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException
getOldStringValue(String) except that an
empty string is returned in case the value is null.
For new records the value returned is always an empty string!
fieldName - the name of the field
java.lang.NoSuchFieldException - if no such field name exists for this recordjava.lang.String getOldStringValue(int fieldIndex)
getOldValue(int) except
that the field value is returned as default string representation.
fieldIndex - the field index of the value
null
boolean getOldbooleanValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
boolean value, i.e.
the value returned reflects the value within the persistent data store. If
the record has not been manipulated within the current transaction or no
current transaction exists, this method would return the same value than
IDataRecord.getbooleanValue(String).
For new records the old value is always false!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
boolean value or false
if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested java
type. For valid conversions see IDataRecord.
java.lang.Boolean getOldBooleanValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Boolean format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getBooleanValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Boolean format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
int getOldintValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
int value, i.e.
the value returned reflects the value within the persistent data store. If
the record has not been manipulated within the current transaction or no
current transaction exists, this method would return the same value than
IDataRecord.getintValue(String).
For new records the old value is always 0!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
int value or 0
if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested java
type. For valid conversions see IDataRecord.
java.lang.Integer getOldIntegerValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Integer format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getIntegerValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Integer format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
long getOldlongValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
long value, i.e.
the value returned reflects the value within the persistent data store. If
the record has not been manipulated within the current transaction or no
current transaction exists, this method would return the same value than
IDataRecord.getlongValue(String).
For new records the old value is always 0!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
long value or 0
if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested java
type. For valid conversions see IDataRecord.
java.lang.Long getOldLongValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Long format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getLongValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Long format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
float getOldfloatValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
float value, i.e.
the value returned reflects the value within the persistent data store. If
the record has not been manipulated within the current transaction or no
current transaction exists, this method would return the same value than
IDataRecord.getfloatValue(String).
For new records the old value is always 0.0!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
float value or 0.0
if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested java
type. For valid conversions see IDataRecord.
java.lang.Float getOldFloatValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Float format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getFloatValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Float format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
double getOlddoubleValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
double value, i.e.
the value returned reflects the value within the persistent data store. If
the record has not been manipulated within the current transaction or no
current transaction exists, this method would return the same value than
IDataRecord.getdoubleValue(String).
For new records the old value is always 0.0!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
double value or 0.0
if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested java
type. For valid conversions see IDataRecord.
java.lang.Double getOldDoubleValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Double format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getDoubleValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Double format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
java.math.BigDecimal getOldDecimalValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
BigDecimal format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getDecimalValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
BigDecimal format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
java.math.BigDecimal getOldSaveDecimalValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
getOldDecimalValue(String) except that
0.0 is returned in case the value is null.
For new records the value returned is always 0.0!
fieldName - the name of the field
BigDecimal format or
0.0 if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
java.sql.Time getOldTimeValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Time format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getTimeValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Time format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
java.sql.Date getOldDateValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Date format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getDateValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Date format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
java.sql.Timestamp getOldTimestampValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
Timestamp format,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getTimestampValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
Timestamp format or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.
byte[] getOldBytesValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException,
java.lang.ClassCastException
byte[] array,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getBytesValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
byte[] array or
null if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested format.
For valid conversions see IDataRecord.DataDocumentValue getOldDocumentValue(java.lang.String fieldName) throws java.lang.NoSuchFieldException, java.lang.ClassCastException
DataDocumentValue,
i.e. the value returned reflects the value within the persistent data
store. If the record has not been manipulated within the current
transaction or no current transaction exists, this method would return the
same value than IDataRecord.getDocumentValue(String).
For new records the old value is always null!
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldName - the name of the field
DataDocumentValue or null
if the value does not exist.
java.lang.NoSuchFieldException - if no such field name exists for this record
java.lang.ClassCastException - if the field value can not be converted to the requested java type.
For valid conversions see IDataRecord.boolean hasChangedValues()
false is returned in any case. null.
Note: If a field value has been changed from null to a
"regular" value, true is returned.
true if any field value has been changed, otherwise
falseboolean hasChangedValue(int fieldIndex)
false is returned in any case. null.
Note: If the field value has been changed from null to a
"regular" value, true is returned.
Note: This method is especially useful in hooks on data layer to invoke additional actions on value changes.
fieldIndex - the field index of the value
true if the field value has been changed, otherwise
false
boolean hasChangedValue(java.lang.String fieldName)
throws java.lang.NoSuchFieldException
hasChangedValue(int)except
that the field value is specified by name.
fieldName - the field name of the value
true if the field value has been changed, otherwise
false
java.lang.NoSuchFieldException - if no such field name exists for this recordboolean isNormal()
true if the record is in normal mode otherwise
falseboolean isNew()
DataTableRecordEventHandler.afterCommitAction(IDataTableRecord)
has just been committed.
true if the record is new otherwise falseboolean isUpdated()
DataTableRecordEventHandler.afterCommitAction(IDataTableRecord)
has just been updated.
true if the record is updated otherwise falseboolean isDeleted()
true if the record is deleted otherwise falseIDataKeyValue getKeyValue(IKey key)
key - the key to get the value from
null, if the key is emptyIDataKeyValue getKeyValue(java.lang.String keyName)
keyName - the name of the key to get the value from
null, if the key is emptyIDataTableRecord getLinkedRecord(java.lang.String tableAliasName) throws RecordNotFoundException
Attention: There must be a 1:N relation between the given table alias and the table alias of this record, i.e. the given table alias must be the alias on the 1-side of the relation.
Note: Do not use getLinkedRecord("myalias")==null to check
whether a record exists, since this might be (if the record is not already
cached) much more expensive than calling
hasLinkedRecord(String)!
tableAliasName - the name of the table alias of the linked record
null, if this record is not
linked to a record of the given table alias
RecordNotFoundException - if the linked record could not be retrieved from the datasource,
i.e. has already been deletedIDataTableRecord getLinkedRecord(ITableAlias tableAlias) throws RecordNotFoundException
Attention: There must be a 1:N relation between the given table alias and the table alias of this record, i.e. the given table alias must be the alias on the 1-side of the relation.
Note: Do not use getLinkedRecord(myalias)==null to check
whether a record exists, since this might be (if the record is not already
cached) much more expensive than calling
hasLinkedRecord(ITableAlias)!
tableAlias - the table alias of the linked record
null, if this record is not
linked to a record of the given table alias
RecordNotFoundException - if the linked record could not be retrieved from the datasource,
i.e. has already been deletedboolean hasLinkedRecord(java.lang.String tableAliasName)
Attention: There must be a 1:N relation between the given table alias and the table alias of this record, i.e. the given table alias must be the alias on the 1-side of the relation.
tableAliasName - the name of the table alias of the linked record
true if a linked record exists, otherwise falseboolean hasLinkedRecord(ITableAlias tableAlias)
Attention: There must be a 1:N relation between the given table alias and the table alias of this record, i.e. the given table alias must be the alias on the 1-side of the relation.
tableAlias - the table alias of the linked record
true if a linked record exists, otherwise falsevoid resetLinkedRecord(IDataTransaction transaction, java.lang.String tableAliasName) throws RecordLockedException
If this record is the selected table record, i.e.
this == this.getTable().getSelectedRecord(),
the respective data table specified by tableAliasName will be cleared.
Note that this modification is not executed on the respective data source
until IDataTransaction.commit() is called.
Attention: There must be a 1:N relation between the given table alias and the table alias of this record, i.e. the given table alias must be the alias on the 1-side of the relation.
transaction - the transaction to register this modificationtableAliasName - the name of the table alias of the linked record
RecordLockedException - if the record is currently locked by another usersetLinkedRecord(IDataTransaction, IDataRecord)void resetLinkedRecord(IDataTransaction transaction, ITableAlias tableAlias) throws RecordLockedException
If this record is the selected table record, i.e.
this == this.getTable().getSelectedRecord(),
the respective data table specified by tableAlias will be cleared.
Note that this modification is not executed on the respective data source
until IDataTransaction.commit() is called.
Attention: There must be a 1:N relation between the given table alias and the table alias of this record, i.e. the given table alias must be the alias on the 1-side of the relation.
transaction - the transaction to register this modificationtableAlias - the table alias of the linked record
RecordLockedException - if the record is currently locked by another usersetLinkedRecord(IDataTransaction, IDataRecord)void setLinkedRecord(IDataTransaction transaction, IDataRecord fromRecord) throws RecordLockedException, RecordNotFoundException
If this record is the selected table record, i.e.
this == this.getTable().getSelectedRecord(),
fromRecord will be backfilled and become the selected record
of the respective data table, i.e.
fromRecord.getPrimaryKeyValue().equals(fromTable.getSelectedRecord().getPrimaryKeyValue()).
Note that this modification is not executed on the respective data source
until IDataTransaction.commit()is called.
Attention: There must be a 1:N relation between the alias of the given record and the table alias of this record, i.e. the alias of the given record must be the alias on the 1-side of the relation.
transaction - the transaction to register this modificationfromRecord - the record to link with this record
RecordLockedException - if the record is currently locked by another user
RecordNotFoundException - if the fromRecord could not be backfilled from
data source.resetLinkedRecord(IDataTransaction, ITableAlias),
resetLinkedRecord(IDataTransaction, String)void delete(IDataTransaction transaction) throws RecordLockedException
Note that the record is not deleted from the data source until
IDataTransaction.commit() is called.
transaction - the transaction to register this modification
RecordLockedException - if the record is currently locked by another userITableField getFieldDefinition(java.lang.String fieldName) throws java.lang.NoSuchFieldException
fieldName - the field name
java.lang.NoSuchFieldException - if no such field name exists for this recordIDataTransaction getCurrentTransaction()
null, if
no current active transaction exists, e.g. the record has already
been commited.
|
jACOB 2.7 API Documentation. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||