jACOB 2.7 API Documentation.

de.tif.jacob.core.data
Interface IDataTableRecord

All Superinterfaces:
IDataRecord

public interface IDataTableRecord
extends IDataRecord

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    

A bold X indicates the default java type for a given jACOB field type. The default java type is returned when calling the generic 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.
     
    Methods inherited from interface de.tif.jacob.core.data.IDataRecord
    getAccessor, getbooleanValue, getBooleanValue, getbooleanValue, getBooleanValue, getBytesValue, getBytesValue, getDateValue, getDateValue, getDecimalValue, getDecimalValue, getDocumentValue, getDocumentValue, getdoubleValue, getDoubleValue, getdoubleValue, getDoubleValue, getFieldNumber, getfloatValue, getFloatValue, getfloatValue, getFloatValue, getId, getIntegerValue, getIntegerValue, getintValue, getintValue, getlongValue, getLongValue, getlongValue, getLongValue, getPrimaryKeyValue, getSaveDecimalValue, getSaveDecimalValue, getSaveStringValue, getSaveStringValue, getSaveStringValue, getSaveStringValue, getSaveStringValue, getSaveStringValue, getStringValue, getStringValue, getStringValue, getStringValue, getStringValue, getStringValue, getTableAlias, getTimestampValue, getTimestampValue, getTimeValue, getTimeValue, getValue, getValue, hasNullValue
     

    Method Detail

    getTable

    IDataTable getTable()
    Returns the parent data table.

    Returns:
    the parent data table

    getValue

    java.lang.Object getValue(ITableField field)
    Returns the field value specified by the given table field instance.

    The java type (class) of the field value returned is determined by the field type. Please see IDataRecord!

    Parameters:
    field - the table field to get the value for
    Returns:
    The field value or null

    hasNullValue

    boolean hasNullValue(java.lang.String fieldName)
                         throws java.lang.NoSuchFieldException
    Checks whether the field value specified by its name is null, i.e. the field value has not been set.

    Note: This method is equivalent to null == IDataRecord.getValue(String), 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    true if the field value is null, otherwise false
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    setStringValue

    boolean setStringValue(IDataTransaction transaction,
                           java.lang.String fieldName,
                           java.lang.String value)
                           throws java.lang.NoSuchFieldException,
                                  InvalidExpressionException,
                                  RecordLockedException,
                                  java.lang.IllegalArgumentException
    Sets the value of a record field to the given String (expression). The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setStringValue

    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
    Sets the value of a record field to the given String (expression). If necessary, the String will be parsed by means of considering the given locale.

    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.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    locale - the locale to consider or null to use default locale of the respective application
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setStringValueWithTruncation

    boolean setStringValueWithTruncation(IDataTransaction transaction,
                                         java.lang.String fieldName,
                                         java.lang.String value)
                                         throws java.lang.NoSuchFieldException,
                                                InvalidExpressionException,
                                                RecordLockedException,
                                                java.lang.IllegalArgumentException
    Sets the value of a record field to the given String (expression). The value is not saved to the data source until 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.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setStringValueWithTruncation

    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
    Sets the value of a record field to the given String (expression). The value is not saved to the data source until 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.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    locale - the locale to consider or null to use default locale of the respective application
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setDateValue

    boolean setDateValue(IDataTransaction transaction,
                         java.lang.String fieldName,
                         java.util.Date value)
                         throws java.lang.NoSuchFieldException,
                                RecordLockedException,
                                java.lang.IllegalArgumentException
    Sets the value of a date or timestamp record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setDateValue

    boolean setDateValue(IDataTransaction transaction,
                         java.lang.String fieldName,
                         long timeMillis)
                         throws java.lang.NoSuchFieldException,
                                RecordLockedException,
                                java.lang.IllegalArgumentException
    Sets the value of a date or timestamp record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    timeMillis - 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.
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setDecimalValue

    boolean setDecimalValue(IDataTransaction transaction,
                            java.lang.String fieldName,
                            java.math.BigDecimal value)
                            throws java.lang.NoSuchFieldException,
                                   RecordLockedException,
                                   java.lang.IllegalArgumentException
    Sets the value of a decimal record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setDoubleValue

    boolean setDoubleValue(IDataTransaction transaction,
                           java.lang.String fieldName,
                           double value)
                           throws java.lang.NoSuchFieldException,
                                  RecordLockedException,
                                  java.lang.IllegalArgumentException
    Sets the value of a record field to the given double value. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setFloatValue

    boolean setFloatValue(IDataTransaction transaction,
                          java.lang.String fieldName,
                          float value)
                          throws java.lang.NoSuchFieldException,
                                 RecordLockedException,
                                 java.lang.IllegalArgumentException
    Sets the value of a record field to the given float value. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setIntValue

    boolean setIntValue(IDataTransaction transaction,
                        java.lang.String fieldName,
                        int value)
                        throws java.lang.NoSuchFieldException,
                               RecordLockedException,
                               java.lang.IllegalArgumentException
    Sets the value of a record field to the given int value. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setBooleanValue

    boolean setBooleanValue(IDataTransaction transaction,
                            java.lang.String fieldName,
                            boolean value)
                            throws java.lang.NoSuchFieldException,
                                   RecordLockedException,
                                   java.lang.IllegalArgumentException
    Sets the value of a record field to the given boolean value. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.
    Since:
    2.6

    setLongValue

    boolean setLongValue(IDataTransaction transaction,
                         java.lang.String fieldName,
                         long value)
                         throws java.lang.NoSuchFieldException,
                                RecordLockedException,
                                java.lang.IllegalArgumentException
    Sets the value of a record field to the given long value. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setTimeValue

    boolean setTimeValue(IDataTransaction transaction,
                         java.lang.String fieldName,
                         java.sql.Time value)
                         throws java.lang.NoSuchFieldException,
                                RecordLockedException,
                                java.lang.IllegalArgumentException
    Sets the value of a time record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setTimestampValue

    boolean setTimestampValue(IDataTransaction transaction,
                              java.lang.String fieldName,
                              java.sql.Timestamp value)
                              throws java.lang.NoSuchFieldException,
                                     RecordLockedException,
                                     java.lang.IllegalArgumentException
    Sets the value of a timestamp record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setTimestampValue

    boolean setTimestampValue(IDataTransaction transaction,
                              java.lang.String fieldName,
                              long timeMillis)
                              throws java.lang.NoSuchFieldException,
                                     RecordLockedException,
                                     java.lang.IllegalArgumentException
    Sets the value of a timestamp record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    timeMillis - 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.
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    appendLongTextValue

    void appendLongTextValue(IDataTransaction transaction,
                             java.lang.String fieldName,
                             java.lang.String value)
                             throws java.lang.NoSuchFieldException,
                                    RecordLockedException,
                                    java.lang.IllegalArgumentException
    Appends the given value to the field value of a long text record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to append
    Throws:
    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 field

    prependLongTextValue

    void prependLongTextValue(IDataTransaction transaction,
                              java.lang.String fieldName,
                              java.lang.String value)
                              throws java.lang.NoSuchFieldException,
                                     RecordLockedException,
                                     java.lang.IllegalArgumentException
    Prepends the given value to the field value of a long text record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to prepend
    Throws:
    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 field

    setBinaryValue

    boolean setBinaryValue(IDataTransaction transaction,
                           java.lang.String fieldName,
                           byte[] value)
                           throws java.lang.NoSuchFieldException,
                                  RecordLockedException
    Sets the value of a binary record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setDocumentValue

    boolean setDocumentValue(IDataTransaction transaction,
                             java.lang.String fieldName,
                             DataDocumentValue documentValue)
                             throws java.lang.NoSuchFieldException,
                                    RecordLockedException,
                                    java.lang.IllegalArgumentException
    Sets the value of a document record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    documentValue - the document value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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 field

    setValue

    boolean setValue(IDataTransaction transaction,
                     ITableField field,
                     java.lang.Object value)
                     throws InvalidExpressionException,
                            RecordLockedException,
                            java.lang.IllegalArgumentException
    Sets the value of a record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    field - the table field to set the value for
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    setValue

    boolean setValue(IDataTransaction transaction,
                     java.lang.String fieldName,
                     java.lang.Object value)
                     throws java.lang.NoSuchFieldException,
                            InvalidExpressionException,
                            RecordLockedException,
                            java.lang.IllegalArgumentException
    Sets the value of a record field. The value is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    fieldName - the name of the field
    value - the field value to set or null to reset the field value
    Returns:
    true if the field value has been effectively changed, otherwise false
    Throws:
    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.

    appendToHistory

    void appendToHistory(IDataTransaction transaction,
                         java.lang.String note)
                         throws RecordLockedException
    Appends the given note to the modification history of this record. The note is not saved to the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    note - the note to append to the modification history
    Throws:
    RecordLockedException - if the record is currently locked by another user

    getBinaryReference

    java.lang.String getBinaryReference(java.lang.String fieldName)
                                        throws java.lang.NoSuchFieldException,
                                               java.lang.ClassCastException
    Throws:
    java.lang.NoSuchFieldException
    java.lang.ClassCastException

    getLongTextReference

    java.lang.String getLongTextReference(java.lang.String fieldName)
                                          throws java.lang.NoSuchFieldException,
                                                 java.lang.ClassCastException
    Throws:
    java.lang.NoSuchFieldException
    java.lang.ClassCastException

    getDocumentReference

    java.lang.String getDocumentReference(java.lang.String fieldName)
                                          throws java.lang.NoSuchFieldException,
                                                 java.lang.ClassCastException
    Throws:
    java.lang.NoSuchFieldException
    java.lang.ClassCastException

    getOldValue

    java.lang.Object getOldValue(int fieldIndex)
    Returns the old field 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.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.

    Parameters:
    fieldIndex - the field index of the value
    Returns:
    The old field value or null

    getOldValue

    java.lang.Object getOldValue(java.lang.String fieldName)
                                 throws java.lang.NoSuchFieldException
    Returns the old field 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.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.

    Parameters:
    fieldName - the field name of the value
    Returns:
    The old field value or null
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    getOldStringValue

    java.lang.String getOldStringValue(java.lang.String fieldName)
                                       throws java.lang.NoSuchFieldException
    This method has the same behaviour as getOldStringValue(int) except that the field value is specified by name.

    Parameters:
    fieldName - the field name of the value
    Returns:
    The old field value as string or null
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    getOldStringValue

    java.lang.String getOldStringValue(java.lang.String fieldName,
                                       java.util.Locale locale)
                                       throws java.lang.NoSuchFieldException
    This method has the same behaviour as 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).

    Parameters:
    fieldName - the name of the field
    locale - the locale to consider or null to use default locale of the respective application
    Returns:
    the old field value as string or null if the value does not exist.
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    getOldStringValue

    java.lang.String getOldStringValue(java.lang.String fieldName,
                                       java.util.Locale locale,
                                       int style)
                                       throws java.lang.NoSuchFieldException
    This method has the same behaviour as 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).

    Parameters:
    fieldName - the name of the field
    locale - the locale to consider or null to use default locale of the respective application
    style - the style to use
    Returns:
    the old field value as string or null if the value does not exist.
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    getOldSaveStringValue

    java.lang.String getOldSaveStringValue(java.lang.String fieldName)
                                           throws java.lang.NoSuchFieldException
    Similar behaviour than 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!

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as string
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    getOldStringValue

    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.

    Parameters:
    fieldIndex - the field index of the value
    Returns:
    The old field value as string or null

    getOldbooleanValue

    boolean getOldbooleanValue(java.lang.String fieldName)
                               throws java.lang.NoSuchFieldException,
                                      java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a boolean value or false if the value does not exist.
    Throws:
    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.
    Since:
    2.6

    getOldBooleanValue

    java.lang.Boolean getOldBooleanValue(java.lang.String fieldName)
                                         throws java.lang.NoSuchFieldException,
                                                java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Boolean format or null if the value does not exist.
    Throws:
    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.
    Since:
    2.6

    getOldintValue

    int getOldintValue(java.lang.String fieldName)
                       throws java.lang.NoSuchFieldException,
                              java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a int value or 0 if the value does not exist.
    Throws:
    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.

    getOldIntegerValue

    java.lang.Integer getOldIntegerValue(java.lang.String fieldName)
                                         throws java.lang.NoSuchFieldException,
                                                java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Integer format or null if the value does not exist.
    Throws:
    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.

    getOldlongValue

    long getOldlongValue(java.lang.String fieldName)
                         throws java.lang.NoSuchFieldException,
                                java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a long value or 0 if the value does not exist.
    Throws:
    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.

    getOldLongValue

    java.lang.Long getOldLongValue(java.lang.String fieldName)
                                   throws java.lang.NoSuchFieldException,
                                          java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Long format or null if the value does not exist.
    Throws:
    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.

    getOldfloatValue

    float getOldfloatValue(java.lang.String fieldName)
                           throws java.lang.NoSuchFieldException,
                                  java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a float value or 0.0 if the value does not exist.
    Throws:
    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.

    getOldFloatValue

    java.lang.Float getOldFloatValue(java.lang.String fieldName)
                                     throws java.lang.NoSuchFieldException,
                                            java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Float format or null if the value does not exist.
    Throws:
    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.

    getOlddoubleValue

    double getOlddoubleValue(java.lang.String fieldName)
                             throws java.lang.NoSuchFieldException,
                                    java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a double value or 0.0 if the value does not exist.
    Throws:
    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.

    getOldDoubleValue

    java.lang.Double getOldDoubleValue(java.lang.String fieldName)
                                       throws java.lang.NoSuchFieldException,
                                              java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Double format or null if the value does not exist.
    Throws:
    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.

    getOldDecimalValue

    java.math.BigDecimal getOldDecimalValue(java.lang.String fieldName)
                                            throws java.lang.NoSuchFieldException,
                                                   java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in BigDecimal format or null if the value does not exist.
    Throws:
    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.

    getOldSaveDecimalValue

    java.math.BigDecimal getOldSaveDecimalValue(java.lang.String fieldName)
                                                throws java.lang.NoSuchFieldException,
                                                       java.lang.ClassCastException
    Similar behaviour than getOldDecimalValue(String) except that 0.0 is returned in case the value is null.

    For new records the value returned is always 0.0!

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in BigDecimal format or 0.0 if the value does not exist.
    Throws:
    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.

    getOldTimeValue

    java.sql.Time getOldTimeValue(java.lang.String fieldName)
                                  throws java.lang.NoSuchFieldException,
                                         java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Time format or null if the value does not exist.
    Throws:
    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.

    getOldDateValue

    java.sql.Date getOldDateValue(java.lang.String fieldName)
                                  throws java.lang.NoSuchFieldException,
                                         java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Date format or null if the value does not exist.
    Throws:
    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.

    getOldTimestampValue

    java.sql.Timestamp getOldTimestampValue(java.lang.String fieldName)
                                            throws java.lang.NoSuchFieldException,
                                                   java.lang.ClassCastException
    Returns the specified old field value in 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value in Timestamp format or null if the value does not exist.
    Throws:
    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.

    getOldBytesValue

    byte[] getOldBytesValue(java.lang.String fieldName)
                            throws java.lang.NoSuchFieldException,
                                   java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a byte[] array or null if the value does not exist.
    Throws:
    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.

    getOldDocumentValue

    DataDocumentValue getOldDocumentValue(java.lang.String fieldName)
                                          throws java.lang.NoSuchFieldException,
                                                 java.lang.ClassCastException
    Returns the specified old field value as a 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.

    Parameters:
    fieldName - the name of the field
    Returns:
    the old field value as a DataDocumentValue or null if the value does not exist.
    Throws:
    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.

    hasChangedValues

    boolean hasChangedValues()
    Checks whether any field value has been effectively changed within the current transaction. If the record has not been manipulated within the current transaction or no current transaction exists, false is returned in any case.
  • New record: An effective change exists, if a field value unequals null.
  • Updated record: An effective change exists, if the field value unequals the value stored in the corresponding datasource. I.e. if a value is first changed from A to B and then back from B to A within the same transaction, no effective change exists!

    Note: If a field value has been changed from null to a "regular" value, true is returned.

    Returns:
    true if any field value has been changed, otherwise false

  • hasChangedValue

    boolean hasChangedValue(int fieldIndex)
    Checks whether the specified field value has been effectively changed within the current transaction. If the record has not been manipulated within the current transaction or no current transaction exists, false is returned in any case.
  • New record: An effective change exists, if the field value unequals null.
  • Updated record: An effective change exists, if the field value unequals the value stored in the corresponding datasource. I.e. if a value is first changed from A to B and then back from B to A within the same transaction, no effective change exists!

    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.

    Parameters:
    fieldIndex - the field index of the value
    Returns:
    true if the field value has been changed, otherwise false

  • hasChangedValue

    boolean hasChangedValue(java.lang.String fieldName)
                            throws java.lang.NoSuchFieldException
    This method has the same behaviour has hasChangedValue(int)except that the field value is specified by name.

    Parameters:
    fieldName - the field name of the value
    Returns:
    true if the field value has been changed, otherwise false
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    isNormal

    boolean isNormal()
    Checks whether the record is in normal mode, i.e. is neither new nor updated nor deleted.

    Returns:
    true if the record is in normal mode otherwise false

    isNew

    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.

    Returns:
    true if the record is new otherwise false

    isUpdated

    boolean isUpdated()
    Checks whether the record is currently updated or if called from DataTableRecordEventHandler.afterCommitAction(IDataTableRecord) has just been updated.

    Returns:
    true if the record is updated otherwise false

    isDeleted

    boolean isDeleted()
    Checks whether the record is going to be deleted (within the current transaction) or already has been deleted.

    Returns:
    true if the record is deleted otherwise false

    getKeyValue

    IDataKeyValue getKeyValue(IKey key)
    Returns the key value of the specified key.

    Parameters:
    key - the key to get the value from
    Returns:
    the key value or null, if the key is empty

    getKeyValue

    IDataKeyValue getKeyValue(java.lang.String keyName)
    Returns the key value of the specified key.

    Parameters:
    keyName - the name of the key to get the value from
    Returns:
    the key value or null, if the key is empty

    getLinkedRecord

    IDataTableRecord getLinkedRecord(java.lang.String tableAliasName)
                                     throws RecordNotFoundException
    Returns the record of the given table alias that is linked to this record.

    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)!

    Parameters:
    tableAliasName - the name of the table alias of the linked record
    Returns:
    the linked record or null, if this record is not linked to a record of the given table alias
    Throws:
    RecordNotFoundException - if the linked record could not be retrieved from the datasource, i.e. has already been deleted

    getLinkedRecord

    IDataTableRecord getLinkedRecord(ITableAlias tableAlias)
                                     throws RecordNotFoundException
    Returns the record of the given table alias that is linked to this record.

    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)!

    Parameters:
    tableAlias - the table alias of the linked record
    Returns:
    the linked record or null, if this record is not linked to a record of the given table alias
    Throws:
    RecordNotFoundException - if the linked record could not be retrieved from the datasource, i.e. has already been deleted

    hasLinkedRecord

    boolean hasLinkedRecord(java.lang.String tableAliasName)
    Checks whether this record is linked to a record of the given table alias.

    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.

    Parameters:
    tableAliasName - the name of the table alias of the linked record
    Returns:
    true if a linked record exists, otherwise false

    hasLinkedRecord

    boolean hasLinkedRecord(ITableAlias tableAlias)
    Checks whether this record is linked to a record of the given table alias.

    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.

    Parameters:
    tableAlias - the table alias of the linked record
    Returns:
    true if a linked record exists, otherwise false

    resetLinkedRecord

    void resetLinkedRecord(IDataTransaction transaction,
                           java.lang.String tableAliasName)
                           throws RecordLockedException
    Unlinks this record from a record of the given table alias, if existing.

    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.

    Parameters:
    transaction - the transaction to register this modification
    tableAliasName - the name of the table alias of the linked record
    Throws:
    RecordLockedException - if the record is currently locked by another user
    See Also:
    setLinkedRecord(IDataTransaction, IDataRecord)

    resetLinkedRecord

    void resetLinkedRecord(IDataTransaction transaction,
                           ITableAlias tableAlias)
                           throws RecordLockedException
    Unlinks this record from a record of the given table alias, if existing.

    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.

    Parameters:
    transaction - the transaction to register this modification
    tableAlias - the table alias of the linked record
    Throws:
    RecordLockedException - if the record is currently locked by another user
    See Also:
    setLinkedRecord(IDataTransaction, IDataRecord)

    setLinkedRecord

    void setLinkedRecord(IDataTransaction transaction,
                         IDataRecord fromRecord)
                         throws RecordLockedException,
                                RecordNotFoundException
    Links this record with the given record.

    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.

    Parameters:
    transaction - the transaction to register this modification
    fromRecord - the record to link with this record
    Throws:
    RecordLockedException - if the record is currently locked by another user
    RecordNotFoundException - if the fromRecord could not be backfilled from data source.
    See Also:
    resetLinkedRecord(IDataTransaction, ITableAlias), resetLinkedRecord(IDataTransaction, String)

    delete

    void delete(IDataTransaction transaction)
                throws RecordLockedException
    Deletes the record from the underlying data source.

    Note that the record is not deleted from the data source until IDataTransaction.commit() is called.

    Parameters:
    transaction - the transaction to register this modification
    Throws:
    RecordLockedException - if the record is currently locked by another user

    getFieldDefinition

    ITableField getFieldDefinition(java.lang.String fieldName)
                                   throws java.lang.NoSuchFieldException
    Returns the definition of the table field given by name.

    Parameters:
    fieldName - the field name
    Returns:
    the table field definition requested
    Throws:
    java.lang.NoSuchFieldException - if no such field name exists for this record

    getCurrentTransaction

    IDataTransaction getCurrentTransaction()
    Return the current active transaction, which has been used to modify this record.

    Returns:
    Returns the current active transaction or null, if no current active transaction exists, e.g. the record has already been commited.

    jACOB 2.7 API Documentation.