com.rocketsoftware.mvapi
Class MVIndex

java.lang.Object
  extended by com.rocketsoftware.mvapi.MVIndex

public class MVIndex
extends java.lang.Object

Provides access to Multivalue file indexes.


Constructor Summary
MVIndex(MVConnection connection, java.lang.String fileName, java.lang.String indexName)
          Constructs an index object.
 
Method Summary
 void fileCloseRoot()
          Closes the index on the server.
 void fileKey(java.lang.String operator)
          Locates an item id using a B-tree index key.
 java.lang.String getFileName()
          Returns the file name.
 java.lang.String getIndexName()
          Returns the index name.
 java.lang.String getItemId()
          Returns the index search ItemId.
 java.lang.String getKey()
          Returns the index search key.
 void setItemId(java.lang.String ItemId)
          Sets the index search ItemId.
 void setKey(java.lang.String key)
          Sets the index search key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MVIndex

public MVIndex(MVConnection connection,
               java.lang.String fileName,
               java.lang.String indexName)
        throws MVException
Constructs an index object.

Parameters:
fileName - name of the file
indexName - name of the index
Throws:
MVException - if any errors occur
Method Detail

setKey

public void setKey(java.lang.String key)
Sets the index search key.

Parameters:
key - to begin searching on

getKey

public java.lang.String getKey()
Returns the index search key.

Returns:
current key

setItemId

public void setItemId(java.lang.String ItemId)
Sets the index search ItemId.

Parameters:
ItemId - to begin searching on

getItemId

public java.lang.String getItemId()
Returns the index search ItemId.

Returns:
current ItemId

getFileName

public java.lang.String getFileName()
Returns the file name.

Returns:
the file name

getIndexName

public java.lang.String getIndexName()
Returns the index name.

Returns:
the index name

fileKey

public void fileKey(java.lang.String operator)
             throws MVException
Locates an item id using a B-tree index key. This method executes a Key command on the server, then updates the key and itemId values with the result of the Key command. These values can then be retrieved using getKey() and getItemId() methods.

Parameters:
operator - The index operator (e.g. C, N, P)
Throws:
MVException - if any errors occur

fileCloseRoot

public void fileCloseRoot()
                   throws MVException
Closes the index on the server.

Throws:
MVException