Setting Properties

This section provides an overview of standard properties and discusses how to work with user defined properties.

Standard properties do not appear in the component interface view in PeopleSoft Application Designer. The following tables name and define the standard properties, and list the interfaces for PeopleCode, Java, and C++.

This table contains the component interface properties:

Property Name

Description, Programming Syntax

CreateKeyInfoCollection

Returns a collection of items that describes the Create keys. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: IcompIntfcPropertyInfoCollection getCreateKeyInfoCollection()

  • C++: HPSAPI_COMPINTFCPROPERTYINFOCOLLECTION <CI_NAME>_GetCreateKeyInfoCollection(HPSAPI_<CI_NAME>)

GetKeyInfoCollection

Returns a collection of items that describes the Get keys. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: IcompIntfcPropertyInfoCollection getGetKeyInfoCollection()

  • C++: HPSAPI_COMPINTFCPROPERTYINFOCOLLECTION<CI_NAME>_GetGetKeyInfoCollection(HPSAPI_<CI_NAME>)

FindKeyInfoCollection

Returns a collection of items that describes the Find keys. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: IcompIntfcPropertyInfoCollection getFindKeyInfoCollection()

  • C++: HPSAPI_COMPINTFCPROPERTYINFOCOLLECTION<CI_NAME>_GetFindKeyInfoCollection(HPSAPI_<CI_NAME>)

GetHistoryItems

Controls whether the component interface runs in Update/Display mode or Update/Display All mode when the underlying component is effective-dated. If GetHistory is set to true, then historical data can be retrieved but not modified. GetHistory items work in accordance with EditHistory items.

The default value is False. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: boolean getGetHistoryItems(), void setGetHistoryItems(boolean)

  • C++: BOOL <CI_NAME>_GetGetHistoryItems(HPSAPI_<CI_NAME>), void<CI_NAME>_SetGetHistoryItems(HPSAPI_<CI_NAME>, BOOL)

EditHistoryItems

Controls whether the component interface runs in Update/Display All mode, Update/Display mode, or Correction mode when the underlying component is effective-dated. If EditHistory items are set to true, then historical data can be modified. EditHistory items work in accordance with GetHistory items.

The default value is False. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: boolean getEditHistoryItems(), void setEditHistoryItems(boolean)

  • C++: BOOL <CI_NAME>_GetEditHistoryItems(HPSAPI_<CI_NAME>), void<CI_NAME>_SetEditHistoryItems(HPSAPI_<CI_NAME >, BOOL)

InteractiveMode

Controls whether to apply values and run business rules immediately, or whether items are queued and business rules are run later, in a single step.

Note: You should use interactive mode when testing and debugging a component interface. Interactive mode in a production environment slows performance because of the number of server trips required.

If you are using a component interface as part of a batch process in which thousands of rows are to be inserted, running in interactive mode may reduce performance so much on some UNIX servers that the application times out with a connection failure.

The default value is False. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: boolean getInteractiveMode(), void setInteractiveMode(boolean)

  • C++: BOOL <CI_NAME>_GetInteractiveMode(HPSAPI_<CI_NAME>), void<CI_NAME>_SetInteractiveMode(HPSAPI_<CI_NAME>, BOOL )

StopOnFirstError

When this property is set to True, the first error generated by the component interface halts the program.

The default value is False. This property is read-only.

  • Java: boolean getStopOnFirstError(), setStopOnFirstError(boolean)

  • C++: BOOL <CI_NAME>_GetStopOnFirstError(HPSAPI_<CI_NAME>), void<CI_NAME>_SetStopOnFirstError(HPSAPI_<CI_NAME>, BOOL)

CompIntfcName

Returns the name of the component interface class as named in PeopleSoft Application Designer. This property is read-only.

  • Java: String getCompIntfcName()

  • C++: LPTSTR <CI_NAME>_GetCompIntfcName((HPSAPI_<CI_NAME>)

ComponentName

Returns the name of the component interface class as named in PeopleSoft Application Designer. This property is read-only.

  • Java: boolean getComponentName()

  • C++: LPTSTR <CI_NAME>_GetComponentName(HPSAPI_<CI_NAME>)

Description

Returns the description of the component interface class as set in PeopleSoft Application Designer. This property is read-only.

  • Java: boolean getDescription()

  • C++: LPTSTR <CI_NAME>_GetDescription((HPSAPI_<CI_NAME>)

Market

Returns the Market setting of the component used to build this component interface. This property is read-only.

  • Java: String getMarket()

  • C++: LPTSTR <CI_NAME>_GetMarket((HPSAPI_<CI_NAME>)

GetDummyRows

When a new scroll is inserted on a page, that scroll is displayed even though it has no underlying data. Any scroll that is empty has one dummy row displayed with only the defaults set. This property is True if the dummy row is to be displayed, False if it is not. The default value for this property is True. This property is read-write.

  • Java: boolean getGetDummyRows(), void setGetDummyRows(boolean)

  • C++: BOOL <CI_NAME>_GetGetDummyRows(HPSAPI_<CI_NAME>), void<CI_NAME>_SetGetDummyRows(HPSAPI_<CI_NAME>, BOOL)

PropertyInfoCollection

Returns a collection of items that describes a specific property. The specific properties that are available in the propertyinfocollection are listed here. This property is read-only.

Use these interfaces to call with other programming languages.

  • Java: IcompIntfcPropertyInfoCollection getPropertyInfoCollection()

  • C++: HPSAPI_COMPINTFCPROPERTYINFOCOLLECTION <CI_NAME>_GetPropertyInfoCollection(HPSAPI_<CI_NAME>)

The Component Interface Property Info Collection object (CompIntfPropInfoCollection) supports the following CompIntfPropInfoCollection Object Properties.

Property Name

Description, Programming Syntax

Name

This property returns the name of the object executing the property as a string. This property is read-only.

  • Java: String getName()

  • C++: LPTSTR CompIntfcPropertyInfo_GetName(HPSAPI_COMPINTFCPROPERTYINFO)

RecordName

This property returns the record name associated with the object executing the property. This property is read-only.

  • Java: String getRecordName()

  • C++: LPTSTR CompIntfcPropertyInfo_GetRecordName(HPSAPI_COMPINTFCPROPERTYINFO)

FieldName

This property returns the field name associated with the object executing the property. This property is read-only.

  • Java: String getFieldName()

  • C++: LPTSTR CompIntfcPropertyInfo_GetFieldName(HPSAPI_COMPINTFCPROPERTYINFO \)

LabelLong

This property returns the record field Long Name value as a string. If a component override exists for this value, it is not included. This property is read-only.

  • Java: String getLabelLong()

  • C++: LPTSTR CompIntfcPropertyInfo_GetLabelLong(HPSAPI_COMPINTFCPROPERTYINFO)

LabelShort

This property returns the record field ShortName value as a string. If a component override exists for this value, it is not included. This property is read-only.

  • Java: String getLabelShort()

  • C++: LPTSTR CompIntfcPropertyInfo_GetLabelShort(HPSAPI_COMPINTFCPROPERTYINFO)

  • COM: String LabelShort

IsCollection

This property returns True if the object executing the property is a data collection, False otherwise. If IsCollection is True, other field-oriented properties like Required, Type, Xlat, YesNo, Prompt, and Format are undefined. If IsCollection is False, the object represents a field and all the previous properties are defined as described. This property is read-only.

  • Java: boolean getIsCollection()

  • C++: BOOL CompIntfcPropertyInfo_GetIsCollection(HPSAPI_COMPINTFCPROPERTYINFO)

Type

This property returns the field type, as a number, of the object.

This property is read-only.

  • Java: long getType()

  • C++: PSI32 CompIntfcPropertyInfo_GetType(HPSAPI_COMPINTFCPROPERTYINFO)

OAType

This property returns the field type, as a number, of the object. This property is read-only.

  • Java: long getOAType()

  • C++: PSI32 CompIntfcPropertyInfo_GetOAType(HPSAPI_COMPINTFCPROPERTYINFO)

Format

This property returns the field format for the object executing the property (that is, name, phone, zip, SSN, and so on) as a number. This property is read-only.

  • Java: String getFormat()

  • C++: PSI32 CompIntfcPropertyInfo_GetFormat(HPSAPI_COMPINTFCPROPERTYINFO)

Key

This property returns True if the object executing the property is a key, False otherwise. This property is read-only.

  • Java: boolean getKey()

  • C++: BOOL CompIntfcPropertyInfo_GetKey(HPSAPI_COMPINTFCPROPERTYINFO hCompIntfcPropertyInfo)

Required

This property returns True if the object executing the property is a required property, False otherwise. This property is read-only.

  • Java: boolean getRequired()

  • C++: BOOL CompIntfcPropertyInfo_GetRequired(HPSAPI_COMPINTFCPROPERTYINFO)

Xlat

This property returns True if the object executing the property is associated with an XLAT table, False otherwise. This property is read-only.

  • Java: String getXlat()

  • C++: BOOL CompIntfcPropertyInfo_GetXlat(HPSAPI_COMPINTFCPROPERTYINFO)

Yesno

This property returns True if the object executing the property is associated with the Yes/No table, False otherwise. This property is read-only.

  • Java: boolean getYesno()

  • C++: BOOL CompIntfcPropertyInfo_GetYesno(HPSAPI_COMPINTFCPROPERTYINFO)

Prompt

This property returns True if the object executing the property is associated with a prompt table, False otherwise. This property is read-only.

  • Java: boolean getPrompt()

  • C++: BOOL CompIntfcPropertyInfo_GetPrompt(HPSAPI_COMPINTFCPROPERTYINFO)

Length

This property returns the length of the object executing the property. This property is read-only.

  • Java: long getLength()

  • C++: PSI32 CompIntfcPropertyInfo_GetLength(HPSAPI_COMPINTFCPROPERTYINFO)

DecimalPosition

This property returns the decimal position for the object executing the property. This property is read-only.

  • Java: long getDecimalPosition()

  • C++: PSI32 CompIntfcPropertyInfo_GetDecimalPosition(HPSAPI_COMPINTFCPROPERTYINFO)

IsReadOnly

This property returns True if the property marked read-only in the component interface definition; False otherwise. This property is read-only.

  • Java: boolean getIsReadOnly()

  • C++: BOOL CompIntfcPropertyInfo_GetIsReadOnly(HPSAPI_COMPINTFCPROPERTYINFO)

Altkey

This property returns True if the object executing the property is an alternate key, False otherwise. This property is read-only.

  • Java: boolean getAltkey()

  • C++: BOOL CompIntfcPropertyInfo_GetAltkey(HPSAPI_COMPINTFCPROPERTYINFO)

Listboxitem

This property returns True if the object executing the property is associated with a list box, False otherwise. This property is read-only.

  • Java: boolean getListboxitem()

  • C++: BOOL CompIntfcPropertyInfo_GetListboxitem(HPSAPI_COMPINTFCPROPERTYINFO)

Example of PropertyInfoCollection

Here is a Java example that calls PropertyInfoCollection:

IcompIntfcPropertyInfoCollection oLO_PropInfoColl
IcompIntfcPropertyInfo oLO_PropInfoItem
 
oLO_PropInfoColl = oCI.getPropertyInfoCollection();
for (int I=0; I < oLO_PropInfoColl.getCount(); I++) {
   oLO_PropInfoItem = oLO_PropInfoColl.item(i);
   
   System.out.println("\t Name = " + oLO_PropInfoColl.getName());
   System.out.println("\t Record Name = " + oLO_PropInfoColl.getRecordName());
   System.out.println("\t Field Name = " + oLO_PropInfoColl.getFieldName());
   System.out.println("\t Label Long = " + oLO_PropInfoColl.getLabelLong());
   System.out.println("\t Label Short = " + oLO_PropInfoColl.getLabelShort());
   System.out.println("\t IsCollection = " + oLO_PropInfoColl.getIsCollection());
   System.out.println("\t Type = " + oLO_PropInfoColl.getType());
   System.out.println("\t OAType = " + oLO_PropInfoColl.getOAType());
   System.out.println("\t Format = " + oLO_PropInfoColl.getFormat());
   System.out.println("\t Is Get Key? = " + oLO_PropInfoColl.getKey());
   System.out.println("\t Is Required = " + oLO_PropInfoColl.getRequired());
   System.out.println("\t Is Xlat? = " + oLO_PropInfoColl.getXlat());
   System.out.println("\t Is Yesno? = " + oLO_PropInfoColl.getYesno());
   System.out.println("\t Prompt = " + oLO_PropInfoColl.getPrompt());
   System.out.println("\t Length = " + oLO_PropInfoColl.getLength());
   System.out.println("\t DecimalPosition = " + oLO_PropInfoColl.
      getDecimalPosition());
   System.out.println("\t Is Read Only? = " + oLO_PropInfoColl.
      getIsReadOnly());
   System.out.println("\t Is Alt Key? = " + oLO_PropInfoColl.getAltkey());
   System.out.println("\t Is ListBox item? = " + oLO_PropInfoColl.
      getListboxitem());

Object Adapter

The name of the property is OAType, and it holds the value of the object adapter type. Exposing this property and supplying the associated methods enables you to detect possible data type mismatches between the database and the component interface object.

The Java methods are:

Field or Control

Definition

getOAType()

Returns the object adapter type.

getType()

Returns the type of the property of a particular database field.

For example:

public static void printPropertyType(String propName, ICompIntfcPropertyInfo iPropertyInfo) {
        
String strOAType = null;
String strDBType = null;
        
    try {
        switch ((int)iPropertyInfo.getOAType()) {
            /* Object Adapter Type == 0 */
            case CIPropertyTypes.PSPROPERTY_OA_TYPE_BOOL:
                    strOAType = "BOOL";
                    break;
             /* Object Adapter Type == 1 */
             case CIPropertyTypes.PSPROPERTY_OA_TYPE_NUMBER: 
                    strOAType = "INTEGER";
                    break;
             /* Object Adapter Type == 2 */
             case CIPropertyTypes.PSPROPERTY_OA_TYPE_FLOAT: 
                    strOAType = "FLOAT";
                    break;
             /* Object Adapter Type == 3 */
             case CIPropertyTypes.PSPROPERTY_OA_TYPE_STRING: 
                    strOAType = "STRING";
                    break;
            }
            
        switch ((int)iPropertyInfo.getType()) {
            /* Database Type == 0 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_CHARACTER: 
                    strDBType = "CHARACTER";
                    break;
            /* Database Type == 1 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_LONG_CHARACTER: 
                    strDBType = "LONG_CHARACTER";
                    break;
            /* Database Type == 2 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_NUMBER: 
                    strDBType = "NUMBER";
                    break;
            /* Database Type == 3 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_SIGNED_NUMBER:
                    strDBType = "SIGNED NUMBER";
                    break;
            /* Database Type == 4 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_DATE:
                    strDBType = "DATE";
                    break;
            /* Database Type == 5 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_TIME:
                    strDBType = "TIME";
                    break;
            /* Database Type == 6 */
            case CIPropertyTypes.PSPROPERTY_DB_TYPE_DATETIME: 
                    strDBType = "DATETIME";
                    break;
            }
            
        }
        catch (Exception e) {
            e.printStackTrace();
        }

        System.out.println("\n" + propName + 
             " Object Adapter Type is:  " + strOAType +
             ", Database Type is:  " + strDBType);
    }

Component Interface Collection Property

This table describes the component interface collection property Count.

Name

Description, Programming Syntax

Count

Returns the number of items in a collection.

  • Java: long getCount()

  • C++: PSI32 CompIntfcCollection_GetCount(HPSAPI_<CI_NAME>)

Data Item Property

This table describes the data item property ItemNum:

Name

Description, Programming Syntax

ItemNum

Returns the position of the row within the given collection of a DataRow.

  • Java: long getItemNum()

  • C++: PSI32 <CI_NAME>_GetItemNum(HPSAPI_<CI_NAME>)

Note: The component interface classes contain information about PropertyInfo properties and related PeopleCode.

User-defined properties are those properties on the underlying component that are exposed through the component interface. User-defined properties are derived from the component to which the component interface is associated and must be added manually. They are the specific record fields that you expose to an external system with the component interface. You create user-defined properties in addition to the standard properties to enable data manipulation of the component. When you create a new component interface, if you accept the default properties, user-defined properties are created automatically for each field displayed to the user on the underlying component.

User-defined properties are the points where the component and the underlying database are exposed to the external system. This is the means that component interfaces use to add or change fields and data in the database.

To create a user-defined property, drag a record, field, or scroll from the component view to the component interface view.

Where you insert the definition in the component interface view does not matter. When the component interface is opened, the system automatically converts the field or record into a component interface property and places it in the appropriate place in the list of properties. Also, when you drag a definition from the component view into the component interface view, all child definitions are brought into the component interface automatically. After these child properties are added to the component interface, you can remove each property individually, if desired.

Dragging a key from the search records, which precede the level-zero record in the page view, adds a key to all appropriate key collections (Get, Create, and Find) in the component interface. Because appropriate keys are added automatically when a component interface is first created, you typically must add keys only if the new keys are added to the underlying component after the creation of the component interface.

To delete a property:

  1. Select the property to be deleted.

  2. Either press the Del key on the keyboard, or right-click the key and select Delete.

    Standard Windows behavior is employed for selecting multiple properties using the Shift and Ctrl keys.

Property names are automatically generated according to the corresponding fields from the component. If these names are cryptic, you might want to rename these properties to explain them better. Renaming a property does not change the field that the property references.

Image: Edit Property dialog box

This example shows the Edit Property dialog box. Use this dialog box to rename user-defined properties for component interfaces.

Edit Property dialog box

Important! PeopleSoft Mobile Agent is a deprecated product. The options listed in the Mobile Property Persistence group box of the Edit Property dialog box exist for backward compatibility only.

To rename a property:

  1. Double-click the property name or right-click the property name and select Edit Name from the menu.

  2. Enter the new property name.

    Programs accessing this component interface must reference the new property name. For example, if SDK_NAME was changed to NAME, programs must use NAME instead of SDK_NAME.

  3. Add any comments that might be helpful.

  4. Select the Read-Only check box to make this property read-only.

  5. If this property is for a mobile application, select a radio button that sets the persistence of the property.

    • Send Updates is the default behavior for a mobile property.

      Any changes or additions to this property on a mobile instance are synchronized to the server.

    • If a mobile property is set to Do not Send Updates, this property is not synchronized up to the server, but the value is maintained on the device.

    • A Derived property is used only at mobile runtime. Any values that are set or added to this property exist only for the runtime life of the object. No persistence of this data on the device exists, so it is subsequently never uploaded to the server.

Note: PeopleSoft Application Designer generates an error message if it detects that a component interface has properties that resolve to the same name when creating, saving, or opening a given component interface.

For example, NAME1 and NAME_1 both resolve to the same name when PeopleSoft APIs are built.

The set and get functions that are generated for the properties RTE_CNTL_TYPE1 and RTE_CNTL_TYPE_1 are: public String getRteCntlType1(), and public void setRteCntlType1(String inRteCntlType1). To fix this condition, name the properties so that they do not resolve to the same name.

Each component interface is isolated and unaware of the other component interfaces in the system. To access and update information from other component interfaces, references establish relationships between component interfaces.

Create a reference property in one component interface to access data exposed in another component interface. For example, the Customer object and the component interface exposing its properties include properties such as the customer’s name, address, and telephone numbers. Another object, Contact, includes data associated with all contacts in the system. The link between a specific customer and its associated contacts is owned by the Contact record, not the Customer record.

Therefore, to access contact data, the Customer component interface needs a reference property referring to the Contact component interface. For you to update contact data from the Customer component interface, the reference must include a valid reference path and reference backpointer to the customer ID.

Access the Create Reference dialog box by right-clicking the property and selecting Create Reference.

Image: Create Reference dialog box

This example illustrates the fields and controls on the Create Reference dialog box. You can find definitions for the fields and controls later on this page.

Create Reference dialog box

The Create Reference dialog box has the following fields:

Field or Control

Definition

Name

Describes the name of the reference you are creating.

Related Component Interface

Designates the component interface referenced from the current component interface.

Comments

Enter any comments to track the reference.

Related Key Mapping

Maps the property from the related component interface to the selected component interface property.

Valid Reference Path

Supports dynamic enumeration of the objects that can be selected as the value of the reference property being defined. This effectively filters these values so that you can select only objects that support the defined reference.

Because references use the concept of a walkpath to go from level zero of one component interface to level zero of another component interface, and then “walk” down to the lower levels of the component interface, only the level zero references are displayed in the Valid Reference Path drop-down list of a reference definition.

Reference Backpointer

Refers to the path back to the original component interface.

You can make any property read-only. At runtime, the value of a read-only property can be read but not updated.

To make a property read-only:

  1. Select the property.

  2. Select Edit > Toggle Read Only Access from the PeopleSoft Application Designer menu.

    A Y appears in the Read Only column of the component interface view corresponding to each property that you selected to be read-only.

Note: You can double-click the icon of any existing user-defined property to edit its name or comment or to toggle read-only access.