Oracle Content Management SDK

oracle.ifs.common
Interface Collection

All Superinterfaces:
IfsEventHandler
All Known Implementing Classes:
CachedCollection, UncachedSelectorCollection

public interface Collection
extends IfsEventHandler

A Collection is a set of Java objects.

iFS uses Collections to provide an easy-to-use API to access various sets of LIBRARYOBJECTs. LibrarySession and S_LibrarySession provide several methods, getcollectionCollection, to access the Collections they maintain.

Collection implementations may cache the items they contain. For this reason, Collections are more performant than Selectors or S_Selectors.

For performance, applications iterating over the items in a Collection should use getItems() rather than getItems(int).


Method Summary
 int getItemCount()
          Gets the number of items in this Collection.
 java.lang.Object[] getItems()
          Gets an array containing the items in this Collection.
 java.lang.Object getItems(int index)
          Gets the specified item in this Collection.
 java.lang.Object getItems(java.lang.String name)
          Gets the specified item in this Collection.
 java.util.Vector getItemsVector()
          Gets a vector containing the items in this Collection.
 
Methods inherited from interface oracle.ifs.common.IfsEventHandler
handleEvent
 

Method Detail


getItemCount

public int getItemCount()
                 throws IfsException
Gets the number of items in this Collection.
Returns:
the number of items in this Collection
Throws:
IfsException - (IFS-12211) if the operation fails

getItems

public java.lang.Object[] getItems()
                            throws IfsException
Gets an array containing the items in this Collection.
Returns:
the items in this Collection
Throws:
IfsException - (IFS-12212) if the operation fails

getItems

public java.lang.Object getItems(int index)
                          throws IfsException
Gets the specified item in this Collection.
Parameters:
index - the zero-based index of the item
Returns:
the item
Throws:
IfsException - (IFS-12213) if the operation fails

getItems

public java.lang.Object getItems(java.lang.String name)
                          throws IfsException
Gets the specified item in this Collection.
Parameters:
name - the name of the item
Returns:
the item
Throws:
IfsException - (IFS-12214) if the operation fails

getItemsVector

public java.util.Vector getItemsVector()
                                throws IfsException
Gets a vector containing the items in this Collection.

The order of the items in the vector is identical to the order of the items in the array returned by getItems().

Returns:
a vector containing the items in this Collection
Throws:
IfsException - (IFS-12215) if the operation fails

Oracle Content Management SDK

(c) 2002 Copyright Oracle Corporation. All rights reserved.