A Java Bean is created to represent each parent object defined in the object definition of the master index application. The methods in these classes provide the ability to create a parent object Bean and to set or retrieve the field values for that object Bean.
The name of each parent object Bean class is the same as the name of each parent object, with the word “Bean” appended. For example, if a parent object in your object structure is “Person”, the name of the associated parent Bean class is “PersonBean”. The methods in this class include a constructor method for the parent object Bean, 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 methods described in this section, 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.
final class ObjectNameBean |
The following methods are inherited from java.lang.Object.
equals
hashcode
notify
notifyAll
toString
wait()
wait(long arg)
wait(long timeout, int nanos)
This method is the user-defined object Bean class. You can instantiate this class to create a new instance of the parent object Bean class.
new ObjectNameBean() |
None.
An instance of the parent object Bean.
ObjectException
This method returns the total number of child objects contained in a system object. The type of child object is specified by the method name (such as Phone or Address).
int countChild() |
None.
An integer indicating the number of child objects in a collection.
None.
This method returns a count of the total number of child objects belonging to a system object.
int countChildren() |
None.
An integer representing the total number of child objects.
None.
This method returns a count of the total number of child objects of a specific type that belong to a system object.
int countChildren(String type) |
Name |
Type |
Description |
---|---|---|
type |
String |
The type of child object to count, such as Phone or Address. |
An integer representing the total number of child objects of the specified type.
None.
This method removes the specified child object from the system object. The type of child object to remove is specified by the name of the method, and the specific child object to remove is specified by its unique identification code assigned by the master index application.
void deleteChild(String ChildId) |
Name |
Type |
Description |
---|---|---|
ChildId |
String |
The unique identification code of the child object to delete. |
None.
ObjectException
This method retrieves an array of child object Beans. Each getter method is named according to the child objects defined for the parent object. For example, if the parent object contains a child object named “Address”, the getter method for this field is named getAddress. A getter method is created for each child object in the parent object.
ChildBean[] getChild() |
None.
An array of Java Beans containing the type of child objects specified by the method name.
None.
This method retrieves a child object Bean based on its index in a list of child objects. Each getter method is named according to the child objects defined for the parent object. For example, if the parent object contains a child object named “Address”, the getter method for this field is named getAddress. A getter method is created for each child object in the parent object.
ChildBean getChild(int i) |
Name |
Type |
Description |
---|---|---|
i |
int |
The index of the child object to retrieve from a list of child objects. |
A Java Bean containing the child object specified by the index value. The method name indicates the type of child object returned.
ObjectException
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 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 adds a child object to the system object.
void setChild(int index, ChildBean child) |
Name |
Type |
Description |
---|---|---|
index |
integer |
The index number for the new child object. |
child |
ChildBean |
The Java Bean containing the child object to add. |
None.
None.
This method adds an array of child objects of one type to the system object.
void setChild(ChildBean[] children) |
Name |
Type |
Description |
---|---|---|
children |
ChildBean[] |
The array of child objects to add. |
None.
None.
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(value) |
Name |
Type |
Description |
---|---|---|
value |
varies |
The value of the field specified by the method name. The type of value depends on the field being populated. |
None.
ObjectException
This method sets the value of the ObjectNameId field in the parent object.
This ID is set internally by the master index application. Do not set this field manually.
void setObjectNameId(String value) |
Name |
Type |
Description |
---|---|---|
value |
String |
The value of the ObjectNameId field. |
None.
ObjectException