To create a supported business object, perform the following steps:
Use the PeopleSoft Application Designer to create a class structure from a Component Interface. The business object that corresponds to the Component Interface requires these classes to process the data; it is part of the PeopleSoft API.
To assist you in creating and using the generated classes, this section covers:
To generate APIs from a Component Interface, do the following:
$ProductDirS/connectors/PeopleSoft/dependencies
%ProductDir%\connectors\PeopleSoft\dependencies
$ProductDir directory:
Component Interface class files
/connectors/PeopleSoft/dependencies/PeopleSoft/Generated/CompIntfc
Session-specific class files
/connectors/PeopleSoft/dependencies/PeopleSoft/Generated/PeopleSoft
%ProductDirS% directory:
Component Interface class files
\connectors\PeopleSoft\dependencies\PeopleSoft\Generated\CompIntfc
Session-specific class files
\connectors\PeopleSoft\dependencies\PeopleSoft\Generated\PeopleSoft
For a more detailed explanation of the API-generating process, including screen shots, see Building the API files.
If you use the PeopleSoft APIs menu (a submenu of the Build menu) to create a class structure from the example EMER_CONTACT_PROFILE Component Interface, you have the following:
The connector uses the name of this class to retrieve and instantiate the Component Interface in PeopleSoft. The classname is stored in the CiName property in the application-specific information at the business object level. For more information, see Application-specific information at the business object level.
The generated methods that the connector uses are:
Each of the generated classes contains the getFieldName() method, which enables the connector to get the data value of each simple field of the Component Interface, and load it into the corresponding business object attribute.
For example, as illustrated in the right half of Figure 6, there are seven fields listed as FINDKEYS for the EMER_CONTACT_PROFILE Component. These fields include EMPLID, NAME, and DEPTID. To get data from these fields, the connector uses the getEmpId(), getName(), and getDeptId() methods. After obtaining the values, the connector loads them into the EmpId, ContactName, and DeptId business object attributes.
To return the value of simple fields in a Collection, the connector first returns the Collection, and then returns the fields in it. For example, to get the values in the CONTACT_NAME and SAME_ADDRESS_EMPL fields of the EMERGENCY_CNTCT Collection, the connector first executes the getEmergencyCntct() method. Then it executes the getContactName() and getSameAddressEmpl() methods. For more information, see getCollectionName() Method.
Each of the generated classes contains the setFieldName() method, which enables the connector to set the data value of each simple field of the Component Interface based on the value of its corresponding business object attribute.
For example, to load data from the EmpId, ContactName, and DeptId business object attributes into the EMPLID, NAME, and DEPTID fields, the connector uses the setEmpId(), setName(), and setDeptId() methods.
To return the Collection of emergency contacts for a given employee, the connector uses the getEmergencyCntct() method in the EmerContactProfile class. The way that the connector handles the multiple rows depends on the setting of application-specific information at the business-object level.
For information about the EFFDT parameter, see Application-specific information at the business object level.
To return the Collection of phone types and phone numbers for each of an employee's emergency contacts, the connector uses the getEmergencyPhone() method in the EmerContactProfileEmergencyCntct class. After obtaining all Records, the connector loads them into the business object's array attribute, EmergencyPhone[n].
When retrieving the records in a Collection, the connector uses the CurrentItem() method in the EmerContactProfile class to return only the record with the latest effective date. The connector uses this method only if the EFFDT parameter of the business-object level application-specific information evaluates to true.
When retrieving the records in a Collection, to return only the record with the specified record number, the connector uses the Item(index) method in the EmerContactProfile class. The connector uses this method only if the EFFDT parameter of the business-object level application-specific information evaluates to false. By default, this method returns the first row retrieved.