org.jcon.data
Class FieldIndex

java.lang.Object
  extended by org.jcon.data.FieldIndex
All Implemented Interfaces:
LookupIndex, MakeupIndex

public class FieldIndex
extends java.lang.Object
implements MakeupIndex

An index for looking up a record based on the values of some of its fields.


Constructor Summary
FieldIndex()
           
 
Method Summary
 void addFieldOfInterest(java.lang.String newField)
          Adds a field of interest.
 java.util.ArrayList getFieldsOfInterest()
          Gets the fields of interest.
 java.lang.Class getMakeupClass()
          Gets the class used to make up objects.
 java.lang.Object keyOf(java.lang.Object victim)
          Returns a key consisting of a set of field->value mappings.
 java.lang.Object makeupObject(java.lang.Object key)
          Makes up a new object by setting the fields to match those listed in the key (which must be a Map!).
 void setFieldsOfInterest(java.util.ArrayList newFields)
          Sets the fields of interest.
 void setMakeupClass(java.lang.Class newClass)
          Sets the class used to make up objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldIndex

public FieldIndex()
Method Detail

keyOf

public java.lang.Object keyOf(java.lang.Object victim)
Returns a key consisting of a set of field->value mappings.

Specified by:
keyOf in interface LookupIndex

makeupObject

public java.lang.Object makeupObject(java.lang.Object key)
Makes up a new object by setting the fields to match those listed in the key (which must be a Map!).

Specified by:
makeupObject in interface MakeupIndex

addFieldOfInterest

public void addFieldOfInterest(java.lang.String newField)
Adds a field of interest.


setFieldsOfInterest

public void setFieldsOfInterest(java.util.ArrayList newFields)
Sets the fields of interest.


getFieldsOfInterest

public java.util.ArrayList getFieldsOfInterest()
Gets the fields of interest.


setMakeupClass

public void setMakeupClass(java.lang.Class newClass)
Sets the class used to make up objects.


getMakeupClass

public java.lang.Class getMakeupClass()
Gets the class used to make up objects.