A Java class is created to represent the parent object defined in the object definition of the master index application. The methods in this class provide the ability to create a parent object and to set or retrieve the field values for that object.
The name of the parent object class is the same as the name of each parent object, with the word “Object” appended. For example, if the parent object in your object structure is “Person”, the name of the parent class is “PersonObject”. The methods in this class include a constructor method for the parent object, and get and set methods for each field defined for the parent object. Most methods are named based on the name of the parent object and the fields and child objects defined for that object. In the following methods described for the parent object, ObjectName indicates the name of the parent object, Child indicates the name of a child object, and Field indicates the name of a field defined for the parent object.
class ObjectNameObject |
This is the user-defined object name class for the parent object. You can instantiate this class to create a new instance of the parent object class.
new ObjectNameObject()
None.
An instance of the parent object.
ObjectException
This method associates a new child object with the parent object. The new child object is of the type specified in the method name. For example, to associate a new address object with a parent object, call addAddress.
void addChild(ChildObject child)
The type of object passed as a parameter depends on the child object to associate with the parent object. For example, the syntax for associating an address object is as follows:
void addAddress(AddressObject address) |
Name |
Type |
Description |
---|---|---|
child |
ChildObject |
A child object to associate with the parent object. The name and type of the parameter is specified by the child object name. |
None.
ObjectException
This method associates a new child object with the parent object. The object node passed as the parameter defines the child object type.
void addSecondaryObject(ObjectNode obj) |
Name |
Type |
Description |
---|---|---|
obj |
ObjectNode |
An ObjectNode representing the child object to associate with the parent object. |
None.
SystemObjectException
This method copies the structure and field values of the specified object node.
ObjectNode copy() |
None.
A copy of the object node.
ObjectException
This method removes a child object associated with the parent object (in the memory copy of the object). The object node passed in as the parameter defines the child object type. Use this method to remove a child object before it has been committed to the database. This method is similar to ObjectNode.removeChild. Use ObjectNode.deleteChild to remove the child object permanently from the database.
void dropSecondaryObject(ObjectNode obj) |
Name |
Type |
Description |
---|---|---|
obj |
ObjectNode |
An ObjectNode representing the child object to drop from the parent object. |
None.
SystemObjectException
This method retrieves the unique identification code (primary key) of the object, as assigned by the master index application.
String getObjectNameId() |
None.
A string containing the unique ID of the parent object.
ObjectException
This method retrieves all child objects associated with the parent object that are of the type specified in the method name. For example, to retrieve all address objects associated with a parent object, call getAddress.
Collection getChild() |
None.
A collection of child objects of the type specified in the method name.
None.
This method retrieves the value of the field specified in the method name. Each getter method is named according to the fields defined for the parent object. For example, if the parent object contains a field named FirstName, the getter method for this field is named getFirstName.
String getField() |
The syntax for the getter methods depends on the type of data specified for the field in the object structure. For example, the getter method for a date field would have the following syntax:
Date getField |
None.
The value of the specified field. The type of data returned depends on the data type defined in the object definition.
ObjectException
This method retrieves a list of the names of all child object types defined for the object structure.
ArrayList getChildTags() |
None.
An array of child object names.
None.
This method retrieves the metadata for the parent object.
AttributeMetaData getMetaData() |
None.
An AttributeMetaData object containing the parent object’s metadata.
None.
This method retrieves all child objects that are associated with the parent object and are of the specified type.
Collection getSecondaryObject(String type) |
Name |
Type |
Description |
---|---|---|
type |
String |
The child type of the objects to retrieve. |
A collection of child objects of the specified type.
SystemObjectException
This method retrieves the value of the “add flag” for the parent object. The add flag indicates whether the object will be added.
String isAdded() |
None.
A Boolean value indicating whether the add flag is set to true or false.
ObjectException
This method retrieves the value of the “remove flag” for the parent object. The remove flag indicates whether the object will be removed.
String isRemoved() |
None.
A Boolean value indicating whether the remove flag is set to true or false.
ObjectException
This method retrieves the value of the “update flag” for the parent object. The update flag indicates whether the object will be updated.
String isUpdated() |
None.
A Boolean value indicating whether the update flag is set to true or false.
ObjectException
This method sets the value of the ObjectNameId field in the parent object.
void setObjectNameId(Object value) |
Name |
Type |
Description |
---|---|---|
value |
Object |
An object containing the value of the ObjectNameId field. |
None.
ObjectException
This method sets the value of the field specified in the method name. Each setter method is named according to the fields defined for the parent object. For example, if the parent object contains a field named “DateOfBirth”, the setter method for this field is named setDateOfBirth. A setter method is created for each field in the parent object, including any fields containing standardized or phonetic data.
void setField(Object value) |
Name |
Type |
Description |
---|---|---|
value |
Object |
An object containing the value of the field specified by the method name. |
None.
ObjectException
This method sets the “add flag” of the parent object. The add flag indicates whether the object will be added.
void setAddFlag(boolean flag) |
Name |
Type |
Description |
---|---|---|
flag |
Boolean |
An indicator of whether the add flag is set to true or false. |
None.
None.
This method sets the “remove flag” of the parent object. The remove flag indicates whether the object will be removed.
void setRemoveFlag(boolean e) |
Name |
Type |
Description |
---|---|---|
e |
Boolean |
An indicator of whether the remove flag is set to true or false. |
None.
None.
This method sets the “update flag” of the parent object. The update flag indicates whether the object will be updated.
void setUpdateFlag(boolean flag) |
Name |
Type |
Description |
---|---|---|
flag |
Boolean |
An indicator of whether the update flag is set to true or false. |
None.
None.
This method copies the structure of the specified object node.
ObjectNode structCopy() |
None.
A copy of the structure of the object node.
ObjectException