org.xBaseJ.rmi
Interface DBFInterface

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DBF

public interface DBFInterface
extends java.rmi.Remote


Field Summary
static java.lang.String serviceName
           
 
Method Summary
 void close()
          closes the database
 void delete()
          marks the current records as deleted
 boolean deleted()
           
 boolean find(java.lang.String keyString)
          used to find a record with an equal or greater string value when done the record pointer and field contents will be changed
 void findNext()
          used to get the next record in the index list when done the record pointer and field contents will be changed
 void findPrev()
          used to get the previous record in the index list when done the record pointer and field contents will be changed
 int getCurrentRecordNumber()
          returns the current record number
 FieldInterface getField(int i)
          returns a Field by its relative position
 FieldInterface getField(java.lang.String name)
          returns a Field by its name in the database
 int getFieldCount()
          returns the number of fields in a database
 int getRecordCount()
          returns the number of records in a database
 void gotoRecord(int recno)
          used to read a record at a particular place in the database when done the record pointer and field contents will be changed
 void read()
          used to read the next record, after the current record pointer, in the database when done the record pointer and field contents will be changed
 void readPrev()
          used to read the previous record, before the current record pointer, in the database when done the record pointer and field contents will be changed
 void startBottom()
          used to position record pointer at the last record or index in the database when done the record pointer will be changed.
 void startTop()
          used to position record pointer at the first record or index in the database when done the record pointer will be changed.
 void undelete()
          marks the current records as not deleted
 void update()
          updates the record at the current position
 void useIndex(java.lang.String filename)
          opens an Index file associated with the database.
 void useTag(java.lang.String tagname)
          associates all Index operations with an existing tag
 void write()
          used to write a new record in the database when done the record pointer is at the end of the database
 

Field Detail

serviceName

static final java.lang.String serviceName
See Also:
Constant Field Values
Method Detail

getFieldCount

int getFieldCount()
                  throws java.rmi.RemoteException
returns the number of fields in a database

Throws:
java.rmi.RemoteException

getRecordCount

int getRecordCount()
                   throws java.rmi.RemoteException
returns the number of records in a database

Throws:
java.rmi.RemoteException

getCurrentRecordNumber

int getCurrentRecordNumber()
                           throws java.rmi.RemoteException
returns the current record number

Throws:
java.rmi.RemoteException

useIndex

void useIndex(java.lang.String filename)
              throws java.rmi.RemoteException
opens an Index file associated with the database. This index becomes the primary index used in subsequent find methods.

Parameters:
filename - an existing ndx file(can be full or partial pathname) or mdx tag
Throws:
java.rmi.RemoteException - org.xBaseJ Fields defined in index do not match fields in database

useTag

void useTag(java.lang.String tagname)
            throws java.rmi.RemoteException
associates all Index operations with an existing tag

Parameters:
tagname - an existing tag name in the production MDX file
Throws:
java.rmi.RemoteException - no MDX file tagname not found

find

boolean find(java.lang.String keyString)
             throws java.rmi.RemoteException
used to find a record with an equal or greater string value when done the record pointer and field contents will be changed

Parameters:
keyString - a search string
Returns:
boolean indicating if the record found contains the exact key
Throws:
java.rmi.RemoteException - org.xBaseJ no Indexs opened with database

findNext

void findNext()
              throws java.rmi.RemoteException
used to get the next record in the index list when done the record pointer and field contents will be changed

Throws:
java.rmi.RemoteException - org.xBaseJ Index not opened or not part of the database eof - end of file

findPrev

void findPrev()
              throws java.rmi.RemoteException
used to get the previous record in the index list when done the record pointer and field contents will be changed

Throws:
java.rmi.RemoteException - org.xBaseJ Index not opened or not part of the database tof - top of file

read

void read()
          throws java.rmi.RemoteException
used to read the next record, after the current record pointer, in the database when done the record pointer and field contents will be changed

Throws:
java.rmi.RemoteException - usually the end of file condition

readPrev

void readPrev()
              throws java.rmi.RemoteException
used to read the previous record, before the current record pointer, in the database when done the record pointer and field contents will be changed

Throws:
java.rmi.RemoteException - usually the top of file condition

gotoRecord

void gotoRecord(int recno)
                throws java.rmi.RemoteException
used to read a record at a particular place in the database when done the record pointer and field contents will be changed

Parameters:
recno - the relative position of the record to read
Throws:
java.rmi.RemoteException - passed an negative number, 0 or value greater than the number of records in database

startTop

void startTop()
              throws java.rmi.RemoteException
used to position record pointer at the first record or index in the database when done the record pointer will be changed. NO RECORD IS READ. Your program should follow this with either a read (for non-index reads) or findNext (for index processing)

Throws:
java.rmi.RemoteException - most likely no records in database

startBottom

void startBottom()
                 throws java.rmi.RemoteException
used to position record pointer at the last record or index in the database when done the record pointer will be changed. NO RECORD IS READ. Your program should follow this with either a read (for non-index reads) or findPrev (for index processing)

Throws:
java.rmi.RemoteException - most likely no records in database

write

void write()
           throws java.rmi.RemoteException
used to write a new record in the database when done the record pointer is at the end of the database

Throws:
java.rmi.RemoteException - any one of several errors

update

void update()
            throws java.rmi.RemoteException
updates the record at the current position

Throws:
java.rmi.RemoteException - any one of several errors

delete

void delete()
            throws java.rmi.RemoteException
marks the current records as deleted

Throws:
java.rmi.RemoteException - usually occurs when no record has been read

undelete

void undelete()
              throws java.rmi.RemoteException
marks the current records as not deleted

Throws:
java.rmi.RemoteException - usually occurs when no record has been read.

deleted

boolean deleted()
                throws java.rmi.RemoteException
Returns:
boolean true if record is marked for deletion
Throws:
java.rmi.RemoteException

close

void close()
           throws java.rmi.RemoteException
closes the database

Throws:
java.rmi.RemoteException

getField

FieldInterface getField(int i)
                        throws java.rmi.RemoteException
returns a Field by its relative position

Parameters:
i - Field number
Returns:
String
Throws:
java.rmi.RemoteException - usually occurs when Field number is less than 1 or greater than the number of fields

getField

FieldInterface getField(java.lang.String name)
                        throws java.rmi.RemoteException
returns a Field by its name in the database

Parameters:
name - Field name
Throws:
java.rmi.RemoteException - Field name is not correct