Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Firebird Open Source J2ee connector - jdbc driver
   *
   * Distributable under LGPL license.
   * You may obtain a copy of the License at http://www.gnu.org/copyleft/lgpl.html
   *
   * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * LGPL License for more details.
  *
  * This file was created by members of the firebird development team.
  * All individual contributions remain the Copyright (C) of those
  * individuals.  Contributors to this file are either listed here or
  * can be obtained from a CVS history command.
  *
  * All rights reserved.
  */
 
 package org.firebirdsql.jdbc;
 
Instances of this class are able to fetch records from the server.
 
 interface FBFetcher {
 
     static final int MAX_FETCH_ROWS = 400;

    
Move cursor to the rist row.

Returns:
true if cursor was moved to the first row.
Throws:
java.sql.SQLException if something went wrong.
 
     boolean first() throws SQLException;
    
    
Move cursor to the last row.

Returns:
true if cursor was moved to the last row.
Throws:
java.sql.SQLException if something went wrong.
 
     boolean last() throws SQLException;
    
    
Move cursor to the previous row.

Returns:
true if cursor was moved to the prevous row.
Throws:
java.sql.SQLException if something went wrong.
 
     boolean previous() throws SQLException;
    
    
Move to next row.

Returns:
true if cursor was moved.
Throws:
java.sql.SQLException if something went wrong.
 
     boolean next() throws SQLException;

    
Move cursor to the absolute row.

Parameters:
row absolute row number.
Returns:
true if cursor was successfully moved.
Throws:
java.sql.SQLException if something went wrong.
 
     boolean absolute(int rowthrows SQLException;
    
    
Move cursor relative to the current row.

Parameters:
row relative row position.
Returns:
true if cursor was successfully moved.
Throws:
java.sql.SQLException if something went wrong.
 
     boolean relative(int rowthrows SQLException;    
    
    
Move cursor before first record.

Throws:
java.sql.SQLException if something went wrong.
 
     void beforeFirst() throws SQLException;
    
    
Move cursor after last record.

Throws:
java.sql.SQLException if something went wrong.
    void afterLast() throws SQLException;
    
    
Close this fetcher and corresponding result set.

Throws:
java.sql.SQLException if something went wrong.
    void close() throws SQLException;

    
Get row number.

Returns:
row number.
	int getRowNum();
    
	boolean isEmpty() throws SQLException;
	boolean isBeforeFirst() throws SQLException;
	boolean isFirst() throws SQLException;
	boolean isLast() throws SQLException;
	boolean isAfterLast() throws SQLException;
    
    
Insert row at current position. This method adds a row at the current position in case of updatable result sets after successfull execution of the java.sql.ResultSet.insertRow() method.

Parameters:
data row data
Throws:
java.sql.SQLException if operation cannot be completed.
    void insertRow(byte[][] datathrows SQLException;
    
    
Delete row at current position. This method deletes a row at the current position in case of updatable result sets after successfull execution of the java.sql.ResultSet.deleteRow() method.

Throws:
java.sql.SQLException if operation cannot be completed.
    void deleteRow() throws SQLException;
    
    
Update row at current position. This method updates a row at the current position in case of updatable result sets after successfull execution of the java.sql.ResultSet.updateRow() method.

Parameters:
data row data
Throws:
java.sql.SQLException if operation cannot be completed.
    void updateRow(byte[][] datathrows SQLException;

    
Set the suggested number of rows to fetch with each batch fetch.

Returns:
The number of rows to be fetched
    int getFetchSize() throws SQLException;

    
Get the suggested number of rows to fetch with each batch fetch.

Parameters:
fetchSize The suggested number of rows to fetch
    void setFetchSize(int fetchSize);
New to GrepCode? Check out our FAQ X