com.objex.panywhere
Class Data

java.lang.Object
  extended by com.objex.panywhere.Data
All Implemented Interfaces:
java.io.Serializable

public class Data
extends java.lang.Object
implements java.io.Serializable

Class describes custom data properties for the Individual object. Data items consist of a fieldid referencing a database field for which this data is a value as well as the field value. To get the details of the database dictionary field, do the following :- DatabaseField = DataDictionary.getField(getFieldid()); Where DataDictionary is a lightweight dictionary used to define only those database fields that were loaded into the control using the XML import facility. If no dictionary was loaded, it is expected that the implemented will provide a way of linking the Data items and the fieldids to thier own database. These Data objects carry custom data that may be required as part of an Individual's properties in a Pedigree, data, that does not conform to the predefined system properties of the Individual class but needs to be specified for the Individual anyway. A Data item on an Individual will be keyed by a unique fieldid (chosen by the implementor of the application in which Progeny Anywhere is used). That fieldid must of necessity reference a unique database field that exists in the application that is wrapping Progeny Anywhere. If the data field relates to a complex and non-static field, the getSubdata() method will return the actual data items (multiple) forthis field.

Since:
Updated in version 2.0
See Also:
Serialized Form

Constructor Summary
Data()
          Creates a new Data object with default properties
 
Method Summary
 void addSubDataItem(Data a_data)
          Add a subdata item to the list of subdata items for this data.
 java.lang.Object getData()
          Deprecated.  
 int getFieldid()
           
 java.lang.String getFieldname()
          Getter for property fieldname.
 java.util.Map getSubdata()
           
 Data getSubDataItem(int ai_fieldid)
          Return the data field with the specified fieldid.
 java.lang.Object getValue()
           
 void setData(java.lang.Object rhs)
          Deprecated.  
 void setFieldid(int ai_fieldid)
          Sets the database fieldid for the field to which this data item relates.
 void setFieldname(java.lang.String rhs)
          Setter for property fieldname.
 void setSubdata(java.util.Map<java.lang.Integer,Data> a_subdata)
          Sets the list of subitems to the values in the parameter a_subdata
 void setValue(java.lang.Object aValue)
          Sets the new value for this data item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Data

public Data()
Creates a new Data object with default properties

Method Detail

getFieldname

public java.lang.String getFieldname()
Getter for property fieldname.

Returns:
Value of property fieldname.

setFieldname

public void setFieldname(java.lang.String rhs)
Setter for property fieldname.

Parameters:
rhs - New value of property fieldname.

getData

public java.lang.Object getData()
Deprecated. 

Getter for property data.

Returns:
Value of property data.

setData

public void setData(java.lang.Object rhs)
Deprecated. 

Setter for property data.

Parameters:
rhs - New value of property data.

getFieldid

public int getFieldid()
Returns:
The database fieldid for the field to which this data item relates

setFieldid

public void setFieldid(int ai_fieldid)
Sets the database fieldid for the field to which this data item relates.

Parameters:
ai_fieldid - The new fieldid linking this dataitem to the database

getValue

public java.lang.Object getValue()
Returns:
The value for this data item

setValue

public void setValue(java.lang.Object aValue)
Sets the new value for this data item

Parameters:
aValue - The new value for this data item

getSubdata

public java.util.Map getSubdata()
Returns:
A hashmap of all subtems for this data item. Null will be returned if this data item has no sub data items.

setSubdata

public void setSubdata(java.util.Map<java.lang.Integer,Data> a_subdata)
Sets the list of subitems to the values in the parameter a_subdata

Parameters:
a_subdata - The new list of subitems for this data item

addSubDataItem

public void addSubDataItem(Data a_data)
Add a subdata item to the list of subdata items for this data. This only applies to complex data fields such as ones that relate to table fields within the database.

Parameters:
a_data - The sub-dataitem to be added to the list of sub data for this data field

getSubDataItem

public Data getSubDataItem(int ai_fieldid)
Return the data field with the specified fieldid. Null will be returned if no subdata item with such a fieldid exists for this Data item.

Parameters:
ai_fieldid - The id of the field that represents this sub-dataitem.