edu.unh.sdb.common
Class RecordSpec

java.lang.Object
  extended by edu.unh.sdb.common.RecordSpec
Direct Known Subclasses:
DSRecordSpec

public class RecordSpec
extends java.lang.Object

A RecordSpec holds an array of integers, where each integer specifies the field number of a desired attribute. Typically, a RecordSpec will be an argument to a query method, specifying which point attributes should be returned.


Field Summary
protected  int[] fieldNumbers
           
protected  FieldIDMapper fim
           
 
Constructor Summary
RecordSpec(int len)
          Constructor that creates an identity mapping of the specified length.
RecordSpec(int[] specs)
          Constructor that takes an array of ints
 
Method Summary
 FieldIDMapper getFieldIDMapper()
          Returns the FieldIDMapper equivalent to this RecordSpec
 int getFieldNumber(int index)
          Returns the FieldSpec at the index position.
 int[] getFieldNumbers()
          get the field number array
 int getIndexedFieldNumber(int index)
          Deprecated. Use getFieldNumber( int )
 int size()
          Returns the number of FieldIDs in the RecordSpec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldNumbers

protected int[] fieldNumbers

fim

protected FieldIDMapper fim
Constructor Detail

RecordSpec

public RecordSpec(int[] specs)
Constructor that takes an array of ints


RecordSpec

public RecordSpec(int len)
Constructor that creates an identity mapping of the specified length. This is convenient for code sharing when there is no specified RecordSpec

Method Detail

getIndexedFieldNumber

public final int getIndexedFieldNumber(int index)
Deprecated. Use getFieldNumber( int )

Returns the FieldSpec at the index position.


getFieldIDMapper

public final FieldIDMapper getFieldIDMapper()
Returns the FieldIDMapper equivalent to this RecordSpec


getFieldNumber

public final int getFieldNumber(int index)
Returns the FieldSpec at the index position.


getFieldNumbers

public int[] getFieldNumbers()
get the field number array


size

public int size()
Returns the number of FieldIDs in the RecordSpec.