|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Method Summary | |
int |
create(java.lang.String[] data)
Creates a new record in the database (possibly reusing a deleted entry). |
void |
delete(int recNo)
Deletes a record, making the record number and associated disk storage available for reuse. |
int[] |
find(java.lang.String[] criteria)
Returns an array of record numbers that match the specified criteria. |
boolean |
isLocked(int recNo)
Determines if a record is currenly locked. |
void |
lock(int recNo)
Locks a record so that it can only be updated or deleted by this client. |
java.lang.String[] |
read(int recNo)
Reads a record from the file. |
void |
unlock(int recNo)
Releases the lock on a record. |
void |
update(int recNo,
java.lang.String[] data)
Modifies the fields of a record. |
| Method Detail |
public java.lang.String[] read(int recNo)
throws RecordNotFoundException
recNo - the index of the requested record
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
public void update(int recNo,
java.lang.String[] data)
throws RecordNotFoundException
recNo - the index of the record to operate ondata - the new set of data for the requested record
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
public void delete(int recNo)
throws RecordNotFoundException
recNo - the index of the record to delete
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
public int[] find(java.lang.String[] criteria)
throws RecordNotFoundException
criteria - String array representing the criteria for each record field
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
public int create(java.lang.String[] data)
throws DuplicateKeyException
DuplicateKeyException
public void lock(int recNo)
throws RecordNotFoundException
recNo - the index of the record to lock
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
public void unlock(int recNo)
throws RecordNotFoundException
recNo - the index of the record to lock
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
public boolean isLocked(int recNo)
throws RecordNotFoundException
recNo - the index of the record to check
RecordNotFoundException - is thrown if a specified record does not exist or is
marked as deleted in the database file.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||