KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > sql > execute > TargetResultSet


1 /*
2
3    Derby - Class org.apache.derby.iapi.sql.execute.TargetResultSet
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.sql.execute;
23
24 import org.apache.derby.iapi.error.StandardException;
25
26 import org.apache.derby.iapi.sql.execute.ExecRow;
27
28 import org.apache.derby.iapi.sql.ResultSet;
29
30 import org.apache.derby.iapi.types.RowLocation;
31
32 /**
33  * The TargetResultSet interface is used to provide additional
34  * operations on result sets that are the target of a bulk insert
35  * or update. This is useful because bulk insert is upside down -
36  * the insert is done via the store.
37  *
38  * @author jerry
39  */

40 public interface TargetResultSet extends ResultSet
41 {
42     /**
43      * Pass a changed row and the row location for that row
44      * to the target result set.
45      *
46      * @param execRow The changed row.
47      * @param rowLocation The row location of the row.
48      *
49      * @exception StandardException thrown if cursor finished.
50      */

51     public void changedRow(ExecRow execRow, RowLocation rowLocation) throws StandardException;
52
53     /**
54      * Preprocess the source row prior to getting it back from the source.
55      * This is useful for bulk insert where the store stands between the target and
56      * the source.
57      *
58      * @param sourceRow The source row.
59      *
60      * @return The preprocessed source row.
61      *
62      * @exception StandardException thrown if cursor finished.
63      */

64     public ExecRow preprocessSourceRow(ExecRow sourceRow) throws StandardException;
65 }
66
Popular Tags