• public interface RecordListener
• A listener interface for receiving Record
Changed/Added/Deleted events from a record
• If a record store is changed, then
RecordListener interface notifies its
implementation class about the changes made
to the recordstore.
• For example I have a record store like follows
Here I have added one new record which
record was not there in previous record store
• So this added information is notified to
Class Ex implements RecordListener
• Here RecordListener informs the modification
to class Ex
• There are 3 events are there
1. Record added: when this event occurs, the
recordAdded() method of RecordListener is
2. RecordDeleted(): this event occurs when the
RecordDeleted() method invoked
3. when we modify any record, then
recordChanged() method will be executed
• These methods are member of RecordListener
Where should we use?
• When a class want to notify of the changes in
record store, then it must implement the
three methods of RecordListener.
• A record listener can be added following
• Rec.addRecordListener(new Ex());//here rec is
ref of recordstore, Ex is class to be notified
Void recordAdded(RecordStore recordStore, int recordId)
• Called when a record has been added to a record store.
Void recordChanged(RecordStore recordStore, int recordId)
• Called after a record in a record store has been changed.
Void recordDeleted(RecordStore recordStore, int recordId)
Called after a record has been deleted from a record store.