01: /*
02:
03: Derby - Class org.apache.derby.iapi.sql.execute.TargetResultSet
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (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: * Pass a changed row and the row location for that row
43: * to the target result set.
44: *
45: * @param execRow The changed row.
46: * @param rowLocation The row location of the row.
47: *
48: * @exception StandardException thrown if cursor finished.
49: */
50: public void changedRow(ExecRow execRow, RowLocation rowLocation)
51: 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)
65: throws StandardException;
66: }
|