org.xBaseJ.indexes
Class NDX

java.lang.Object
  extended byorg.xBaseJ.indexes.Index
      extended byorg.xBaseJ.indexes.NDX

public class NDX
extends Index


Field Summary
 
Fields inherited from class org.xBaseJ.indexes.Index
activeKey, bytebuffer, channel, database, dosname, file, findAnyKey, findFirstMatchingKey, foundExact, foundMatchingKeyButNotRecord, key_definition, key_entry_size, key_length, key_per_Node, keyControl, keyNotFound, keyType, next_available, nfile, record, reserved_01, reserved_02, reserved_03, reserved_04, stringKey, top_Node, topNode, unique_key, workNode
 
Constructor Summary
NDX()
           
NDX(String filename, DBF indatabase, char readonly)
           
NDX(String name, String NDXString, DBF indatabase, boolean destroy, boolean unique)
          creates a NDX object and NDX file
 
Method Summary
 int add_entry(NodeKey NDXkey, int recno)
           
 void anchor_read()
           
 void anchor_write()
           
 void bIndex()
           
 void close()
           
 void del_entry(Node inNode)
           
 int find_entry(NodeKey findKey)
           
 int find_entry(NodeKey findKey, int rec)
           
 int find_entry(NodeKey findKey, Node aNode, int findrec)
           
 int get_next_key()
           
 int get_prev_key()
           
 void redo_numbers()
           
 void reIndex()
           
 void reIndex2()
           
 
Methods inherited from class org.xBaseJ.indexes.Index
add_entry, build_key, buildKey, check_for_duplicates, compareKey, didFindFindExact, find_entry, find_entry, get_active_key, getKeyFields, getName, is_unique_key, position_at_first, position_at_last, set_active_key, set_key_definition, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NDX

public NDX()

NDX

public NDX(String filename,
           DBF indatabase,
           char readonly)
    throws IOException,
           xBaseJException

NDX

public NDX(String name,
           String NDXString,
           DBF indatabase,
           boolean destroy,
           boolean unique)
    throws xBaseJException,
           IOException
creates a NDX object and NDX file

Parameters:
name - Index file name , can be full or partial pathname
NDXString - database Fields that define the Index, join Fields with "+" do not use spaces
indatabase - DBF object to be associated with
destroy - permission to destroy file if it exists
unique - unique flag indicator
Throws:
IOException - exception thrown by calling methods
xBaseJException - most likely cause - file not found
Method Detail

close

public void close()
           throws IOException
Throws:
IOException

find_entry

public int find_entry(NodeKey findKey)
               throws xBaseJException,
                      IOException
Specified by:
find_entry in class Index
Throws:
xBaseJException
IOException

find_entry

public int find_entry(NodeKey findKey,
                      int rec)
               throws xBaseJException,
                      IOException
Specified by:
find_entry in class Index
Throws:
xBaseJException
IOException

find_entry

public int find_entry(NodeKey findKey,
                      Node aNode,
                      int findrec)
               throws xBaseJException,
                      IOException
Throws:
xBaseJException
IOException

bIndex

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

reIndex2

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

reIndex

public void reIndex()
             throws xBaseJException,
                    IOException
Specified by:
reIndex in class Index
Throws:
xBaseJException
IOException

add_entry

public int add_entry(NodeKey NDXkey,
                     int recno)
              throws xBaseJException,
                     IOException
Specified by:
add_entry in class Index
Throws:
xBaseJException
IOException

del_entry

public void del_entry(Node inNode)
               throws IOException,
                      xBaseJException
Specified by:
del_entry in class Index
Throws:
IOException
xBaseJException

get_next_key

public int get_next_key()
                 throws xBaseJException,
                        IOException
Specified by:
get_next_key in class Index
Throws:
xBaseJException
IOException

get_prev_key

public int get_prev_key()
                 throws xBaseJException,
                        IOException
Specified by:
get_prev_key in class Index
Throws:
xBaseJException
IOException

anchor_read

public void anchor_read()
                 throws IOException
Throws:
IOException

anchor_write

public void anchor_write()
                  throws IOException
Throws:
IOException

redo_numbers

public void redo_numbers()


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