All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----xBaseJ.DBF
Summary |
public class DBF extends java.lang.Object { // Fields 3 public static final int DBASEIII; public static final int DBASEIV; public static final char READ_ONLY; // Constructors 4 public DBF(String) throws xBaseJException, IOException; public DBF(String, boolean) throws xBaseJException, IOException, SecurityException; public DBF(String, char) throws xBaseJException, IOException; public DBF(String, int, boolean) throws xBaseJException, IOException, SecurityException; // Methods 41 public void addField(Field) throws xBaseJException, IOException; public void addField(Field[]) throws xBaseJException, IOException; public void changeField(Field, Field) throws xBaseJException, IOException; public void close() throws IOException; public Index createIndex(String, String, boolean) throws xBaseJException, IOException; public Index createIndex(String, String, boolean, boolean) throws xBaseJException, IOException; public Index createTag(String, String, boolean) throws xBaseJException, IOException; public void delete() throws IOException, xBaseJException; public boolean deleted(); public void dropField(Field) throws xBaseJException, IOException; public boolean find(String) throws xBaseJException, IOException; public void findNext() throws xBaseJException, IOException; public void findPrev() throws xBaseJException, IOException;public int fldcount(); public int getCurrentRecordNumber(); public Field getField(int) throws ArrayIndexOutOfBoundsException, xBaseJException; public Field getField(String) throws xBaseJException, ArrayIndexOutOfBoundsException; public int getFieldCount(); public Index getIndex(int) throws xBaseJException; public int getIndexCount(); public String getName(); public int getRecordCount(); public void gotoRecord(int) throws xBaseJException, IOException; public void pack() throws xBaseJException, IOException, SecurityException, CloneNotSupportedException; public void read() throws xBaseJException, IOException; public void readPrev() throws xBaseJException, IOException;public int reccount();public int recno(); public void setFieldEvaluation(String) throws xBaseJException; public void startBottom() throws xBaseJException, IOException; public void startTop() throws xBaseJException, IOException; public void undelete() throws IOException, xBaseJException; public void update() throws xBaseJException, IOException; public Index useIndex(String) throws xBaseJException, IOException; public Index useIndex(String, String) throws xBaseJException, IOException; public Index useIndex(Index) throws xBaseJException, IOException; public Index useIndexByID(String) throws xBaseJException; public Index useTag(String) throws xBaseJException; public Index useTag(String, String) throws xBaseJException, IOException; public String version(); public void write() throws xBaseJException, IOException; }
Fields |
· DBASEIII | Summary | Top |
public static final int DBASEIII
· DBASEIV | Summary | Top |
public static final int DBASEIV
· READ_ONLY | Summary | Top |
public static final char READ_ONLY
Constructors |
· DBF | Summary | Top |
public DBF(String DBFname, boolean destroy) throws xBaseJException, IOException, SecurityException
creates a new DBF file or replaces an existing database file, w/o format assumes dbaseiii file format
The unregistered package limitted to 5 open dbf's.
Parameter Description DBFname a new or existing database file, can be full or partial pathname format use class constants DBASEIII or DBASEIV
- Throws: xBaseJException
- File does exist and told not to destroy it.
- Throws: xBaseJException
- Told to destroy but operating system can not destroy
- Throws: SecurityException
- Java error caused by called methods, most likely trying to create on a remote system
· DBF | Summary | Top |
public DBF(String DBFname, int format, boolean destroy) throws xBaseJException, IOException, SecurityException
creates a new DBF file or replaces an existing database file
The unregistered package limitted to 5 open dbf's.
Parameter Description DBFname a new or existing database file, can be full or partial pathname format use class constants DBASEIII or DBASEIV destroy permission to destroy an existing database file
- Throws: xBaseJException
- File does exist and told not to destroy it.
- Throws: xBaseJException
- Told to destroy but operating system can not destroy
- Throws: SecurityException
- Java error caused by called methods, most likely trying to create on a remote system
· DBF | Summary | Top |
public DBF(String DBFname, char readOnly) throws xBaseJException, IOException
creates an DBF object and opens existing database file in readonly mode
The unregistered package limitted to 5 open dbf's.
Parameter Description DBFname an existing database file, can be full or partial pathname
- Throws: xBaseJException
- Can not find database
- Throws: xBaseJException
- database not dbaseIII format
· DBF | Summary | Top |
public DBF(String DBFname) throws xBaseJException, IOException
creates an DBF object and opens existing database file in read/write mode
The unregistered package limitted to 5 open dbf's.
Parameter Description DBFname an existing database file, can be full or partial pathname
- Throws: xBaseJException
- Can not find database
- Throws: xBaseJException
- database not dbaseIII format
Methods |
· version | Summary | Top |
public String version()
· addField | Summary | Top |
public void addField(Field aField) throws xBaseJException, IOException
adds a new Field to a database
Parameter Description aField a predefined Field object
- Throws: xBaseJException
- xBaseJ error caused by called methods
See Also: Field
· addField | Summary | Top |
public void addField(Field[] aField) throws xBaseJException, IOException
adds an array of new Fields to a database
Parameter Description aField an array of predefined Field object
- Throws: xBaseJException
- passed an empty array or other error
See Also: Field
· dropField | Summary | Top |
public void dropField(Field aField) throws xBaseJException, IOException
removes a Field from a database NOT FULLY IMPLEMENTED
Parameter Description aField a field in the database
- Throws: xBaseJException
- Field is not part of the database
See Also: Field
· changeField | Summary | Top |
public void changeField(Field oldField, Field newField) throws xBaseJException, IOException
changes a Field in a database NOT FULLY IMPLEMENTED
Parameter Description aField a Field object
- Throws: xBaseJException
- xBaseJ error caused by called methods
See Also: Field
· fldcount | Summary | Top |
public int fldcount()
Note: fldcount() is deprecated use getFieldCount
returns the number of fields in a database
· reccount | Summary | Top |
public int reccount()
Note: reccount() is deprecated use getRecordCount
returns the number of records in a database
· recno | Summary | Top |
public int recno()
Note: recno() is deprecated use getCurrentRecordNumber
returns the current record number
· getFieldCount | Summary | Top |
public int getFieldCount()
returns the number of fields in a database
· getRecordCount | Summary | Top |
public int getRecordCount()
returns the number of records in a database
· getCurrentRecordNumber | Summary | Top |
public int getCurrentRecordNumber()
returns the current record number
· getIndexCount | Summary | Top |
public int getIndexCount()
returns the number of known index files and tags
· getIndex | Summary | Top |
public Index getIndex(int indexPosition) throws xBaseJException
gets an Index object associated with the database. This index does not become the primary index. Written for the makeDBFBean application. Position is relative to 1.
Parameter Description int index position
- Throws: xBaseJException
- index value incorrect
· useIndex | Summary | Top |
public Index useIndex(String filename) throws xBaseJException, IOException
opens an Index file associated with the database. This index becomes the primary index used in subsequent find methods.
Parameter Description filename an existing ndx file(can be full or partial pathname) or mdx tag
- Throws: xBaseJException
- xBaseJ Fields defined in index do not match fields in database
· useIndex | Summary | Top |
public Index useIndex(String filename, String ID) throws xBaseJException, IOException
opens an Index file associated with the database
Parameter Description filename an existing Index file, can be full or partial pathname ID a unique id to define Index at run-time.
- Throws: xBaseJException
- xBaseJ Fields defined in Index do not match Fields in database
· useIndex | Summary | Top |
public Index useIndex(Index ndx) throws xBaseJException, IOException
used to indicate the primary Index
Parameter Description Index a Index object
- Throws: xBaseJException
- xBaseJ Index not opened or not part of the database
· useIndexByID | Summary | Top |
public Index useIndexByID(String ID) throws xBaseJException
used to indicate the primary Index
Parameter Description Index a string id
- Throws: xBaseJException
- xBaseJ Index not opened or not part of the database
See Also: useIndex
· useTag | Summary | Top |
public Index useTag(String tagname) throws xBaseJException
associates all Index operations with an existing tag
Parameter Description tagname an existing tag name in the production MDX file
- Throws: xBaseJException
- no MDX file tagname not found
· useTag | Summary | Top |
public Index useTag(String tagname, String ID) throws xBaseJException, IOException
associates all Index operations with an existing tag
Parameter Description tagname an existing tag name in the production MDX file ID a unique id to define Index at run-time.
- Throws: xBaseJException
- no MDX file tagname not found
· createIndex | Summary | Top |
public Index createIndex(String filename, String index, boolean unique) throws xBaseJException, IOException
creates a new Index as a NDX file, assumes NDX file does not exist
Parameter Description filename a new Index file name index string identifying Fields used in Index unique boolean to indicate if the key is always unique
- Throws: xBaseJException
- NDX file already exists
· createIndex | Summary | Top |
public Index createIndex(String filename, String index, boolean destroy, boolean unique) throws xBaseJException, IOException
creates a new Index as a NDX file
Parameter Description filename a new Index file name index string identifying Fields used in Index destroy permission to destory NDX if file exists unique boolean to indicate if the key is always unique
- Throws: xBaseJException
- NDX file already exists
· createTag | Summary | Top |
public Index createTag(String tagname, String tagIndex, boolean unique) throws xBaseJException, IOException
creates a tag in the MDX file
Parameter Description tagname a non-existing tag name in the production MDX file tagIndex string identifying Fields used in Index unique boolean to indicate if the key is always unique
- Throws: xBaseJException
- no MDX file tagname already exists
· find | Summary | Top |
public boolean find(String keyString) throws xBaseJException, IOException
used to find a record with an equal or greater string value when done the record pointer and field contents will be changed
Parameter Description keyString a search string
- Throws: xBaseJException
- xBaseJ no Indexs opened with database
· findNext | Summary | Top |
public void findNext() throws xBaseJException, IOException
used to get the next record in the index list when done the record pointer and field contents will be changed
- Throws: xBaseJException
- xBaseJ Index not opened or not part of the database eof - end of file
· findPrev | Summary | Top |
public void findPrev() throws xBaseJException, IOException
used to get the previous record in the index list when done the record pointer and field contents will be changed
- Throws: xBaseJException
- xBaseJ Index not opened or not part of the database tof - top of file
· read | Summary | Top |
public void read() throws xBaseJException, IOException
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: xBaseJException
- usually the end of file condition
· readPrev | Summary | Top |
public void readPrev() throws xBaseJException, IOException
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: xBaseJException
- usually the top of file condition
· gotoRecord | Summary | Top |
public void gotoRecord(int recno) throws xBaseJException, IOException
used to read a record at a particular place in the database when done the record pointer and field contents will be changed
Parameter Description recno the relative position of the record to read
- Throws: xBaseJException
- passed an negative number, 0 or value greater than the number of records in database
· startTop | Summary | Top |
public void startTop() throws xBaseJException, IOException
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: xBaseJException
- most likely no records in database
· startBottom | Summary | Top |
public void startBottom() throws xBaseJException, IOException
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: xBaseJException
- most likely no records in database
· write | Summary | Top |
public void write() throws xBaseJException, IOException
used to write a new record in the database when done the record pointer is at the end of the database
- Throws: xBaseJException
- any one of several errors
· update | Summary | Top |
public void update() throws xBaseJException, IOException
updates the record at the current position
- Throws: xBaseJException
- any one of several errors
· delete | Summary | Top |
public void delete() throws IOException, xBaseJException
marks the current records as deleted
- Throws: xBaseJException
- usually occurs when no record has been read
· undelete | Summary | Top |
public void undelete() throws IOException, xBaseJException
marks the current records as not deleted
- Throws: xBaseJException
- usually occurs when no record has been read.
· close | Summary | Top |
public void close() throws IOException
closes the database
· getField | Summary | Top |
public Field getField(int i) throws ArrayIndexOutOfBoundsException, xBaseJException
returns a Field object by its relative position
Parameter Description i Field number
- Throws: xBaseJException
- usually occurs when Field number is less than 1 or greater than the number of fields
· getField | Summary | Top |
public Field getField(String name) throws xBaseJException, ArrayIndexOutOfBoundsException
returns a Field object by its name in the database
Parameter Description name Field name
- Throws: xBaseJException
- Field name is not correct
· getName | Summary | Top |
public String getName()
returns the full path name of the database
· deleted | Summary | Top |
public boolean deleted()
returns true if record is marked for deletion
· pack | Summary | Top |
public void pack() throws xBaseJException, IOException, SecurityException, CloneNotSupportedException
packs a DBF by removing deleted records and memo fields
- Throws: xBaseJException
- File does exist and told not to destroy it.
- Throws: xBaseJException
- Told to destroy but operating system can not destroy
- Throws: CloneNotSupportedException
- Java error caused by called methods
· setFieldEvaluation | Summary | Top |
public void setFieldEvaluation(String evalString) throws xBaseJException
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7