BusObjArray class

The methods documented in this chapter operate on objects of the IBM WebSphere InterChange Server Express-defined class BusObjArray. The BusObjArray class encapsulates an array of business objects. In a hierarchical business object, an attribute is a reference to an array of child business objects when its cardinality is equal to n. Operations on the BusObjArray class can return either a BusObjArray object or an actual array of business objects.

Note:
The BusObjArray class is used for both collaboration development and mapping; check the Notes section for each method's usage issues.

Table 94 lists the methods of the BusObjArray class.

Table 94.
BusObjArray method summary
Method Description Page
addElement() Add a business object to this business object array. addElement()
duplicate() Create a business object array (BusObjArray object) exactly like this one. duplicate()
elementAt() Retrieve a single business object by specifying its position in this business object array. elementAt()
equals() Compare another business object array with this one. equals()
getElements() Retrieve the contents of this business object array. getElements()
getLastIndex() Retrieve the last available index from a business object array. getLastIndex()
max() Retrieve the maximum value for the specified attribute among all elements in this business object array. max()
maxBusObjArray() Returns the business objects that have the maximum value for the specified attribute, as a business object array (BusObjArray object). maxBusObjArray()
maxBusObjs() Returns the business objects that have the maximum value for the specified attribute, as an array of BusObj objects. maxBusObjs()
min() Retrieve the minimum value for the specified attribute among the business objects in this array. min()
minBusObjArray() Returns the business objects that have the minimum value for the specified attribute, as a BusObjArray object. minBusObjArray()
minBusObjs() Returns the business objects that have the minimum value for the specified attribute, as an array of BusObj objects. minBusObjs()
removeAllElements() Remove all elements from this business object array. removeAllElements()
removeElement() Remove a business object element from a business object array. removeElement()
removeElementAt() Remove an element at a particular position in this business object array. removeElementAt()
setElementAt() Set the value of a business object in a business object array. setElementAt()
size() Return the number of elements in this business object array. size()
sum() Adds the values of the specified attribute for all business objects in this business object array. sum()
swap() Reverse the positions of two business objects in this business object array. Keep in mind that the first element in the array is zero (0), the second is 1, the third is 2, and so on. swap()
toString() Retrieve the values in this business object array as a single string. toString()

Note:
See "Exceptions and exception types" for an important clarification on exception handling with this class. The section applies to exceptions in BusObjArray and BusObj only.

Copyright IBM Corp. 1997, 2003