1 /* 2 3 Derby - Class org.apache.derby.iapi.sql.execute.CursorResultSet 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.sql.ResultSet; 25 import org.apache.derby.iapi.types.RowLocation; 26 import org.apache.derby.iapi.error.StandardException; 27 28 /** 29 * The CursorResultSet interface is used to provide additional 30 * operations on result sets that can be used in cursors. 31 * <p> 32 * Since the ResulSet operations must also be supported by 33 * cursor result sets, we extend that interface here as well. 34 * 35 * @author ames 36 */ 37 public interface CursorResultSet extends ResultSet { 38 39 /** 40 * Returns the row location of the current base table row of the cursor. 41 * If this cursor's row is composed of multiple base tables' rows, 42 * i.e. due to a join, then a null is returned. 43 * 44 * @return the row location of the current cursor row. 45 * @exception StandardException thrown on failure to 46 * get location from storage engine 47 */ 48 RowLocation getRowLocation() throws StandardException; 49 50 /** 51 * Returns the current row of the result set. 52 * REMIND: eventually, this will only return the current row 53 * for result sets that need to return it; either some field 54 * in the activation or a parameter in the constructor will be 55 * used to signal that this needs to function. This will let us 56 * limit the number of live objects we are holding on to. 57 * <p> 58 * @return the last row returned by getNextRow. null if closed. 59 * @exception StandardException thrown on failure. 60 */ 61 ExecRow getCurrentRow() throws StandardException; 62 63 } 64