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 LibraryObjectLookupCache

    java.lang.Object
      oracle.ifs.common.LibraryObjectLookupCache

    public class LibraryObjectLookupCache

extends java.lang.Object

A LibraryObjectLookupCache provides for the caching of instances of a certain class by their unique name.

Constructor Summary
`LibraryObjectLookupCache(java.lang.String className, java.lang.String nameAttribute, java.lang.String nameColumn, boolean caseSensitive, boolean selectbyUpper, int maxCachedItems)` Construct a LibraryObjectLookupCache.
`LibraryObjectLookupCache(java.lang.String className, java.lang.String nameAttribute, java.lang.String nameColumn, java.lang.String key, boolean caseSensitive, boolean selectbyUpper, int maxCachedItems, java.lang.String extraQual, java.lang.String orderBy)` Construct a LibraryObjectLookupCache.

Method Summary
`LibraryObjectInterface[]` | `findAll(LibrarySessionInterface session)` Finds all qualifying objects.
`LibraryObjectInterface` | `findByName(LibrarySessionInterface session, java.lang.String name)` Finds an object with the specified name.
`protected java.lang.String` | `getExtraQualification(LibrarySessionInterface session)` Gets the extra search qualification to use, if any.
`protected java.lang.String` | `getFindAllStatementKey(LibrarySessionInterface session)` Gets the key to use for caching the "find all" statement.
`protected java.lang.String` | `getFindStatementKey(LibrarySessionInterface session)` Gets the key to use for caching the "find" statement.
`static LibraryObjectLookupCache` | `getInstance(LibrarySessionInterface session, java.lang.String key)` Gets a registered instance by key, using the service context associated with the specified session.
`void` | `registerInstance(LibrarySessionInterface session, java.lang.String key)` Register an instance by key, using the service context associated with the specified session.
`protected LibraryObjectInterface` | `validateObject(LibrarySessionInterface session, java.lang.String name, LibraryObjectInterface obj)` Validate the specified object, making sure that it is still persistent and matches the specified name.

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

Constructor Detail

### LibraryObjectLookupCache

    public LibraryObjectLookupCache(java.lang.String className,
                                    java.lang.String nameAttribute,
                                    java.lang.String nameColumn,
                                    boolean caseSensitive,
                                    boolean selectbyUpper,
                                    int maxCachedItems)

  Construct a LibraryObjectLookupCache.

  Parameters:
    `className` - the class name to be used for the lookup
    `nameAttribute` - the name of the attribute being used as the lookup
    `nameColumn` - the name of the column being used as the lookup; a null indicates that the column is same as the attribute name
    `caseSensitive` - whether the lookup should be case sensitive
    `selectbyUpper` - whether the selection requires a nls_upper clause; only valid when caseSensitive is false
    `maxCachedItems` - max number of items to cache; 0 indicates unlimited

### LibraryObjectLookupCache

    public LibraryObjectLookupCache(java.lang.String className,
                                    java.lang.String nameAttribute,
                                    java.lang.String nameColumn,
                                    java.lang.String key,
                                    boolean caseSensitive,
                                    boolean selectbyUpper,
                                    int maxCachedItems,
                                    java.lang.String extraQual,
                                    java.lang.String orderBy)

  Construct a LibraryObjectLookupCache.

  Parameters:
    `className` - the class name to be used for the lookup
    `nameAttribute` - the name of the attribute being used as the lookup
    `nameColumn` - the name of the column being used as the lookup; a null indicates that the column is same as the attribute name
    `key` - the key that uniquely identifies this type of LibraryObjectLookupCache; if null, derive from other settings
    `caseSensitive` - whether the lookup should be case sensitive
    `selectbyUpper` - whether the selection requires a nls_upper clause; only valid when caseSensitive is false
    `maxCachedItems` - max number of items to cache; 0 indicates unlimited
    `extraQual` - extra search qualifcation used in both findAll() and findByName(); null indicates no additional qual
    `orderBy` - sort qualifcation used for findAll(); null means order by the specified name column

Method Detail

### registerInstance

    public void registerInstance(LibrarySessionInterface session,
                                 java.lang.String key)
                          throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Register an instance by key, using the service context associated with the specified session.

  Parameters:
    `session` - the session context
    `key` - the key used to register the instance
  Throws:
    `IfsException` - if the operation fails

### getInstance

    public static LibraryObjectLookupCache getInstance(LibrarySessionInterface session,
                                                       java.lang.String key)
                                                throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Gets a registered instance by key, using the service context associated with the specified session.

  Parameters:
    `session` - the session context
    `key` - the key used in registering the instance
  Returns:
    the registered LibraryObjectLookupCache instance that matches the specified key, or null if none
  Throws:
    `IfsException` - if the operation fails

### findByName

    public LibraryObjectInterface findByName(LibrarySessionInterface session,
                                             java.lang.String name)
                                      throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Finds an object with the specified name.

  Parameters:
    `session` - the session context
    `name` - the name of the desired object
  Returns:
    an object matching the requested name, or null if no such object exists
  Throws:
    `IfsException` - if the operation fails

### findAll

    public LibraryObjectInterface[] findAll(LibrarySessionInterface session)
                                     throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Finds all qualifying objects.

  The array of objects returned is potentially filtered by the search qualification specifying during construction. The objects are sorted by the sort qualification specified at construction, or sorted by the name column by default.

  Parameters:
    `session` - the session context
  Returns:
    all qualifying objects; returns null if there are no objects
  Throws:
    `IfsException` - if the operation fails

### getExtraQualification

    protected java.lang.String getExtraQualification(LibrarySessionInterface session)
                                              throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Gets the extra search qualification to use, if any.

  Can be overridden by subclasses to provide dynamic qualification if needed.

  Parameters:
    `session` - the session context
  Returns:
    the extra search qualification, or null if none
  Throws:
    `IfsException` - if the operation fails

### getFindStatementKey

    protected java.lang.String getFindStatementKey(LibrarySessionInterface session)
                                            throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Gets the key to use for caching the "find" statement.

  Can be overridden by subclasses to provide dynamic qualification if needed.

  Parameters:
    `session` - the session context
  Returns:
    the "find" statement key to use, or null if no statement caching should be performed
  Throws:
    `IfsException` - if the operation fails

### getFindAllStatementKey

    protected java.lang.String getFindAllStatementKey(LibrarySessionInterface session)
                                               throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Gets the key to use for caching the "find all" statement.

  Can be overridden by subclasses to provide dynamic qualification if needed.

  Parameters:
    `session` - the session context
  Returns:
    the "find all" statement key to use, or null if no statement caching should be performed
  Throws:
    `IfsException` - if the operation fails

### validateObject

    protected LibraryObjectInterface validateObject(LibrarySessionInterface session,
                                                    java.lang.String name,
                                                    LibraryObjectInterface obj)
                                             throws IfsException

  Description copied from class: `LibraryObjectLookupCache`
  Validate the specified object, making sure that it is still persistent and matches the specified name.

  Can be extended by subclasses to provide additional validation.

  Parameters:
    `session` - the session context
    `name` - the name to check for a match
    `obj` - the object to validate
  Returns:
    the same object that was specified, or null if the object is not valid
  Throws:
    `IfsException` - if the operation fails

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