org.netbeans.mdr.persistence
Interface Index

All Known Subinterfaces:
MultivaluedIndex, MultivaluedOrderedIndex, SinglevaluedIndex
All Known Implementing Classes:
Btree, BtreeDatabase, MultivaluedBtree, MultivaluedOrderedBtree, SinglevaluedBtree

public interface Index

Representation of index in the Storage.

Version:
1.0
Author:
Pavel Buzek

Method Summary
 void add(java.lang.Object key, java.lang.Object value)
          Adds the specified value to values associated in this index with the specified key.
 Storage.EntryType getKeyType()
          Returns the type of keys in index.
 java.lang.String getName()
          Returns the unique name of the index in the Storage.
 Storage.EntryType getValueType()
          Returns the type of values indexed by this index.
 java.util.Set keySet()
          Returns a set view of the keys contained in this index.
 boolean remove(java.lang.Object key)
          Removes all values assosiated in the index with specified key.
 

Method Detail

getName

public java.lang.String getName()
                         throws StorageException
Returns the unique name of the index in the Storage.

Returns:
Throws:
StorageException

getValueType

public Storage.EntryType getValueType()
                               throws StorageException
Returns the type of values indexed by this index.

Returns:
Throws:
StorageException

getKeyType

public Storage.EntryType getKeyType()
                             throws StorageException
Returns the type of keys in index.

Returns:
Throws:
StorageException

keySet

public java.util.Set keySet()
                     throws StorageException
Returns a set view of the keys contained in this index. Returned set is read only and may not be modified.

Returns:
keys contained in this index
Throws:
StorageException

add

public void add(java.lang.Object key,
                java.lang.Object value)
         throws StorageException
Adds the specified value to values associated in this index with the specified key. If the index puts limit on number of values associated with one key and adding value would break this limit, it throws StorageBadRequestException.

Parameters:
key -
value -
Throws:
StorageException

remove

public boolean remove(java.lang.Object key)
               throws StorageException
Removes all values assosiated in the index with specified key.

Parameters:
key -
Returns:
true if this index changed as a result of this call
Throws:
StorageException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.