|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface implemented by objects that manage a collection of records.
Method Summary | |
void |
addDataListener(DataListener dl)
Add a listener that gets notified if ever a record is inserted, updated or deleted. |
void |
delete(Record rec)
Delete a record |
void |
insert(Record rec)
Adds a new record to the managed pool. |
void |
playEvent(DataEvent event)
"play" an event This will be mostly used in restarting an app and reconstructing the state of the data from logs. |
void |
removeDataListener(DataListener dl)
Remove a listener that gets notified if ever a record is inserted, updated or deleted. |
java.util.List |
select(RecordFilter filter)
Fetches a list of records matching filter. |
void |
update(Record oldRec,
Record newRec)
Replaces an existing version of a record with a new updated version. |
Methods inherited from interface com.revusky.oreo.DataSource |
close, get, get, getName, getRecords, init, keys, keys, wipeCache |
Method Detail |
public void insert(Record rec) throws java.io.IOException
rec
- the record to addDuplicateRecordException
- if another record already exists
with same primary key as 'rec'.java.io.IOException
- if the record cannot be
initialized (i.e. has missing fields or invalid
field values, etc.), or in case of a low-level error.public void update(Record oldRec, Record newRec) throws java.io.IOException
oldRec
- the record to replace.newRec
- the new record.java.io.IOException
- thrown in case of any other database or
communication error.public void delete(Record rec) throws java.io.IOException
the
- record to delete.public java.util.List select(RecordFilter filter) throws java.io.IOException
filter
- the record filter, or null.public void playEvent(DataEvent event) throws java.io.IOException
public void addDataListener(DataListener dl) throws java.io.IOException
dl
- the listenerpublic void removeDataListener(DataListener dl) throws java.io.IOException
dl
- the listener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |