Oracle Content Management SDK

oracle.ifs.common
Class CachedCollection

java.lang.Object
  |
  +--oracle.ifs.common.CachedCollection
All Implemented Interfaces:
Collection, IfsEventHandler
Direct Known Subclasses:
CachedResolverCollection, CachedSelectorCollection

public abstract class CachedCollection
extends java.lang.Object
implements Collection

A CachedCollection is a Collection whose items are cached for performance.

CachedCollection defers resolving its items until they are requested. Because the items are cached, CachedCollection may consume excessive Java heap for large collections.


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.
 void handleEvent(IfsEvent event)
          Handles the specified event.
 

Method Detail


getItemCount

public final int getItemCount()
                       throws IfsException
Gets the number of items in this Collection.
Specified by:
getItemCount in interface 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.
Specified by:
getItems in interface 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.
Specified by:
getItems in interface 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.
Specified by:
getItems in interface 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().

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

handleEvent

public void handleEvent(IfsEvent event)
                 throws IfsException
Handles the specified event. This results in the Collection being reset.
Specified by:
handleEvent in interface IfsEventHandler
Parameters:
event - the event
Throws:
IfsException - if the operation fails

Oracle Content Management SDK

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