Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.common
Class UncachedSelectorCollection

    java.lang.Object
      oracle.ifs.common.UncachedSelectorCollection

All Implemented Interfaces:
  Collection, IfsEventHandler

    public class UncachedSelectorCollection

extends java.lang.Object
implements Collection

An UncachedSelectorCollection is a Collection whose items are LIBRARYOBJECTs specified by a Selector or S_Selector and not cached by the collection.

By not caching its items, an UncachedSelectorCollection maintains a small memory footprint. However, each use of the collection causes a database roundtrip, making UncachedSelectorCollection less performant than CachedSelectorCollection.

The order of items returned by `getItems()` and `getItemsVector()` is determined by the sort specification of the Selector or S_Selector. The method `getItems(int)` is implemented in terms of `getItems()`. For best performance in iterating over the items of the collection, call `getItems()` once instead of `getItems(int)` repeatedly.

The LIBRARYOBJECTs returned by the Selector or S_Selector must have a Name attribute. Use `getItems(String)` to look up an item by name. This lookup is case-insentive. If more than one item has the same case-insensitive name, `getItems(String)` returns an arbitrary item with that name.

The performance of `getItems(String)` can be improved by enabling a mini-cache of the "n" items most-recently returned by this method. The size of this mini-cache is specified by a constructor argument.

(Published)

Field Summary
`protected java.lang.Class` | `m_Class` The class of the objects in this Collection.
`protected int` | `m_ItemCount` The number of items in this collection, or -1 if unknown.
`protected int` | `m_MaximumRecentItems` The maximum length of m_RecentItems.
`protected java.lang.String` | `m_NameExpression` The SQL expression for the specified Selector or S_Selector that evaluates to the uppercase name of the item.
`protected oracle.ifs.common.UncachedSelectorCollection.ItemLink` | `m_RecentItems` A linked list of the "n" items most recently returned by getItems(String), with the most recent at the head and the least recent at the tail of the list.
`protected Selector` | `m_Selector` The Selector used to obtain the items in this Collection (if this is a collection of LibraryObjects).
`protected S_Selector` | `m_SSelector` The S_Selector used to obtain the items in this Collection (if this is a collection of S_LibraryObjects).

Constructor Summary
`UncachedSelectorCollection(S_Selector selector, java.lang.String nameExpression, java.lang.String className, int maximumRecentItems)` Constructs a collection of S_LibraryObjects.
`UncachedSelectorCollection(Selector selector, java.lang.String nameExpression, java.lang.String className, int maximumRecentItems)` Constructs a collection of LibraryObjects.

Method Summary
`java.lang.Object` | `checkItemByUpperCaseName(java.lang.String upperCaseName)` Gets the specified item in this Collection by uppercase name, and returns null if not found.
`java.lang.Object` | `getItemByUpperCaseName(java.lang.String upperCaseName)` Gets the specified item in this Collection by uppercase name.
`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.
`void` | `reset()` Resets this Collection.
`protected void` | `resolve()` Ensures the items in this Collection are resolved.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_Class

    protected java.lang.Class m_Class

  Description copied from class: `UncachedSelectorCollection`
  The class of the objects in this Collection.

  The value returned by getItems() can be cast to an array of this type.

  (Unpublished)

### m_SSelector

    protected S_Selector m_SSelector

  Description copied from class: `UncachedSelectorCollection`
  The S_Selector used to obtain the items in this Collection (if this is a collection of S_LibraryObjects).

  (Unpublished)

### m_Selector

    protected Selector m_Selector

  Description copied from class: `UncachedSelectorCollection`
  The Selector used to obtain the items in this Collection (if this is a collection of LibraryObjects).

  (Unpublished)

### m_NameExpression

    protected java.lang.String m_NameExpression

  Description copied from class: `UncachedSelectorCollection`
  The SQL expression for the specified Selector or S_Selector that evaluates to the uppercase name of the item.

  (Unpublished)

### m_ItemCount

    protected int m_ItemCount

  Description copied from class: `UncachedSelectorCollection`
  The number of items in this collection, or -1 if unknown.

  (Unpublished)

### m_RecentItems

    protected oracle.ifs.common.UncachedSelectorCollection.ItemLink m_RecentItems

  Description copied from class: `UncachedSelectorCollection`
  A linked list of the "n" items most recently returned by getItems(String), with the most recent at the head and the least recent at the tail of the list.

  (Unpublished)

### m_MaximumRecentItems

    protected int m_MaximumRecentItems

  Description copied from class: `UncachedSelectorCollection`
  The maximum length of m_RecentItems.

  (Unpublished)

Constructor Detail

### UncachedSelectorCollection

    public UncachedSelectorCollection(S_Selector selector,
                                      java.lang.String nameExpression,
                                      java.lang.String className,
                                      int maximumRecentItems)
                               throws IfsException

  Constructs a collection of S_LibraryObjects.

  Parameters:
    `selector` - the S_Selector used to obtain the items in the Collection
    `nameExpression` - the SQL expression for the S_Selector that evaluates to the uppercased name of an item
    `className` - the full classname of the objects in this Collection; must be S_LibraryObject or a subclass of S_LibraryObject; if null, S_LibraryObject is used
    `maximumRecentItems` - the maximum number of items recently returned by `getItems(String)` to cache; typical values are 1 to 50, or 0 to disable caching
  Throws:
    `IfsException` - (IFS-12210) if the operation fails
  (Unpublished)

### UncachedSelectorCollection

    public UncachedSelectorCollection(Selector selector,
                                      java.lang.String nameExpression,
                                      java.lang.String className,
                                      int maximumRecentItems)
                               throws IfsException

  Constructs a collection of LibraryObjects.

  Parameters:
    `selector` - the Selector used to obtain the items in the Collection
    `nameExpression` - the SQL expression for the Selector that evaluates to the uppercased name of an item
    `className` - the full classname of the objects in this Collection; must be LibraryObject or a subclass of LibraryObject; if null, LibraryObject is used
    `maximumRecentItems` - the maximum number of items recently returned by `getItems(String)` to cache; typical values are 1 to 50, or 0 to disable caching
  Throws:
    `IfsException` - (IFS-12210) if the operation fails
  (Unpublished)

Method Detail

### getItemCount

    public int getItemCount()
                     throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  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
  (Published)

### getItems

    public java.lang.Object[] getItems()
                                throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  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
  (Published)

### getItems

    public java.lang.Object getItems(int index)
                              throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  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
  (Published)

### getItems

    public java.lang.Object getItems(java.lang.String name)
                              throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  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
  (Published)

### getItemByUpperCaseName

    public java.lang.Object getItemByUpperCaseName(java.lang.String upperCaseName)
                                            throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  Gets the specified item in this Collection by uppercase name.

  Specified by:
    `getItemByUpperCaseName` in interface `Collection`
  Parameters:
    `upperCaseName` - the name of the item
  Returns:
    the item
  Throws:
    `IfsException` - (IFS-12214) if the operation fails
  (Unpublished)

### checkItemByUpperCaseName

    public java.lang.Object checkItemByUpperCaseName(java.lang.String upperCaseName)
                                              throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  Gets the specified item in this Collection by uppercase name, and returns null if not found.

  Specified by:
    `checkItemByUpperCaseName` in interface `Collection`
  Parameters:
    `upperCaseName` - the name of the item
  Returns:
    the item, or null if not found
  Throws:
    `IfsException` - (IFS-12214) if the operation fails
  (Unpublished)

### getItemsVector

    public java.util.Vector getItemsVector()
                                    throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  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
  (Published)

### reset

    public void reset()
               throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  Resets this Collection.

  Resetting a Collection causes the items in it to be redetermined.

  Specified by:
    `reset` in interface `Collection`
  Throws:
    `IfsException` - (IFS-12216) if the operation fails
  (Unpublished)

### resolve

    protected final void resolve()
                          throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  Ensures the items in this Collection are resolved.

  Throws:
    `IfsException` - (IFS-12201) if the operation fails
  (Unpublished)

### handleEvent

    public void handleEvent(IfsEvent event)
                     throws IfsException

  Description copied from class: `UncachedSelectorCollection`
  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
  (Published)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD