1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * 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 the context of 24 * a {@link RowSet}. To receive the notification events, an object must 25 * implement the {@code RowSetListener} interface and then register itself with 26 * the {@code RowSet} of interest using the 27 * {@link RowSet#addRowSetListener(RowSetListener)} method. 28 */ 29 public interface RowSetListener extends EventListener { 30 31 /** 32 * Notifies the listener that the {@code RowSet}'s cursor in {@code 33 * theEvent.getSource} has moved. 34 * 35 * @param theEvent 36 * a {@code RowSetEvent} that contains information about the 37 * {@code RowSet} involved. This information can be used to 38 * retrieve information about the change, such as the updated 39 * data values. 40 */ 41 public void cursorMoved(RowSetEvent theEvent); 42 43 /** 44 * Notifies the listener that one of the {@code RowSet}'s rows in {@code 45 * theEvent.getSource} has changed. 46 * 47 * @param theEvent 48 * a {@code RowSetEvent} that contains information about the 49 * {@code RowSet} involved. This information can be used to 50 * retrieve information about the change, such as the new cursor 51 * position. 52 */ 53 public void rowChanged(RowSetEvent theEvent); 54 55 /** 56 * Notifies the listener that the {@code RowSet}'s entire contents in 57 * {@code theEvent.getSource} have been updated (an example is the execution 58 * of a command which retrieves new data from the database). 59 * 60 * @param theEvent 61 * a {@code RowSetEvent} that contains information about the 62 * {@code RowSet} involved. This information can be used to 63 * retrieve information about the change, such as the updated 64 * rows of data. 65 */ 66 public void rowSetChanged(RowSetEvent theEvent); 67 } 68