Understanding Collection Methods
The first item in a component interface collection is always indexed as item 1 from PeopleCode, which is consistent with other PeopleCode processing. From Java and C++ programs, this item is indexed as item 0.
Component Interface Collection Properties
This table describes the component interface collection properties:
| Data Collection Method | Action, Usage |
|---|---|
|
Count |
Returns the number of items in a collection. Use these interfaces to call with other programming languages.
|
|
ItemByName (not used in PeopleCode) |
Returns the property in the collection. It takes Name as a parameter. Use these interfaces to call with other programming languages.
|
|
InsertItem(Index) |
Inserts a new item. This is equivalent to clicking the Add button to insert a new row when online. It takes Index as a parameter and follows the same conventions for performing business rules (PeopleCode) as the online system. Use these interfaces to call with other programming languages.
|
|
DeleteItem(Index) |
Deletes the item that is designated by Index. This is equivalent to clicking the Delete button to delete the selected row when online. Use these interfaces to call with other programming languages.
|
|
Item(Index) |
Takes an item number as a parameter and returns a definition of the type that is stored in the specified row in the collection. For example, if the collection is a data collection, the return value is a DataRow. If the collection value is a PropertyInfoCollection, then the return value is a PropertyInfo definition, and so on. Use these interfaces to call with other programming languages.
|
|
ItemByKeys(keys) |
Identifies and finds a specific item, based on keys. The keys vary according to the design of the collection. Use these interfaces to call with other programming languages.
|
|
CurrentItem |
Returns the current effective DataRow in the collection. The behavior is consistent with effective date rules that are used online. This method works with effective-dated records only. Use these interfaces to call with other programming languages.
|
|
CurrentItemNum (CurrentItemNumber) |
Returns the item number of the current effective DataRow in the collection. The behavior is consistent with effective date rules that are used online. This method works with effective-dated records only. Use these interfaces to call with other programming languages.
|
|
GetEffectiveItem(DateString, SeqNum) |
Returns the DataRow that would be effective for the specified date and sequence number. This is a more general case of the GetCurrentItem function, which returns the definition that is effective at this moment. This method works with effective-dated records only. Use these interfaces to call with other programming languages.
|
|
GetEffectiveItemNum(DateString, SeqNum) |
Returns the item number of the DataRow in the collection that would be effective for the specified date and sequence number. This is a more general case of the GetCurrentItemNum function, which returns the number of the definition that is effective at this moment. This method works with effective-dated records only. Use these interfaces to call with other programming languages.
|