01: /*
02: *
03: *
04: * Portions Copyright 2000-2007 Sun Microsystems, Inc. All Rights
05: * Reserved. Use is subject to license terms.
06: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public License version
10: * 2 only, as published by the Free Software Foundation.
11: *
12: * This program is distributed in the hope that it will be useful, but
13: * WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License version 2 for more details (a copy is
16: * included at /legal/license.txt).
17: *
18: * You should have received a copy of the GNU General Public License
19: * version 2 along with this work; if not, write to the Free Software
20: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21: * 02110-1301 USA
22: *
23: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
24: * Clara, CA 95054 or visit www.sun.com if you need additional
25: * information or have any questions.
26: *
27: * Copyright 2000 Motorola, Inc. All Rights Reserved.
28: * This notice does not imply publication.
29: */
30:
31: package javax.microedition.rms;
32:
33: /**
34: * A listener interface for receiving Record Changed/Added/Deleted
35: * events from a record store.
36: * @see RecordStore#addRecordListener
37: *
38: * @since MIDP 1.0
39: */
40:
41: public interface RecordListener {
42: /**
43: * Called when a record has been added to a record store.
44: *
45: * @param recordStore the RecordStore in which the record is stored
46: * @param recordId the recordId of the record that has been added
47: */
48: public abstract void recordAdded(RecordStore recordStore,
49: int recordId);
50:
51: /**
52: * Called after a record in a record store has been changed. If the
53: * implementation of this method retrieves the record, it will
54: * receive the changed version.
55: *
56: * @param recordStore the RecordStore in which the record is stored
57: * @param recordId the recordId of the record that has been changed
58: */
59: public abstract void recordChanged(RecordStore recordStore,
60: int recordId);
61:
62: /**
63: * Called after a record has been deleted from a record store. If the
64: * implementation of this method tries to retrieve the record
65: * from the record store, an InvalidRecordIDException will be thrown.
66: *
67: * @param recordStore the RecordStore in which the record was stored
68: * @param recordId the recordId of the record that has been deleted
69: */
70: public abstract void recordDeleted(RecordStore recordStore,
71: int recordId);
72:
73: }
|