Understanding Sun Master Index Processing (Repository)

Master Index Child Object Classes (Repository)

One Java class is created for each child object defined in the object definition of the master index application. If the object definition contains three child objects, three child object classes are created. The methods in these classes provide the ability to create the child objects and to set or retrieve the field values for those objects.

The name of each child object class is the same as the name of the child object, with the word “Object” appended. For example, if a child object in your object structure is named “Address”, the name of the corresponding child class is AddressObject. The methods in these classes include a constructor method for the child object, and get and set methods for each field defined for the child object. Most methods are named based on the name of the child object and the fields defined for that object. In the methods listed below, Child indicates the name of the child object and Field indicates the name of each field defined for that object.

Definition


class ChildObject

Methods

 

ChildObject

Description

This method represents the child object class. This class can be instantiated to create a new instance of a child object class.

Syntax


new ChildObject()

Parameters

None.

Returns

An instance of the child object.

Throws

ObjectException

copy

Description

This method copies the structure and field values of the specified object node.

Syntax


ObjectNode copy()

Parameters

None.

Returns

A copy of the object node.

Throws

ObjectException

getChildId

Description

This method retrieves the unique identification code (primary key) of the object, as assigned by the master index application.

Syntax


String getChildId()

Parameters

None.

Returns

A string containing the unique ID of the child object.

Throws

ObjectException

getField

Description

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 child object. For example, if the child object contains a field named “TelephoneNumber”, the getter method for this field is named getTelephoneNumber. A getter method is created for each field in the object, including fields that store standardized or phonetic data.

Syntax


String getField()

Note –

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

Parameters

None.

Returns

The value of the specified field. The type of data returned depends on the data type defined in the object definition.

Throws

ObjectException

getMetaData

Description

This method retrieves the metadata for the child object.

Syntax


AttributeMetaData getMetaData()

Parameters

None.

Returns

An AttributeMetaData object containing the child object’s metadata.

Throws

None.

getParentTag

Description

This method retrieves the name of the parent object of the child object.

Syntax


String getParentTag()

Parameters

None.

Returns

A string containing the name of the parent object.

Throws

None.

setChildId

Description

This method sets the value of the ChildId field in the child object.

Syntax


void setChildId(Object value)

Parameters

Name 

Type 

Description 

value 

Object 

An object containing the value of the ChildId field.

Returns

None.

Throws

ObjectException

setField

Description

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 “CompanyName”, the setter method for this field is named setCompanyName.

Syntax


void setField(Object value)

Parameters

Name 

Type 

Description 

value 

Object 

An object containing the value of the field specified by the method name. 

Returns

None.

Throws

ObjectException

structCopy

Description

This method copies the structure of the specified object node.

Syntax


ObjectNode structCopy()

Parameters

None.

Returns

A copy of the structure of the object node.

Throws

ObjectException