Understanding Sun Master Index Processing

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.