Name
RecordListener
Synopsis
This interface is implemented by classes that wish to be notified of changes
to the content of one or more RecordStore
s. A listener is
registered by calling the addRecordListener()
method of
a RecordStore
and removed using the
removeRecordListener()
method.
This interface has three methods. The recordAdded()
method
is called when a new record is added to a RecordStore
.
recordDeleted()
is called when a new record is removed
from a RecordStore
. Finally,
recordChanged()
is called when the content of an existing
record is modified. Each of these methods are passed a reference to the
RecordStore
and the ID of the affected record. This
allows a single listener to monitor more than one
RecordStore
. Note that in the case of
recordDeleted()
, the record ID will already be invalid by
the time this method is invoked, so it is not possible to retrieve the
contents of the deleted record.
public interface RecordListener { // Public Instance Methods public abstract void recordAdded(RecordStore recordStore, int recordId); public abstract void recordChanged(RecordStore recordStore, int recordId); public abstract void recordDeleted(RecordStore recordStore, int recordId); }
Passed To
RecordStore.{addRecordListener(), removeRecordListener()}
Get J2ME in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.