|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.objex.panywhere.Data
public class Data
Describes custom data for a person in a pedigree. Each data item added to a person must be linked to a unique field that is defined in the ProgenyAnywhere data dictionary.
The data dictionary is a lightweight local database used to define only those fields in the user's database that were loaded into the control in order to be able to identify the types and character of custom data added to people in the pedigree.
The example below shows how a field in a ProgenyAywhere datadictionary is used to add data to a person.
DatabaseTable table = new DatabaseTable();
table.setTableid(1);
table.setTablename("localdict");
int FIELDID = 1;
DatabaseField field1 = new DatabaseField();
field1.setFieldid(FIELDID);
field1.setFieldname("Field 1");
field1.setDatatype(DataType.TEXT_TYPE);
table.addField(field1);
Pedigree.getDatadictionary().setTable(table);
//Now add data to a person using the database field defined above
Individual ind = Pedigree.getFamily().getIndividual("1");
Data l_data = new Data();
l_data.setFieldid(FIELDID);
l_data.setValue("Field 1 Value");
ind.setData(l_data);
In the example above the type of the data added to the person is of type text. That type is linked (via fieldid) to the DataDictionary database field with the same fieldid as the one
TableData,
Serialized Form| Constructor Summary | |
|---|---|
Data()
Creates a new Data object with default properties |
|
| Method Summary | |
|---|---|
int |
getFieldid()
|
java.lang.String |
getFieldname()
Getter for property fieldname. |
java.lang.Object |
getValue()
|
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 |
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 |
|---|
public Data()
| Method Detail |
|---|
public java.lang.String getFieldname()
public void setFieldname(java.lang.String rhs)
rhs - New value of property fieldname.public int getFieldid()
public void setFieldid(int ai_fieldid)
ai_fieldid - The new fieldid linking this dataitem to the databasepublic java.lang.Object getValue()
public void setValue(java.lang.Object aValue)
aValue - The new value for this data item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||