Package com.ebasetech.ufs.mapping
Interface TableCell
public interface TableCell
This is a single cell within a table row.
It represents a single value which may be any java object.
TableCells may only be created by using the addCell method on a TableRow object.
TableCells may only be created by using the addCell method on a TableRow object.
-
Method Summary
Modifier and Type Method Description java.lang.String
getCurrentStringValue()
Returns a string value for the current objectjava.lang.Object
getCurrentValue()
Deprecated.This method has been deprecated because it returns the internal Ebase class SystemValue.java.lang.Object
getCurrentValue2()
Returns the current value of the cell.java.lang.String
getOriginalStringValue()
Returns a string value for the "original" objectjava.lang.Object
getOriginalValue()
Deprecated.This method has been deprecated because it returns the internal Ebase class SystemValue.java.lang.Object
getOriginalValue2()
Returns the original value of the cell.java.lang.String
getSourceFieldId()
Returns the source field identifier for which this cell holds the value for a specific row in the table.void
setOriginalValue(java.lang.Object value)
Sets/Resets the original value of this cell.void
setValue(java.lang.Object value)
Sets the current value of this cell.boolean
valueHasChanged()
Checks if the current value and the original value are different.
-
Method Details
-
getSourceFieldId
java.lang.String getSourceFieldId()Returns the source field identifier for which this cell holds the value for a specific row in the table. The sourceFieldId corresponds to a table column. -
getCurrentValue
java.lang.Object getCurrentValue()Deprecated.This method has been deprecated because it returns the internal Ebase class SystemValue. The javadoc for this method is incorrect. This method is now unsupported and may be removed in a future release. Please use getCurrentValue2 instead.Returns the current value of the cell. In the case of an update, this will be the new value. To obtain the old value of the cell, use getOriginalValue().- Returns:
- The return type will be one of the standard UFS data types namely: String, BigDecimal, BigInteger, Boolean, Date (ie. String in format dd/mm/yyyy). The type returned will depend on the mapping specified when the custom resource was defined in UFS.
-
getCurrentValue2
java.lang.Object getCurrentValue2()Returns the current value of the cell. To obtain the old value of the cell, use getOriginalValue2(). The object type returned depends on the type of the form field mapped to the specified resource field as follows: field type CHAR returns a String, field type BOOLEAN returns a Boolean, field type DATE returns a Long value suitable for constructing a java.util.Date (time element is set to midnight), field type INTEGER returns a BigInteger, field type NUMBER or CURRENCY returns a BigDecimal, field type TIME returns a Long value suitable for constructing a java.util.Date (date element set to January 1, 1970), field type DATETIME returns a Long value representing milliseconds since the epoch, January 1, 1970, suitable for constructing a java.util.Date.- Returns:
- The return type will be one of the standard UFS data types.
- See Also:
ResourceRequestInterface.getFieldValue2(String)
-
getOriginalValue
java.lang.Object getOriginalValue()Deprecated.This method has been deprecated because it returns the internal Ebase class SystemValue. The javadoc for this method is incorrect. This method is now unsupported and may be removed in a future release. Please use getOriginalValue2 instead.Returns the original value of the cell. In the case of an update, this will be the old value. To obtain the new value of the cell, use getCurrentValue().- Returns:
- The return type will be one of the standard UFS data types namely: String, BigDecimal, BigInteger, Boolean, Date (ie. String in format dd/mm/yyyy). The type returned will depend on the mapping specified when the custom resource was defined in UFS.
-
getOriginalValue2
java.lang.Object getOriginalValue2()Returns the original value of the cell. To obtain the current value of the cell, use getCurrentValue2(). The object type returned depends on the type of the form field mapped to the specified resource field as follows : field type CHAR returns a String field type BOOLEAN returns a Boolean, field type DATE returns a Long value suitable for constructing a java.util.Date (time element is set to midnight) field type INTEGER returns a BigInteger field type NUMBER or CURRENCY returns a BigDecimal field type TIME returns a Long value suitable for constructing a java.util.Date (date element set to January 1, 1970) field type DATETIME returns a Long value representing milliseconds since the epoch, January 1, 1970, suitable for constructing a java.util.Date.- Returns:
- The return type will be one of the standard UFS data types.
- See Also:
ResourceRequestInterface.getFieldValue2(String)
-
setValue
void setValue(java.lang.Object value) throws com.ebasetech.ufs.kernel.FormValueConversionExceptionSets the current value of this cell.- Parameters:
value
- may be any of the types accepted by UFS. This will be mapped to one of the standard UFS types and will be returned as such in subsequent updates.- Throws:
com.ebasetech.ufs.kernel.FormValueConversionException
-
setOriginalValue
void setOriginalValue(java.lang.Object value) throws com.ebasetech.ufs.kernel.FormValueConversionExceptionSets/Resets the original value of this cell. The original value is set automatically when a fetchtable is issued. Can be used to hold a value for comparison with an updated value.- Parameters:
value
- may be any of the types accepted by UFS. This will be mapped to one of the standard UFS types and will be returned as such in subsequent updates.- Throws:
com.ebasetech.ufs.kernel.FormValueConversionException
-
getCurrentStringValue
java.lang.String getCurrentStringValue()Returns a string value for the current object -
valueHasChanged
boolean valueHasChanged()Checks if the current value and the original value are different.- Returns:
- true if the value has changed
-
getOriginalStringValue
java.lang.String getOriginalStringValue()Returns a string value for the "original" object
-