Understanding Sun Master Index Processing

Web Services Helper Classes

Helper classes include objects that can be passed as parameters to a primary web services method. They also include the methods that you can access through the systemObjectName variable in Java clients or Business Processes (where ObjectName is the name of a parent object. The helper classes include:

Helper classes are located in the Master Index EJB project in the com.sun.mdm.index.webservice package.

Enterprise Object Classes

A Java class is created to represent the entire object, which includes the single best record (SBR) and any associated system objects. The methods in this class provide the ability to retrieve, set, and delete system objects, and to retrieve and set attributes of the enterprise object.

The name of the enterprise object class is the same as the name of the application, with the word “Enterprise” prepended. For example, if the application name is “Person”, the name of the enterprise object class is “EnterprisePerson”. The methods in this class include a constructor method for the enterprise object, get and set methods for object attributes, and get, set, and delete methods for the system objects. Many methods have dynamic names based on the name of the parent object. In the following methods described for the enterprise object, ObjectName indicates the name of the parent object.

Definition


class ObjectNameObject

Methods

 

EnterpriseObjectName

Description

This is the constructor method for the enterprise object class. You can instantiate this class to create a new instance of the enterprise object.

Syntax

new EnterpriseObjectName()

Parameters

None.

Returns

An instance of the enterprise object.

Throws

None.

countSystemObjectName

Description

This method counts the system objects (class SystemObjectName) in the enterprise object. Use this method to loop through the system objects.

Syntax

int countSystemObjectName()

Parameters

None.

Returns

An integer representing the number of system objects.

Throws

None.

deleteSystemObject

Description

This method marks a system object for deletion from an instance of EnterpriseObjectName. The system object is deleted when the enterprise object is updated.

Syntax


void deleteSystemObject(String system, String lid)

Parameters

Name 

Type 

Description 

system 

String 

The processing code of the system associated with the system record to delete. 

lid 

String 

The local ID of the system record in the specified system. 

Returns

None.

Throws

ObjectException

deleteSystemObjectBean

Description

This method marks a system object for deletion from an instance of EnterpriseObjectName. The system object is deleted when the enterprise object is updated.

Syntax


void deleteSystemObjectBean(String system, String lid)

Parameters

Name 

Type 

Description 

system 

String 

The processing code of the system associated with the system record to delete. 

lid 

String 

The local ID of the system record in the specified system. 

Returns

None.

Throws

ObjectException

getEUID

Description

This method retrieves the EUID from an instance of EnterpriseObjectName.

Syntax


String getEUID()

Parameters

None.

Returns

A string containing the EUID of the enterprise object.

Throws

ObjectException

getSBRObjectName

Description

This method retrieves the SBR from an instance of EnterpriseObjectName.

Syntax


SBRObjectName getSBRObjectName()

Parameters

None.

Returns

The SBR object from the enterprise object.

Throws

None.

getStatus

Description

This method retrieves the status of the enterprise object.

Syntax


String getStatus()

Parameters

None.

Returns

The status of the enterprise object.

Throws

ObjectException

getSystemObjectName

Description

This method retrieves all of the system objects associated with the enterprise object.

Syntax


SystemObjectName[] getSystemObjectName()

Parameters

None.

Returns

A collection of system objects.

Throws

None.

getSystemObjectName

Description

This method retrieves a system object based on its index in a list of system objects.

Syntax


SystemObjectName getSystemObjectName(int index)

Parameters

Name 

Type 

Description 

index 

int 

The index of the system object to retrieve from a list of system objects. 

Returns

The system object at the specified index.

Throws

None.

getSystemObjectNameCount

Description

This method returns the number of system objects in a collection of system objects.

Syntax


int getSystemObjectNameCount()

Parameters

None.

Returns

An integer indicating the number of system objects in an enterprise object.

Throws

None.

removeSystemObject

Description

This method removes a system object from an enterprise object. Use this to remove the system object from the in-memory instance of EnterpriseObjectName. This does NOT result in the deletion of the system object from the database (see deleteSystemObject).

Syntax


void removeSystemObject(String system, String lid)

Parameters

Name 

Type 

Description 

system 

String 

The processing code of the system associated with the system object to remove. 

lid 

String 

The local ID of the system record in the specified system. 

Returns

None.

Throws

ObjectException

removeSystemObjectBean

Description

This method removes a system object from an enterprise object. Use this to remove the system object from the in-memory instance of EnterpriseObjectName. This does NOT result in the deletion of the system object from the database (see deleteSystemObjectBean).

Syntax


void removeSystemObjectBean(String system, String lid)

Parameters

Name 

Type 

Description 

system 

String 

The processing code of the system associated with the system object to remove. 

lid 

String 

The local ID of the system record in the specified system. 

Returns

None.

Throws

ObjectException

setEUID

Description

This method sets the value of the EUID field in an enterprise object.

Syntax


void setEUID(String euid)

Parameters

Name 

Type 

Description 

euid 

String 

The EUID of the enterprise object. 

Returns

None.

Throws

ObjectException

setStatus

Description

This method sets the status of the enterprise object.

Syntax


void setStatus(String status)

Parameters

Name 

Type 

Description 

status 

String 

The status of the enterprise object. 

Returns

None.

Throws

ObjectException.

setSystemObjectName

Description

This method sets a collection of system objects in an enterprise object.

Syntax


void setSystemObjetName(SystemObjectName[] systemObjectName)

Parameters

Name 

Type 

Description 

systemObjectName

SystemObjectName

A collection of system objects for the enterprise object. 

Returns

None.

Throws

ObjectException.

SystemObjectName

In order to run executeMatch or executeMatchUpdatefrom a client application, you must define a variable of the class type SystemObjectName, where ObjectName is the name of a parent object. This class is passed as a parameter to the execute match methods. The class contains a constructor method and several get and set methods for system fields. It also includes one field that specifies the value of the clear field character (for more information, see Clear Field Indicator).

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.

Definition


class SystemObjectName

Methods

 

Inherited Methods

The following methods are inherited from java.lang.Object.

Clear Field Indicator

The clear field indicator allows you to specify whether to treat a field in the parent object as null when performing an update from an external system. When an update is performed in the master index application, empty fields typically do not overwrite the value of an existing field. You can specify to nullify a field that already has an existing value in the master index application by entering an indicator in that field. This indicator is specified by the clear field indicator. By default, the clear field indicator is set to double-quotes (“”), so if a field is set to double-quotes, that field will be blanked out in the master index if the incoming record has a field value of null and the record being updated has a field value other than null. If you do not want to use this feature, set the clear field indicator to null.

SystemObjectName

Description

This method is the user-defined system class for the parent object. You can instantiate this class to create a new instance of the system class.

Syntax


new SystemObjectName()

Parameters

None.

Returns

An instance of the SystemObjectName class.

Throws

ObjectException

getClearFieldIndicator

Description

This method retrieves the value of the clear field indicator.

Syntax


Object getClearFieldIndicator()

Parameters

None.

Returns

The clear field indicator.

Throws

None.

getField

Description

This method retrieves the value of the specified system field. There are getter methods for the following fields: LocalId, SystemCode, Status, CreateDateTime, CreateFunction, CreateUser, and UpdateUser.

Syntax


String getField()

or


Date getField()

Parameters

None.

Returns

The value of the specified field. The type of value returned depends on the field from which the value was retrieved.

Throws

ObjectException

getObjectName

Description

This method retrieves the system record JavaBean.

Syntax


ObjectNameBean getObjectName()

Parameters

None.

Returns

A JavaBean containing the system record.

Throws

None.

setClearFieldIndicator

Description

This method sets the value of the clear field indicator. By default, this is set to double quotes (“”).

Syntax


void setClearFieldIndicator(String value)

Parameters

Name 

Type 

Description 

value 

String 

The value that should be entered into a field to indicate that any existing values should be replaced with null. 

Returns

None.

Throws

None.

setField

Description

This method sets the value of the specified system field. There are setter methods for the following fields: LocalId, SystemCode, Status, CreateDateTime, CreateFunction, CreateUser, and UpdateUser.

Syntax


void setField(value)

Parameters

Name 

Type 

Description 

value 

varies 

The value to set in the specified field. The type of value depends on the field into which the value is being set. 

Returns

None.

Throws

ObjectException

setObjectName

Description

This method sets the system object JavaBean.

Syntax


void setObjectName(ObjectNameBean aObjectName)

Parameters

Name 

Type 

Description 

aObjectName

ObjectNameBean

The JavaBean for the parent object. 

Returns

None.

Throws

ObjectException

Parent Beans

A JavaBean is created to represent the parent object defined in the object structure of the master index application. The methods in this class are generated based on the object structure and provide the ability to create a parent object Bean and to set or retrieve the field values for that JavaBean.

The name of the parent JavaBean class is the same as the name of the parent object, with the word “Bean” appended. For example, if the 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, get and set methods for each field defined for the parent object, and methods to manipulate child objects. Most methods have dynamic names 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.

Definition


final class ObjectNameBean

Methods

 

Inherited Methods

The following methods are inherited from java.lang.Object.

ObjectNameBean

Description

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.

Syntax


new ObjectNameBean()

Parameters

None.

Returns

An instance of the parent object Bean.

Throws

ObjectException

countChild

Description

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 countPhone or countAddress.

Syntax


int countChild()

Parameters

None.

Returns

An integer indicating the number of child objects in a collection.

Throws

None.

countChildren

Description

This method returns a count of the total number of child objects belonging to a system object.

Syntax


int countChildren()

Parameters

None.

Returns

An integer representing the total number of child objects.

Throws

None.

countChildren

Description

This method returns a count of the total number of child objects of a specific type that belong to a system object.

Syntax


int countChildren(String type)

Parameters

Name 

Type 

Description 

type 

String 

The type of child object to count, such as Phone or Address. 

Returns

An integer representing the total number of child objects of the specified type.

Throws

None.

deleteChild

Description

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.

Syntax


void deleteChild(String ChildId)

Parameters

Name 

Type 

Description 

ChildId

String 

The unique identification code of the child object to delete. 

Returns

None.

Throws

ObjectException

getChild

Description

This method retrieves an array of child object JavaBeans. 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 object is named getAddress. A getter method is created for each child object in the parent object.

Syntax


ChildBean[] getChild()

Parameters

None.

Returns

An array of JavaBeans containing the type of child object specified by the method name.

Throws

None.

getChild

Description

This method retrieves a child object JavaBean 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.

Syntax


ChildBean getChild(int i)

Parameters

Name 

Type 

Description 

int 

The index of the child object to retrieve from a list of child objects. 

Returns

A JavaBean containing the child object specified by the index value. The method name indicates the type of child object returned.

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 parent object. For example, if the parent object contains a field named “FirstName”, the getter method for this field is named getFirstName.

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 structure.

Throws

ObjectException

getObjectNameId

Description

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

Syntax


String getObjectNameId()

Parameters

None.

Returns

A string containing the unique ID of the parent object.

Throws

ObjectException

setChild

Description

This method adds a child object to the system object.

Syntax


void setChild(int index, ChildBean child)

Parameters

Name 

Type 

Description 

index 

integer 

The index number for the new child object. 

child 

ChildBean

The JavaBean containing the child object to add. 

Returns

None.

Throws

None.

setChild

Description

This method adds an array of child objects of one type to the system object.

Syntax


void setChild(ChildBean[] children)

Parameters

Name 

Type 

Description 

children 

ChildBean[]

The array of child objects to add. 

Returns

None.

Throws

None.

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 “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.

Syntax


void setField(value)

Parameters

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. 

Returns

None.

Throws

ObjectException

setObjectNameId

Description

This method sets the value of the ObjectNameId field in the parent object.


Note –

This ID is set internally by the master index application. You should never set this field manually.


Syntax


void setObjectNameId(String value)

Parameters

Name 

Type 

Description 

value 

String 

The value of the ObjectNameId field.

Returns

None.

Throws

ObjectException

Child Beans

A JavaBean is created to represent each child object defined in the object structure of the master index application. The methods in these classes provide the ability to create a child object Bean and to set or retrieve the field values for that object Bean.

The name of each child object JavaBean class is the same as the name of each child object, with the word “Bean” appended. For example, if a child object in your object structure is named “Address”, the name of the corresponding child class is AddressBean. The methods in this class include a constructor method for the child object JavaBean, and get and set methods for each field defined for the child object. Most methods have dynamic names based on the name of the child object and the fields defined for that object. In the following methods, Child indicates the name of a child object and Field indicates the name of a field defined for the child object.

Definition


final class ChildBean

Methods


Note –

These JavaBeans also include two countChildren methods, which are not currently used.


Inherited Methods

The following methods are inherited from java.lang.Object.

ChildBean

Description

This method is the constructor for the user-defined object JavaBean class. You can instantiate this class to create a new instance of the JavaBean.

Syntax


new ChildBean()

Parameters

None.

Returns

An instance of the child object Bean.

Throws

ObjectException

delete

Description

This method removes the child object from its corresponding parent object. This is used with the executeMatchUpdate function to update a system object by deleting one of the child objects from the object being processed.

Syntax


void delete()

Parameters

None.

Returns

None.

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 “ZipCode”, the getter method for this field is named getZipCode.

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 structure.

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

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 child object. For example, if the child object contains a field named “Address”, the setter method for this field is named setAddress. A setter method is created for each field in the child object, including any fields containing standardized or phonetic data.

Syntax


void setField(value)

Parameters

Name 

Type 

Description 

value 

varies 

The value of the field specified by the method name. The type of value depends on the data type of the field being populated. 

Returns

None.

Throws

ObjectException

setChildId

Description

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


Note –

This ID is set internally by the master index application. You should never set this field manually.


Syntax


void setChildId(String value)

Parameters

Name 

Type 

Description 

value 

String 

The value of the ChildId field.

Returns

None.

Throws

ObjectException

DestinationEO

This class represents an enterprise object involved in a merge. This is the enterprise object whose EUID was kept in the final merge result record. A DestinationEO object is used when unmerging two enterprise objects.

Definition


class DestinationEO

Methods

getEnterpriseObjectName

Description

This method retrieves the surviving enterprise object from a merge transaction in order to allow the records to be unmerged.

Syntax


EnterpriseObjectName getEnterpriseObjectName()

where ObjectName is the name of the parent object.

Parameters

None.

Returns

The surviving enterprise object from a merge transaction.

Throws

ObjectException

setEnterpriseObjectName

Description

This method sets the surviving enterprise object of a merge transaction.

Syntax


void setEnterpriseObjectName(EnterpriseObjectName eo)

where ObjectName is the name of the parent object.

Parameters

Name 

Type 

Description 

eo 

EnterpriseObjectName

The destination enterprise object to set. 

Returns

None.

Throws

ObjectException

MergeObjectNameResult

This class represents the return values for a call to the merge-related functions of the ObjectNameEJB class, where ObjectName is the name of the parent object.

Definition


class MergeObjectNameResult

Methods

 

MergeObjectNameResult

Description

This is the constructor method for the MergeObjectNameResult class.

Syntax


new MergeObjectnameResult()

where ObjectName is the name of the parent object.

Parameters

None.

Returns

A new instance of MergeObjectNameResult.

Throws

None.

getDestinationEO

Description

This method retrieves the surviving enterprise object from a merge result.

Syntax


DestinationEO getDestinationEO()

Parameters

None.

Returns

The surviving enterprise object from a merge result.

Throws

None.

getSourceEO

Description

This method retrieves the nonsurviving enterprise object from a merge result.

Syntax


SourceEO getSourceEO()

Parameters

None.

Returns

The nonsurviving enterprise object from a merge result.

Throws

None.

setDestinationEO

Description

This method sets the surviving enterprise object in a merge result.

Syntax


void setDestinationEO(DestinationEO eom)

Parameters

Name 

Type 

Description 

eom 

DestinationEO 

The surviving record in the merge result. 

Returns

None.

Throws

None.

setSourceEO

Description

This method sets the nonsurviving enterprise object in a merge result.

Syntax


void setSourceEO(SourceEO eom)

Parameters

Name 

Type 

Description 

eom 

SourceEO 

The nonsurviving record in the merge result. 

Returns

None.

Throws

None.

SBRObjectName

This class represents an SBR object in an enterprise object. The SBR (single best record) represents the data about an entity that is considered to be the most accurate information from all external systems. Many of the methods in this class are named based on the name of the parent object, which is represented by ObjectName in the method descriptions below.

Definition


class SBRObjectName

Methods

SBRObjectName

Description

This is a constructor method for an empty SBRObjectName class.

Syntax


new SBRObjectName()

Parameters

None.

Returns

A new instance of SBRObjectName.

Throws

None.

SBRObjectName

Description

This is a constructor method for an SBRObjectName class. It takes an SBR object as its input.

Syntax


new SBRObjectName(SBR sbr)

Parameters

Name 

Type 

Description 

sbr 

SBRObjectName

The SBR object to use to construct the new instance of SBRObjectName.

Returns

None.

Throws

ObjectException

getObjectName

Description

This method retrieves the parent object in the SBR.

Syntax


ObjectNameBean getObjectName()

Parameters

None.

Returns

The ObjectNameBean object associated with the SBR.

Throws

ObjectException

getStatus

Description

This method retrieves the status of the SBR.

Syntax


String getStatus()

Parameters

None.

Returns

The status of the SBR.

Throws

ObjectException

setObjectName

Description

This method sets the parent object in the SBR.

Syntax


void setObjectName(ObjectNameBean aObjectName)

Parameters

Name 

Type 

Description 

aObjectName

ObjectNameBean

The parent object bean to set in the SBR. 

Returns

None.

Throws

ObjectException

setStatus

Description

This method sets the status of the SBR.

Syntax


voide setStatus(String status)

Parameters

Name 

Type 

Description 

status 

String 

The status of the SBR. 

Returns

None.

Throws

ObjectException

SearchObjectNameResult

This class represents the results of a search. A SearchObjectNameResult object (where ObjectName is the name of the parent object) is returned as a result of a call to searchBlock, searchExact, or searchPhonetic.searchBlock

Definition


class SearchObjectNameResult

Methods

getEUID

Description

This method retrieves the EUID of a search result record.

Syntax


String getEUID()

Parameters

None.

Returns

A string containing an EUID.

Throws

None.

getComparisonScore

Description

This method retrieves the weight that indicates how closely a search result record matched the search criteria.

Syntax


Float getComparisonScore()

Parameters

None.

Returns

A comparison weight.

Throws

None.

getObjectName

Description

This method retrieves an object bean for a search result record.

Syntax


ObjectNameBean getObjectName()

where ObjectName is the name of the parent object.

Parameters

None.

Returns

An object bean.

Throws

None.

setEUID

Description

This method sets the EUID of a search result record.

Syntax


void setEUID(String euid)

Parameters

Name 

Type 

Description 

euid 

String 

The EUID to set. 

Returns

None.

Throws

None.

setComparisonScore

Description

This method sets the weight that indicates how closely a search result record matched the search criteria.

Syntax


void setComparisonScore(float score)

Parameters

Name 

Type 

Description 

score 

Float 

The matching comparison score to set. 

Returns

None.

Throws

None.

setObjectName

Description

This method sets an object bean as a search result record.

Syntax


void setObjectName(ObjectNameBean bean)

where ObjectName is the name of the parent object.

Parameters

Name 

Type 

Description 

bean 

ObjectNameBean

The object bean to set. 

Returns

None.

Throws

None.

SourceEO

This class represents an enterprise object involved in a merge. This is the enterprise object whose EUID was not kept in the final merge result record. A SourceEO object is used when unmerging two enterprise objects.

Definition


class SourceEO

Methods

getEnterpriseObjectName

Description

This method retrieves the nonsurviving enterprise object from a merge transaction in order to allow the records to be unmerged.

Syntax


EnterpriseObjectName getEnterpriseObjectName()

where ObjectName is the name of the parent object.

Parameters

None.

Returns

The nonsurviving enterprise object from a merge transaction.

Throws

None.

SetEnterpriseObjectName

Description

This method sets the nonsurviving enterprise object from a merge transaction in order to allow the records to be unmerged.

Syntax


void setEnterpriseObjectName(EnterpriseObjectName eo)

where ObjectName is the name of the parent object.

Parameters

Name 

Type 

Description 

eo 

EnterpriseObjectName

The enterprise object to set. 

Returns

None.

Throws

ObjectException.

SystemObjectNamePK

This class represents the primary keys in a system object, which include the processing code for the originating system and the local ID of the object in that system. The class is named for the primary object. For example, if the primary object is named “Person”, this class is named SystemPersonPK. If the primary object is named “Company”, this class is named SystemCompanyPK. The methods in these classes provide the ability to create an instance of the class and to retrieve the system processing code and the local ID.

Definition


class SystemObjectNamePK

where ObjectName is the name of the parent object.

Methods

SystemObjectNamePK

Description

This method is the user-defined system primary key object. This object contains a system code and a local ID. Use this constructor method to create a new instance of a system primary key object.

Syntax


new SystemObjectNamePK()

where ObjectName is the name of the parent object.

Parameters

None.

Returns

An instance of the system primary key object.

Throws

None.

getLocalId

Description

This method retrieves the local identifier from a system primary key object.

Syntax


String getLocalId()

Parameters

None.

Returns

A string containing a local identifier.

Throws

None.

getSystemCode

Description

This method retrieves the system’s processing code from a system primary key object.

Syntax


String getSystemCode()

Parameters

None.

Returns

A string containing the processing code for a system.

Throws

None.