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.sql.SQLException;
21:
22: /**
23: * An interface which provides functionality for a disconnected RowSet to get
24: * data from a data source into its rows. The RowSet calls the RowSetReader
25: * interface when the RowSet's execute method is invoked - a RowSetReader must
26: * first be registered with the RowSet for this to work.
27: */
28: public interface RowSetReader {
29:
30: /**
31: * Reads new data into the RowSet. The calling RowSet object must itself
32: * implement the RowSetInternal interface and the RowSetReader must be
33: * registered as a Reader on the RowSet.
34: * <p>
35: * This method adds rows into the calling RowSet. The Reader may invoke any
36: * of the RowSet's methods except for the <code>execute</code> method
37: * (calling execute will cause an SQLException to be thrown). However, when
38: * the Reader calls the RowSet's methods, no events are sent to listeners -
39: * any listeners are informed by the calling RowSet's execute method once
40: * the Reader returns from the readData method.
41: *
42: * @param theCaller
43: * must be the calling RowSet object, which must have implemented
44: * the RowSetInternal interface.
45: * @throws SQLException
46: * if a problem occurs accessing the database or if the Reader
47: * calls the RowSet.execute method.
48: */
49: public void readData(RowSetInternal theCaller) throws SQLException;
50: }
|