01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package javax.sql;
19:
20: import java.util.EventListener;
21:
22: /**
23: * An interface used to send notification of events occurring in a RowSet. To
24: * receive the notification events, an object must implement the RowSetListener
25: * interface and then register itself with the RowSet of interest using the
26: * <code>RowSet.addRowSetListener</code> method.
27: */
28: public interface RowSetListener extends EventListener {
29:
30: /**
31: * Notifies the listener that one of the RowSet's rows has changed.
32: *
33: * @param theEvent
34: * a RowSetEvent that contains information about the RowSet
35: * involved. This information can be used to retrieve information
36: * about the change, such as the new cursor position.
37: */
38: public void cursorMoved(RowSetEvent theEvent);
39:
40: /**
41: * Notifies the listener that the RowSet's cursor has moved.
42: *
43: * @param theEvent
44: * theEvent a RowSetEvent that contains information about the
45: * RowSet involved. This information can be used to retrieve
46: * information about the change, such as the updated data values.
47: */
48: public void rowChanged(RowSetEvent theEvent);
49:
50: /**
51: * Notifies the listener that the RowSet's entire contents have been updated
52: * (an example is the execution of a command which retrieves new data from
53: * the database).
54: *
55: * @param theEvent
56: * theEvent a RowSetEvent that contains information about the
57: * RowSet involved. This information can be used to retrieve
58: * information about the change, such as the updated rows of
59: * data.
60: */
61: public void rowSetChanged(RowSetEvent theEvent);
62: }
|