org.apache.directory.server.core.partition.impl.btree
Class IndexRecord

java.lang.Object
  extended by org.apache.directory.server.core.partition.impl.btree.IndexRecord

public class IndexRecord
extends java.lang.Object

An index key value pair based on a tuple which can optionally reference the indexed entry if one has been resusitated.

Version:
$Rev: 493916 $
Author:
Apache Directory Project

Constructor Summary
IndexRecord()
           
 
Method Summary
 void clear()
          Clears the tuple key, the tuple value and the entry fields.
 void copy(IndexRecord record)
          Utility method used to copy the contents of one IndexRecord into this IndexRecord.
 javax.naming.directory.Attributes getAttributes()
          Gets the entry of this IndexRecord if one was resusitated form the master table.
 java.math.BigInteger getEntryId()
          Gets the entry id for this IndexRecord.
 java.lang.Object getIndexKey()
          Gets the index key ( the attribute's value ) for this IndexRecord.
 void setAttributes(javax.naming.directory.Attributes entry)
          Sets the entry's attributes.
 void setEntryId(java.math.BigInteger id)
          Sets the entry id.
 void setIndexKey(java.lang.Object key)
          Sets the index key.
 void setSwapped(Tuple tuple, javax.naming.directory.Attributes entry)
          Sets the key value tuple but swapping the key and the value and optionally adding the entry if one was resusitated.
 void setTuple(Tuple tuple, javax.naming.directory.Attributes entry)
          Sets the key value tuple represented by this IndexRecord optionally setting the entry if one was resusitated from the master table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexRecord

public IndexRecord()
Method Detail

setTuple

public void setTuple(Tuple tuple,
                     javax.naming.directory.Attributes entry)
Sets the key value tuple represented by this IndexRecord optionally setting the entry if one was resusitated from the master table.

Parameters:
tuple - the tuple for the IndexRecord
entry - the resusitated entry if any

setSwapped

public void setSwapped(Tuple tuple,
                       javax.naming.directory.Attributes entry)
Sets the key value tuple but swapping the key and the value and optionally adding the entry if one was resusitated.

Parameters:
tuple - the tuple for the IndexRecord
entry - the resusitated entry if any

getEntryId

public java.math.BigInteger getEntryId()
Gets the entry id for this IndexRecord.

Returns:
the id of the entry indexed

getIndexKey

public java.lang.Object getIndexKey()
Gets the index key ( the attribute's value ) for this IndexRecord.

Returns:
the key of the entry indexed

setEntryId

public void setEntryId(java.math.BigInteger id)
Sets the entry id.

Parameters:
id - the id of the entry

setIndexKey

public void setIndexKey(java.lang.Object key)
Sets the index key.

Parameters:
key - the key of the IndexRecord

getAttributes

public javax.naming.directory.Attributes getAttributes()
Gets the entry of this IndexRecord if one was resusitated form the master table.

Returns:
the entry's attributes

setAttributes

public void setAttributes(javax.naming.directory.Attributes entry)
Sets the entry's attributes.

Parameters:
entry - the entry's attributes

clear

public void clear()
Clears the tuple key, the tuple value and the entry fields.


copy

public void copy(IndexRecord record)
Utility method used to copy the contents of one IndexRecord into this IndexRecord.

Parameters:
record - the record whose contents we copy


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.