com.objex.progeny.anywhere.fields.data
Class XRFTableData

java.lang.Object
  extended by com.objex.progeny.anywhere.fields.data.XRFTableData
All Implemented Interfaces:
XRFData, java.io.Serializable

public class XRFTableData
extends java.lang.Object
implements XRFData

See Also:
Serialized Form

Nested Class Summary
static class XRFTableData.Row
           
 
Constructor Summary
XRFTableData()
          Creates a new instance of XRFTableData
 
Method Summary
 void addRow(int ai_rrn, XRFTableData.Row aRow)
           
 boolean compareBeginsWith(java.lang.Object o2)
           
 boolean compareContains(java.lang.Object o2)
           
 boolean compareDoesNotBeginWith(java.lang.Object o2)
           
 boolean compareDoesNotContain(java.lang.Object o2)
           
 boolean compareDoesNotEndWith(java.lang.Object o2)
           
 boolean compareEndsWith(java.lang.Object o2)
           
 boolean compareEquals(java.lang.Object o2)
           
 boolean compareGreaterThan(java.lang.Object o2)
           
 boolean compareGreaterThanOrEqual(java.lang.Object o2)
           
 boolean compareIsNotNull()
           
 boolean compareIsNull()
           
 boolean compareLessThan(java.lang.Object o2)
           
 boolean compareLessThanOrEqual(java.lang.Object o2)
           
 boolean compareNotEquals(java.lang.Object o2)
           
 int getColumnCount()
           
 java.lang.Object getDataValue()
           
 java.lang.String getDisplayValue()
          Table data cannot be converted to strings so this will always return an empty string.
 XRFField getField()
           
 java.lang.Object getRawValue()
           
 XRFTableData.Row getRow(int ai_rrn)
           
 int getRowCount()
           
 java.util.Map<java.lang.Integer,XRFTableData.Row> getRows()
           
 java.lang.Object getUpdateValue()
          The value required to update or save the spreadsheet cell to the database
 java.lang.String getUpdateValueString()
          The String representation of the value 's.
 XRFData getValueAt(int row, int fieldid)
           
 boolean isModified()
           
 void setDataValue(java.lang.Object value)
           
 void setField(XRFField aTableField)
          Assigns the Table XRFField to which this XRFTableData relates to aTableField.
 void setModified(boolean modified)
           
 void setRows(java.util.Map<java.lang.Integer,XRFTableData.Row> aRows)
          Set the rows property to the elements of supplied Map.
 void setValueAt(int rrn, int fieldid, XRFData a_sub_data, boolean ab_newrec)
          Sets tha value for row (rrn) and subfield fieldid to new value of "as_value).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XRFTableData

public XRFTableData()
Creates a new instance of XRFTableData

Method Detail

getDataValue

public java.lang.Object getDataValue()
Specified by:
getDataValue in interface XRFData
Returns:
Map)

getRawValue

public java.lang.Object getRawValue()
Specified by:
getRawValue in interface XRFData
Returns:
The value of this data cell in its raw form. This will return a Map of table data of the type Map

getDisplayValue

public java.lang.String getDisplayValue()
Table data cannot be converted to strings so this will always return an empty string. Use @see getRawValue() instead

Specified by:
getDisplayValue in interface XRFData

getUpdateValueString

public java.lang.String getUpdateValueString()
Description copied from interface: XRFData
The String representation of the value 's. Used for updating database

Specified by:
getUpdateValueString in interface XRFData

setDataValue

public void setDataValue(java.lang.Object value)
Specified by:
setDataValue in interface XRFData

getUpdateValue

public java.lang.Object getUpdateValue()
Description copied from interface: XRFData
The value required to update or save the spreadsheet cell to the database

Specified by:
getUpdateValue in interface XRFData
Returns:
The value of this data cell in its raw form. This will return a Map of table data of the type Map

isModified

public boolean isModified()
Specified by:
isModified in interface XRFData
Returns:
TRUE if table data has been modified

setModified

public void setModified(boolean modified)

getValueAt

public XRFData getValueAt(int row,
                          int fieldid)
Returns:
A m_data_map value (in string form) for row (rrn and subfield fieldid). Null maybe returned if no row and/or subfield exists in this XRFTableData

getRowCount

public int getRowCount()
Returns:
A m_data_map value (in string form) for row (rrn and subfield fieldid). Null maybe returned if no row and/or subfield exists in this XRFTableData public String getValueAt(int row, int fieldid) { XRFTableData.Row l_row = this.getRow(row); if (l_row != null) { return l_row.getData(fieldid); } return null; }

getColumnCount

public int getColumnCount()

setValueAt

public void setValueAt(int rrn,
                       int fieldid,
                       XRFData a_sub_data,
                       boolean ab_newrec)
Sets tha value for row (rrn) and subfield fieldid to new value of "as_value). If rows does not exist, a new row will be added.

Parameters:
ab_newrec - Flag for whether or not the record for which this value is being added must be marked as a new record. Records marked as "newrec" will be inserted into the database table while those marked not as "newrec" will be assumed to be there and hence will be UPDATED.

getField

public XRFField getField()
Specified by:
getField in interface XRFData
Returns:
The Table XRFField to which this XRFTableData relates.

setField

public void setField(XRFField aTableField)
Assigns the Table XRFField to which this XRFTableData relates to aTableField.

Specified by:
setField in interface XRFData

getRows

public java.util.Map<java.lang.Integer,XRFTableData.Row> getRows()
Returns:
A hashmp of XRFTableData.Row object keyed by RRN. The map is ordered by RRN. Returned Map will have the following as its Map.Entry

setRows

public void setRows(java.util.Map<java.lang.Integer,XRFTableData.Row> aRows)
Set the rows property to the elements of supplied Map.


addRow

public void addRow(int ai_rrn,
                   XRFTableData.Row aRow)

getRow

public XRFTableData.Row getRow(int ai_rrn)
Returns:
The table row at RRN number ai_rrn. If no row is available for this rrn, NULL is returned

compareEquals

public boolean compareEquals(java.lang.Object o2)
Specified by:
compareEquals in interface XRFData
Returns:
True if the value encapsulated by this objected equals object 02. i.e. if XRFData.getRawValue() equals object 02, whose native type is determined by the subclass.

compareNotEquals

public boolean compareNotEquals(java.lang.Object o2)
Specified by:
compareNotEquals in interface XRFData
Returns:
True if the value encapsulated by this objected not equals object 02. i.e. if XRFData.getRawValue() does not equals object 02, whose native type is determined by the subclass.

compareGreaterThan

public boolean compareGreaterThan(java.lang.Object o2)
Specified by:
compareGreaterThan in interface XRFData
Returns:
True if the value encapsulated by this objected greater than object 02. i.e. if XRFData.getRawValue() greater than object 02, whose native type is determined by the subclass.

compareLessThan

public boolean compareLessThan(java.lang.Object o2)
Specified by:
compareLessThan in interface XRFData
Returns:
True if the value encapsulated by this objected less than object 02. i.e. if XRFData.getRawValue() less than object 02, whose native type is determined by the subclass.

compareGreaterThanOrEqual

public boolean compareGreaterThanOrEqual(java.lang.Object o2)
Specified by:
compareGreaterThanOrEqual in interface XRFData
Returns:
True if the value encapsulated by this objected greater than or equal object 02. i.e. if XRFData.getRawValue() greater than or equal object 02, whose native type is determined by the subclass.

compareLessThanOrEqual

public boolean compareLessThanOrEqual(java.lang.Object o2)
Specified by:
compareLessThanOrEqual in interface XRFData
Returns:
True if the value encapsulated by this objected less than or equal object 02. i.e. if XRFData.getRawValue() less than or equal object 02, whose native type is determined by the subclass.

compareIsNull

public boolean compareIsNull()
Specified by:
compareIsNull in interface XRFData
Returns:
True if the value encapsulated by this objected is NULL or empty. i.e. if XRFData.getRawValue() is NULL.

compareIsNotNull

public boolean compareIsNotNull()
Specified by:
compareIsNotNull in interface XRFData
Returns:
True if the value encapsulated by this objected is NOT NULL i.e. if XRFData.getRawValue() is NOT NULL

compareBeginsWith

public boolean compareBeginsWith(java.lang.Object o2)
Specified by:
compareBeginsWith in interface XRFData
Returns:
True if the value encapsulated by this object begins with the string value of object 02

compareDoesNotBeginWith

public boolean compareDoesNotBeginWith(java.lang.Object o2)
Specified by:
compareDoesNotBeginWith in interface XRFData
Returns:
True if the value encapsulated by this object does not begin with the string value of object 02

compareEndsWith

public boolean compareEndsWith(java.lang.Object o2)
Specified by:
compareEndsWith in interface XRFData
Returns:
True if the value encapsulated by this object ends with the string value of object 02

compareDoesNotEndWith

public boolean compareDoesNotEndWith(java.lang.Object o2)
Specified by:
compareDoesNotEndWith in interface XRFData
Returns:
True if the value encapsulated by this object does not end with the string value of object 02

compareContains

public boolean compareContains(java.lang.Object o2)
Specified by:
compareContains in interface XRFData
Returns:
True if the value encapsulated by this object contains the string value of object 02

compareDoesNotContain

public boolean compareDoesNotContain(java.lang.Object o2)
Specified by:
compareDoesNotContain in interface XRFData
Returns:
True if the value encapsulated by this object does not contain the string value of object 02