com.objex.panywhere.data
Class TableData.Row

java.lang.Object
  extended by com.objex.panywhere.data.TableData.Row
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
TableData

public static class TableData.Row
extends java.lang.Object
implements java.io.Serializable

A row representing the data for an actual row in the user's database. Each Row will have a list of Data items one for each column or subfield in the database table.

See Also:
Serialized Form

Constructor Summary
TableData.Row()
           
 
Method Summary
 void addData(int ai_subfieldid, Data a_sub_data)
          Add a new data item for a column or subfield.
 java.util.Map<java.lang.Integer,Data> getColumns()
           
 Data getData(int ai_subfieldid)
           
 int getRrn()
           
 boolean isDeleted()
           
 boolean isDirty()
           
 boolean isNewrec()
           
 void setColumns(java.util.Map<java.lang.Integer,Data> a_columns)
          Set a new map of data items representing subfields or database columns for the Row.
 void setDeleted(boolean rhs)
          Set this flag to TRUE if the row was deleted from the UI table and may need to be deleted from the database too.
 void setDirty(boolean aDirty)
          Set the to TRUE if the any data in this Row was modified by the client to make it different from the value that was loaded from the database.
 void setNewrec(boolean aNewrec)
          Set the new value to TRUE if this Row was created by the client and is there non existent in the database from which the data was loaded.
 void setRrn(int id)
          Set the new unique ID or row number for the Row object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableData.Row

public TableData.Row()
Method Detail

getRrn

public int getRrn()
Returns:
The unique ID or row number for the Row object.

setRrn

public void setRrn(int id)
Set the new unique ID or row number for the Row object.

Parameters:
id - The new unique ID or row number for the Row object.

isDirty

public boolean isDirty()
Returns:
TRUE if the any data in this Row was modified by the client to make it different from the value that was loaded from the database.

setDirty

public void setDirty(boolean aDirty)
Set the to TRUE if the any data in this Row was modified by the client to make it different from the value that was loaded from the database.

Parameters:
aDirty - New value. TRUE if the any data in this Row was modified by the client to make it different from the value that was loaded from the database.

isNewrec

public boolean isNewrec()
Returns:
TRUE if this Row was created by the client and is there non existent in the database from which the data was loaded.

setNewrec

public void setNewrec(boolean aNewrec)
Set the new value to TRUE if this Row was created by the client and is there non existent in the database from which the data was loaded.

Parameters:
aNewrec - The new value for newrec property

addData

public void addData(int ai_subfieldid,
                    Data a_sub_data)
Add a new data item for a column or subfield.

Parameters:
ai_subfieldid - The subfieldid for the datbase column for which data item is being added.
a_sub_data - The data item being added to this Row.

getData

public Data getData(int ai_subfieldid)
Parameters:
ai_subfieldid -
Returns:
The data item linked to the specified subfieldid. Nul may be returned if the Row does not contain a data item with the specified fieldid.

getColumns

public java.util.Map<java.lang.Integer,Data> getColumns()
Returns:
A map of data items representing subfields or database columns for the Row. The map key is the subfieldid

setColumns

public void setColumns(java.util.Map<java.lang.Integer,Data> a_columns)
Set a new map of data items representing subfields or database columns for the Row.

Parameters:
a_columns - The new map of data items representing subfields or database columns for the Row. The map key is the subfieldid

isDeleted

public boolean isDeleted()
Returns:
TRUE if the row was deleted from the UI table and may need to be deleted from the database too.

setDeleted

public void setDeleted(boolean rhs)
Set this flag to TRUE if the row was deleted from the UI table and may need to be deleted from the database too. Actuall deletion from the database table will be done when the users has saves the IDS to which this columns belongs.