Node Director
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
sfi.director.repository.DBSetIndex Class Reference

implements a search index for lists of DBObjects. More...

Public Member Functions

 DBSetIndex ()
 DBSetIndex (String attr)
String searchAttr ()
String searchAttr (String attr)
synchronized void resetIndex ()
synchronized void add (DBObject dbo)
void add (Enumeration elements)
void add (Vector elements)
synchronized void remove (DBObject dbo)
DBObject getFirst (String key)
 get the first matching object for a specific key.
DBObject getFirst (DBObject keyObj)
 get the first object being associated with the keys in the keyObj.
Vector get (String key)
 get a Vector of matching DBObjects for a specific key.
Vector get (DBObject keyObj)
 get a Vector of all DBObjects associated with one of the keys in the keyObj.
Vector get (Pattern search)
 get a Vector of matching DBObjects for a specific key regex.

Public Attributes

final String EMPTY = ""

Protected Member Functions

Vector indexKeys (DBObject dbo)

Protected Attributes

Hashtable index = new Hashtable()
String searchAttr = null

Detailed Description

implements a search index for lists of DBObjects.

Builds an index of DBObjects for fast searching of DBObjects with one attribute as the search key.

Constructor & Destructor Documentation

sfi.director.repository.DBSetIndex.DBSetIndex ( )
sfi.director.repository.DBSetIndex.DBSetIndex ( String  attr)

Member Function Documentation

synchronized void sfi.director.repository.DBSetIndex.add ( DBObject  dbo)
void sfi.director.repository.DBSetIndex.add ( Enumeration  elements)
void sfi.director.repository.DBSetIndex.add ( Vector  elements)
Vector sfi.director.repository.DBSetIndex.get ( String  key)
Vector sfi.director.repository.DBSetIndex.get ( DBObject  keyObj)

get a Vector of all DBObjects associated with one of the keys in the keyObj.

Returns an empty Vector if no matching object was found.

References sfi.director.repository.DBSetIndex.indexKeys(), and sfi.director.repository.DBSetIndex.searchAttr().

Vector sfi.director.repository.DBSetIndex.get ( Pattern  search)

get a Vector of matching DBObjects for a specific key regex.

Returns an empty vector if no matching object was found.

References sfi.director.repository.DBSetIndex.index.

DBObject sfi.director.repository.DBSetIndex.getFirst ( String  key)
DBObject sfi.director.repository.DBSetIndex.getFirst ( DBObject  keyObj)

get the first object being associated with the keys in the keyObj.

Returns null if no matching object was found.

References sfi.director.repository.DBSetIndex.getFirst(), sfi.director.repository.DBSetIndex.indexKeys(), and sfi.director.repository.DBSetIndex.searchAttr().

Vector sfi.director.repository.DBSetIndex.indexKeys ( DBObject  dbo)
protected
synchronized void sfi.director.repository.DBSetIndex.remove ( DBObject  dbo)
synchronized void sfi.director.repository.DBSetIndex.resetIndex ( )
String sfi.director.repository.DBSetIndex.searchAttr ( )
String sfi.director.repository.DBSetIndex.searchAttr ( String  attr)

Member Data Documentation

final String sfi.director.repository.DBSetIndex.EMPTY = ""
Hashtable sfi.director.repository.DBSetIndex.index = new Hashtable()
protected
String sfi.director.repository.DBSetIndex.searchAttr = null
protected

The documentation for this class was generated from the following file: