SAP J2EE Engine

Version 6.40


com.sapportals.connector.execution.structures
Interface IRecordSet

All Superinterfaces:
IAbstractRecord, ISOAPSerializable

public interface IRecordSet
extends IAbstractRecord, ISOAPSerializable

Represents tabular data, which is usually generated by executing a query in the EIS. A RecordSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next() method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the record set.

Version:
1.0

Field Summary
static int RECORD_TYPE_FORWARD_ONLY
          Indicates that the record set cursor can only iterate with next()
static int RECORD_TYPE_SCROLLABLE
          Indicates that the record set cursor can handle all iterating operations
 
Method Summary
 boolean absolute(int row)
          Moves the cursor to the given row number in this RecordSet object.
 void afterLast()
          Moves the cursor to the end of this RecordSet object, just after the last row.
 void beforeFirst()
          Moves the cursor to the front of this RecordSet object, just before the first row.
 void deleteRow()
          Deletes the current row from this ResultSet object.
 boolean first()
          Moves the cursor to the first row in this ResultSet object.
 java.util.Enumeration getRecords()
          Return an Enueration of IRecord objects for going over this RecordSet's records.
 void insertRow()
          Inserts the contents of the insert row into this RecordSet object.
 boolean isAfterLast()
          Indicates whether the cursor is after the last row in this RecordSet object.
 boolean isBeforeFirst()
          Indicates whether the cursor is before the first row in this RecordSet object.
 boolean isFirst()
          Indicates whether the cursor is on the first row of this RecordSet object.
 boolean isLast()
          Indicates whether the cursor is on the last row of this RecordSet object.
 boolean last()
          Moves the cursor to the last row in this RecordSet object.
 void moveToCurrentRow()
          Moves the cursor to the insert row.
 void moveToInsertRow()
          Moves the cursor to the remembered cursor position, usually the current row.
 boolean next()
          Moves the cursor down one row from its current position.
 boolean previous()
          Moves the cursor to the previous row in this RecordSet object.
 void refreshRow()
          Refreshes the current row with its most recent value in the database.
 boolean relative(int rows)
          Moves the cursor a relative number of rows, either positive or negative.
 int retrieveRow()
          Retrieves the current row number.
 int retrieveType()
          Return the type of the record set FORWARD_ONLY indicates that the only possible iterating operation is next() SCROLLABLE indicates that other iterating operations can be used
 void updateRow()
          Updates the underlying database with the new contents of the current row of this RecordSet object.
 
Methods inherited from interface com.sapportals.connector.execution.structures.IAbstractRecord
close, getBigDecimal, getBigDecimal, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getChar, getChar, getColumnIndex, getColumnName, getDate, getDate, getDouble, getDouble, getEnumeration, getEnumeration, getFloat, getFloat, getInt, getInt, getLong, getLong, getNumber, getNumber, getObject, getObject, getShort, getShort, getString, getString, getTime, getTime, retrieveMetaData, setBigDecimal, setBigDecimal, setBoolean, setBoolean, setByte, setByte, setBytes, setBytes, setChar, setChar, setDate, setDate, setDouble, setDouble, setEnumeration, setEnumeration, setFloat, setFloat, setInt, setInt, setLong, setLong, setNull, setNull, setNumber, setNumber, setObject, setObject, setShort, setShort, setString, setString, setTime, setTime
 

Field Detail

RECORD_TYPE_FORWARD_ONLY

public static final int RECORD_TYPE_FORWARD_ONLY
Indicates that the record set cursor can only iterate with next()

RECORD_TYPE_SCROLLABLE

public static final int RECORD_TYPE_SCROLLABLE
Indicates that the record set cursor can handle all iterating operations
Method Detail

first

public boolean first()
              throws ConnectorException
Moves the cursor to the first row in this ResultSet object.
Returns:
true if the cursor is on a valid row. false if there are no rows in the record set
Throws:
ConnectorException -  

isFirst

public boolean isFirst()
                throws ConnectorException
Indicates whether the cursor is on the first row of this RecordSet object.
Returns:
true if the cursor is on the first row. false otherwise
Throws:
ConnectorException -  

last

public boolean last()
             throws ConnectorException
Moves the cursor to the last row in this RecordSet object.
Returns:
true if the cursor is on a valid row; false if there are no rows in the record set
Throws:
ConnectorException -  

isLast

public boolean isLast()
               throws ConnectorException
Indicates whether the cursor is on the last row of this RecordSet object.
Returns:
true if the cursor is on the last row. false otherwise
Throws:
ConnectorException -  

retrieveRow

public int retrieveRow()
                throws ConnectorException
Retrieves the current row number. The first row is number 1, the second number 2, and so on.
Returns:
the current row number; 0 if there is no current row
Throws:
ConnectorException -  

next

public boolean next()
             throws ConnectorException
Moves the cursor down one row from its current position. A RecordSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.
Returns:
true if the new current row is valid; false if there are no more rows
Throws:
ConnectorException -  

previous

public boolean previous()
                 throws ConnectorException
Moves the cursor to the previous row in this RecordSet object.
Returns:
true if the cursor is on a valid row; false if it is off the record set
Throws:
ConnectorException -  

absolute

public boolean absolute(int row)
                 throws ConnectorException
Moves the cursor to the given row number in this RecordSet object. If the row number is positive, the cursor moves to the given row number with respect to the beginning of the record set. The first row is row 1, the second is row 2, and so on. If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the record set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on. An attempt to position the cursor beyond the first/last row in the record set leaves the cursor before the first row or after the last row.
Returns:
true if the cursor is on the record set; false otherwise
Throws:
ConnectorException -  

relative

public boolean relative(int rows)
                 throws ConnectorException
Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the record set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position. Note: Calling the method relative(1) is different from calling the method next() because is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the record set.
Returns:
true if the cursor is on a row; false otherwise
Throws:
ConnectorException -  

beforeFirst

public void beforeFirst()
                 throws ConnectorException
Moves the cursor to the front of this RecordSet object, just before the first row. This method has no effect if the record set contains no rows.
Throws:
ConnectorException -  

afterLast

public void afterLast()
               throws ConnectorException
Moves the cursor to the end of this RecordSet object, just after the last row. This method has no effect if the result set contains no rows.
Throws:
ConnectorException -  

isBeforeFirst

public boolean isBeforeFirst()
                      throws ConnectorException
Indicates whether the cursor is before the first row in this RecordSet object.
Returns:
true if the cursor is before the first row; false if the cursor is at any other position or the record set contains no rows
Throws:
ConnectorException -  

isAfterLast

public boolean isAfterLast()
                    throws ConnectorException
Indicates whether the cursor is after the last row in this RecordSet object.
Returns:
true if the cursor is after the last row; false if the cursor is at any other position or the record set contains no rows
Throws:
ConnectorException -  

insertRow

public void insertRow()
               throws ConnectorException
Inserts the contents of the insert row into this RecordSet object. The cursor must be on the insert row when this method is called.
Throws:
ConnectorException -  

updateRow

public void updateRow()
               throws ConnectorException
Updates the underlying database with the new contents of the current row of this RecordSet object. This method cannot be called when the cursor is on the insert row.
Throws:
ConnectorException -  

deleteRow

public void deleteRow()
               throws ConnectorException
Deletes the current row from this ResultSet object. This method cannot be called when the cursor is on the insert row.
Throws:
ConnectorException -  

refreshRow

public void refreshRow()
                throws ConnectorException
Refreshes the current row with its most recent value in the database. This method cannot be called when the cursor is on the insert row.
Throws:
ConnectorException -  

moveToInsertRow

public void moveToInsertRow()
                     throws ConnectorException
Moves the cursor to the remembered cursor position, usually the current row. This method has no effect if the cursor is not on the insert row.
Throws:
ConnectorException -  

moveToCurrentRow

public void moveToCurrentRow()
                      throws ConnectorException
Moves the cursor to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable record set. It is essentially a buffer where a new row may be constructed by calling the setXXX methods prior to inserting the row into the record set. Only the setXXX, getXXX, and insertRow methods may be called when the cursor is on the insert row. All of the columns in a record set must be given a value each time this method is called before calling insertRow. An setXXX method must be called before a getXXX method can be called on a column value.
Throws:
ConnectorException -  

getRecords

public java.util.Enumeration getRecords()
                                 throws ConnectorException
Return an Enueration of IRecord objects for going over this RecordSet's records.
Returns:
Enumeration the records of the record set as an enumeration

retrieveType

public int retrieveType()
                 throws ConnectorException
Return the type of the record set FORWARD_ONLY indicates that the only possible iterating operation is next() SCROLLABLE indicates that other iterating operations can be used
Returns:
int the type of the record set

SAP J2EE Engine

Version 6.40


Copyright © 2001-2005 SAP AG. All Rights Reserved.