org.xBaseJ.indexes
Class Index

java.lang.Object
  extended byorg.xBaseJ.indexes.Index
Direct Known Subclasses:
MDX, NDX

public abstract class Index
extends Object


Field Summary
 NodeKey activeKey
           
 java.nio.ByteBuffer bytebuffer
           
 java.nio.channels.FileChannel channel
           
 DBF database
           
 String dosname
           
 File file
           
static int findAnyKey
           
static int findFirstMatchingKey
           
 boolean foundExact
           
static int foundMatchingKeyButNotRecord
           
 byte[] key_definition
           
 short key_entry_size
           
 short key_length
           
 short key_per_Node
           
 Vector keyControl
           
static int keyNotFound
           
 char keyType
           
 int next_available
           
 RandomAccessFile nfile
           
 int record
           
 byte reserved_01
           
 int reserved_02
           
 byte reserved_03
           
 byte reserved_04
           
 String stringKey
           
 int top_Node
           
 Node topNode
           
 byte unique_key
           
 Node workNode
           
 
Constructor Summary
Index()
           
 
Method Summary
 int add_entry(int recno)
           
abstract  int add_entry(NodeKey key, int recno)
           
 NodeKey build_key()
           
 String buildKey()
           
 void check_for_duplicates(int count)
           
 boolean compareKey(String keyToCompare)
           
abstract  void del_entry(Node inNode)
           
 boolean didFindFindExact()
          return to return if the find_entry function found the exact key requested
abstract  int find_entry(NodeKey key)
           
abstract  int find_entry(NodeKey key, int recno)
           
 int find_entry(String key)
           
 int find_entry(String key, int recno)
           
 NodeKey get_active_key()
           
abstract  int get_next_key()
           
abstract  int get_prev_key()
           
 String getKeyFields()
           
 String getName()
           
 boolean is_unique_key()
           
 void position_at_first()
           
 void position_at_last()
           
abstract  void reIndex()
           
 void set_active_key(NodeKey key)
           
 void set_key_definition(String definition)
           
 void update(int recno)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

top_Node

public int top_Node

next_available

public int next_available

reserved_02

public int reserved_02

key_length

public short key_length

key_per_Node

public short key_per_Node

keyType

public char keyType

key_entry_size

public short key_entry_size

reserved_01

public byte reserved_01

reserved_03

public byte reserved_03

reserved_04

public byte reserved_04

unique_key

public byte unique_key

key_definition

public byte[] key_definition

keyControl

public Vector keyControl

activeKey

public NodeKey activeKey

record

public int record

topNode

public Node topNode

workNode

public Node workNode

file

public File file

nfile

public RandomAccessFile nfile

channel

public java.nio.channels.FileChannel channel

bytebuffer

public java.nio.ByteBuffer bytebuffer

dosname

public String dosname

database

public DBF database

stringKey

public String stringKey

findFirstMatchingKey

public static final int findFirstMatchingKey
See Also:
Constant Field Values

findAnyKey

public static final int findAnyKey
See Also:
Constant Field Values

keyNotFound

public static final int keyNotFound
See Also:
Constant Field Values

foundMatchingKeyButNotRecord

public static final int foundMatchingKeyButNotRecord
See Also:
Constant Field Values

foundExact

public boolean foundExact
Constructor Detail

Index

public Index()
Method Detail

compareKey

public boolean compareKey(String keyToCompare)
                   throws xBaseJException,
                          IOException
Throws:
xBaseJException
IOException

add_entry

public abstract int add_entry(NodeKey key,
                              int recno)
                       throws xBaseJException,
                              IOException
Throws:
xBaseJException
IOException

add_entry

public int add_entry(int recno)
              throws xBaseJException,
                     IOException
Throws:
xBaseJException
IOException

find_entry

public abstract int find_entry(NodeKey key)
                        throws xBaseJException,
                               IOException
Throws:
xBaseJException
IOException

find_entry

public abstract int find_entry(NodeKey key,
                               int recno)
                        throws xBaseJException,
                               IOException
Throws:
xBaseJException
IOException

find_entry

public int find_entry(String key)
               throws xBaseJException,
                      IOException
Throws:
xBaseJException
IOException

find_entry

public int find_entry(String key,
                      int recno)
               throws xBaseJException,
                      IOException
Throws:
xBaseJException
IOException

get_next_key

public abstract int get_next_key()
                          throws xBaseJException,
                                 IOException
Throws:
xBaseJException
IOException

get_prev_key

public abstract int get_prev_key()
                          throws xBaseJException,
                                 IOException
Throws:
xBaseJException
IOException

del_entry

public abstract void del_entry(Node inNode)
                        throws IOException,
                               xBaseJException
Throws:
IOException
xBaseJException

reIndex

public abstract void reIndex()
                      throws xBaseJException,
                             IOException
Throws:
xBaseJException
IOException

check_for_duplicates

public void check_for_duplicates(int count)
                          throws xBaseJException,
                                 IOException
Throws:
xBaseJException
IOException

getName

public String getName()

getKeyFields

public String getKeyFields()

buildKey

public String buildKey()
                throws xBaseJException
Throws:
xBaseJException

build_key

public NodeKey build_key()
                  throws xBaseJException
Throws:
xBaseJException

is_unique_key

public boolean is_unique_key()

set_active_key

public void set_active_key(NodeKey key)

get_active_key

public NodeKey get_active_key()

set_key_definition

public void set_key_definition(String definition)

update

public void update(int recno)
            throws xBaseJException,
                   IOException
Throws:
xBaseJException
IOException

position_at_first

public void position_at_first()
                       throws xBaseJException,
                              IOException
Throws:
xBaseJException
IOException

position_at_last

public void position_at_last()
                      throws xBaseJException,
                             IOException
Throws:
xBaseJException
IOException

didFindFindExact

public boolean didFindFindExact()
return to return if the find_entry function found the exact key requested

Returns:
boolean


Copyright © 1997-2007 American Coders Ltd. All Rights Reserved.