|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xBaseJ.Client.DBF
Constructor Summary | |
DBF(java.lang.String inDBFname,
java.lang.String inhost,
int inport)
opens a DBF at the server |
|
DBF(java.lang.String inDBFname,
java.lang.String inhost,
int inport,
boolean stayConnected)
opens a DBF at the server |
Method Summary | |
void |
close()
closes the database NOT FULLY IMPLEMENTED |
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 |
fldcount()
Deprecated. use getFieldCount |
int |
getCurrentRecordNumber()
|
xBaseJ.Client.Field |
getField(int i)
|
xBaseJ.Client.Field |
getField(java.lang.String name)
|
int |
getFieldCount()
|
java.lang.String |
getName()
|
int |
getRecordCount()
|
void |
gotoRecord(long 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 |
int |
reccount()
Deprecated. use getRecordCount |
int |
recno()
Deprecated. use getCurrentRecordNumber |
void |
setLock(boolean lockSwitch)
locks/unlocks the whole table |
void |
setRecordLock(boolean lockSwitch)
locks/unlocks the current record. |
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 name)
opens an index associated with the database |
void |
useTag(java.lang.String name)
assigns Tag associated with the database used in find, findnext and findprev Tags are not defined in the dbfs.dbf file |
void |
write()
used to write a new record in the database when done the record pointer is at the end of the database |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBF(java.lang.String inDBFname, java.lang.String inhost, int inport, boolean stayConnected) throws xBaseJException, java.io.IOException, java.net.UnknownHostException
inhost
- host name or ip addressinport
- host listening portstayConnected
- boolean indicator for persitant connection
xBaseJException
- File does exist and told not to destroy it.
java.io.IOException
- Java error caused by called methods
java.lang.SecurityException
- Java error caused by called methods, most likely trying to create on a remote system
java.net.UnknownHostException
public DBF(java.lang.String inDBFname, java.lang.String inhost, int inport) throws xBaseJException, java.io.IOException, java.net.UnknownHostException
inhost
- host name or ip addressinport
- host listening port
xBaseJException
- File does exist and told not to destroy it.
java.io.IOException
- Java error caused by called methods
java.lang.SecurityException
- Java error caused by called methods, most likely trying to create on a remote system
java.net.UnknownHostException
Method Detail |
public void setLock(boolean lockSwitch) throws xBaseJException, java.io.IOException
lockSwitch
- - true - lock the table, false - unlock
xBaseJException
- most likely table already locked by another process
java.io.IOException
- Java error caused by called methodspublic void setRecordLock(boolean lockSwitch) throws xBaseJException, java.io.IOException
lockSwitch
- - true - lock the record, false - unlock
xBaseJException
- most likely table or record is already locked by another process
record cursor not on a valid record - read a record first
java.io.IOException
- Java error caused by called methodspublic void useIndex(java.lang.String name) throws xBaseJException, java.io.IOException
xBaseJException
- xBaseJ Fields defined in Index do not match Fields in database
java.io.IOException
- Java error caused by called methodspublic void useTag(java.lang.String name) throws xBaseJException, java.io.IOException
xBaseJException
- xBaseJ Fields defined in Index do not match Fields in database
java.io.IOException
- Java error caused by called methodspublic boolean find(java.lang.String keyString) throws xBaseJException, java.io.IOException
keyString
- a search string
xBaseJException
- xBaseJ no Indexes/Tags opened with database
java.io.IOException
- Java error caused by called methodspublic void findNext() throws xBaseJException, java.io.IOException
xBaseJException
- xBaseJ Index/Tag not opened or not part of the database
java.io.IOException
- Java error caused by called methodspublic void findPrev() throws xBaseJException, java.io.IOException
xBaseJException
- xBaseJ Index/Tag not opened or not part of the database
java.io.IOException
- Java error caused by called methodspublic void startTop() throws xBaseJException, java.io.IOException
xBaseJException
java.io.IOException
- Java error caused by called methodspublic void startBottom() throws xBaseJException, java.io.IOException
xBaseJException
java.io.IOException
- Java error caused by called methodspublic int fldcount()
public int recno()
public int reccount() throws xBaseJException, java.io.IOException
xBaseJException
- logic error with server
java.io.IOException
- logic error with serverpublic int getFieldCount()
public int getCurrentRecordNumber()
public int getRecordCount() throws xBaseJException, java.io.IOException
xBaseJException
- logic error with server
java.io.IOException
- logic error with serverpublic void read() throws xBaseJException, java.io.IOException
xBaseJException
- usually the end of file condition
java.io.IOException
- Java error caused by called methodspublic void readPrev() throws xBaseJException, java.io.IOException
xBaseJException
- usually the top of file condition
java.io.IOException
- Java error caused by called methodspublic void gotoRecord(long recno) throws xBaseJException, java.io.IOException
recno
- the relative position of the record to read
xBaseJException
- passed an negative number, 0 or value greater than the number of records in database
java.io.IOException
- Java error caused by called methodspublic void write() throws xBaseJException, java.io.IOException
xBaseJException
- any one of several errors
java.io.IOException
- Java error caused by called methodspublic void update() throws xBaseJException, java.io.IOException
xBaseJException
- any one of several errors
java.io.IOException
- Java error caused by called methodspublic void delete() throws java.io.IOException, xBaseJException
xBaseJException
- usually occurs when no record has been read
java.io.IOException
- Java error caused by called methodspublic void undelete() throws java.io.IOException, xBaseJException
xBaseJException
- usually occurs when no record has been read.
java.io.IOException
- Java error caused by called methodspublic void close() throws java.io.IOException, xBaseJException
java.io.IOException
- Java error caused by called methods
xBaseJException
- logic error with serverpublic xBaseJ.Client.Field getField(int i) throws java.lang.ArrayIndexOutOfBoundsException, xBaseJException
i
- Field number
xBaseJException
- usually occurs when Field number is less than 1 or greater than the number of Fields
java.lang.ArrayIndexOutOfBoundsException
- Java error caused by called methodspublic xBaseJ.Client.Field getField(java.lang.String name) throws xBaseJException, java.lang.ArrayIndexOutOfBoundsException
name
- Field name
xBaseJException
- Field name is not correct
java.lang.ArrayIndexOutOfBoundsException
- Java error caused by called methodspublic java.lang.String getName()
public boolean deleted() throws java.io.IOException, xBaseJException
xBaseJException
- logic error with server
java.io.IOException
- logic error with server
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |