List services

Use List services to retrieve, replace, or add elements in an Object List, Document List, or String List, including converting String Lists to Document Lists.

addItemToVector

Adds an item or a list of items to a java.util.Vector object.

Input parameters for addItemToVector

  • vector: java.util.Vector Optional - The vector object to which you want to add an item or list of items. If no value is specified, the service creates a new java.util.Vector object to which the item(s) will be added.
  • item: Object Optional - Item to be added to the vector object.
Note: You can use either item or itemList to specify the input object. If both item and itemList input parameters are specified, the item as well as the list of items will be added to the vector object.
  • itemList: Object[ ] Optional - List of items to be added to the vector object.

  • addNulls: String Optional - Specifies whether a null item can be added to the vector object. Set to:

    • false to prevent null values from being added to the vector object. This is the default.

    • true to allow null values to be added to the vector object.

Output parameters for addItemToVector

  • vector: java.util.Vector - Updated vector object with the list of items added or an empty vector in case no items are added.

Usage notes for addItemToVector

Either of the optional input parameters, item or itemList, is required.

appendToDocumentList

Adds documents to a document list.

Input parameters for appendToDocumentList

  • toList: Document List Optional - List to which you want to append documents. If you do not specify toList, the service creates a new list.

  • fromList: Document List Optional - Documents you want to append to the end of toList.

  • fromItem: Document Optional - Document you want to append to the end of toList. If you specify both fromList and fromItem, the service adds the document specified in fromItem after the documents in fromList.

Output Parameters for appendToDocumentList

  • toList: Document List - The toList document list with the documents in fromList and fromItem appended to it.

Usage Notes for appendToDocumentList

The documents contained in fromList and fromItem are not actually appended as entries to toList. Instead, references to the documents in fromList and fromItem are appended as entries to toList. Consequently, any changes made to the documents in fromList and fromItem also affect the resulting toList.

appendToStringList

Adds Strings to a String list.

Input parameters for appendToStringList

  • toList: String List Optional - List to which you want to append Strings. If the value of toList is null, a null pointer exception error is thrown. If you do not specify toList, the service creates a new list.

  • fromList: String List Optional - List of Strings to add to toList. Strings are added after the entries of toList.

  • fromItem: String Optional - String you want to append to the end of toList. If you specify both fromList and fromItem, the service adds the String specified in fromItem after the Strings specified in fromList.

Output parameters for appendToStringList

  • toList: String List - The toList String list with the Strings from fromList and fromItem appended to it.

Usage notes for appendToStringList

The Strings contained in fromList and fromItem are not actually appended as entries to toList. Instead, references to the Strings in fromList and fromItem are appended as entries to toList. Consequently, any changes made to the Strings in fromList and fromItem also affect the resulting toList.

sizeOfList

Returns the number of elements in a list.

Input parameters for sizeOfList

  • fromList: Document List, String List, or Object List Optional - List whose size you want to discover. If fromList is not specified, the service returns a size of 0.

Output parameters for sizeOfList

  • size: String - Number of entries in fromList.

  • fromList: Document List, String List, or Object List - Original list.

Usage notes for sizeOfList

For example, if fromList consists of:

  • fromList[0] = "a"
  • fromList[1] = "b"
  • fromList[2] = "c"

The result would be:

  • size="3"

stringListToDocumentList

Converts a String list to a document list.

Input parameters for stringListToDocumentList

  • fromList: String List Optional - List of Strings (a String[ ]) that you want to convert to a list of documents. If fromList is not specified, the service returns a zero length array for toList.

  • key: String Optional - Key name to use in the generated document list.

Output parameters for stringListToDocumentList

  • toList: Document List - Resulting document list.

Usage notes for stringListToDocumentList

Creates a document list containing one document for each element in the fromList. Each document will contain a single String element named key.

vectorToArray

Converts a java.util.Vector object to an array.

Input parameters for vectorToArray

  • vector: java.util.Vector - The object to be converted to an array.
  • stronglyType: String Optional - If this option is specified, the service expects all items in the vector to have the same Java™ type as the first non-null item in the vector. If the service detects an item of a different type, an error appears. Set to:
    • false to convert the vector to an object array. This is the default.
    • true to convert the vector to a strongly typed array holding the same type of objects.

Output parameters for vectorToArray

  • array: Object[ ] - Converted object array.