|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Database interface describes a generalized persistence interface.
| Field Summary | |
static int |
ERR_APPEND
error appending a new record. |
static int |
ERR_CREATE
error: creation of database failed. |
static int |
ERR_DBFULL
error: database full. |
static int |
ERR_DELETE
error while deleting a record. |
static int |
ERR_DEVICE
device-related error. |
static int |
ERR_NODATA
error: no data available. |
static int |
ERR_NODB
error: requested database not found. |
static int |
ERR_OPEN
error: can't open database. |
static int |
ERR_READ
error while reading from database. |
static int |
ERR_WRITE
error writing the database. |
static int |
S_OK
success code. |
| Method Summary | |
int |
addRecord(Dataset rec)
add a record to the database. |
void |
close()
Close the database. |
boolean |
deleteRecord(int idx)
Delete a record at a specified index. |
int |
getErrorCode()
return the current database error code. |
boolean |
getRecord(int idx,
Dataset rec)
Retreive a record from the database at a specific position. |
boolean |
isOpen()
Is the database opened? |
int |
numberOfRecords()
Return the number of records in the database. |
boolean |
open()
Open the database. |
boolean |
putRecord(int idx,
Dataset rec)
Store a record in the database at a specific position. |
| Field Detail |
public static final int S_OK
public static final int ERR_CREATE
public static final int ERR_OPEN
public static final int ERR_NODB
public static final int ERR_APPEND
public static final int ERR_WRITE
public static final int ERR_DELETE
public static final int ERR_NODATA
public static final int ERR_READ
public static final int ERR_DBFULL
public static final int ERR_DEVICE
| Method Detail |
public int getErrorCode()
public boolean open()
public boolean isOpen()
public void close()
public int numberOfRecords()
public int addRecord(Dataset rec)
rec - Dataset - record to be added to the database.Dataset
public boolean getRecord(int idx,
Dataset rec)
idx - int - Position of the record in the database.rec - Dataset - record to be filled with data.Dataset
public boolean putRecord(int idx,
Dataset rec)
idx - int - Desired position of the record in the database.rec - Dataset - record to be stored.Datasetpublic boolean deleteRecord(int idx)
idx - int - Index of the record to be deleted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||