Java Code Examples for java.sql.ResultSet.FETCH_FORWARD

The following are Jave code examples for showing how to use FETCH_FORWARD of the java.sql.ResultSet class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: sstore-soft   File: JDBC4Statement.java   View Source Code Vote up 5 votes
@Override
public void setFetchDirection(int direction) throws SQLException
{
    checkClosed();
    if ((direction != ResultSet.FETCH_FORWARD) && (direction != ResultSet.FETCH_REVERSE) && (direction != ResultSet.FETCH_UNKNOWN)) {
        throw SQLError.get(SQLError.ILLEGAL_ARGUMENT, direction);
    }
    this.fetchDirection = direction;
}
 
Example 2
Project: the-vigilantes   File: StatementWrapper.java   View Source Code Vote up 5 votes
public int getFetchDirection() throws SQLException {
    try {
        if (this.wrappedStmt != null) {
            return this.wrappedStmt.getFetchDirection();
        }

        throw SQLError.createSQLException("Statement already closed", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
    } catch (SQLException sqlEx) {
        checkAndFireConnectionError(sqlEx);
    }

    return ResultSet.FETCH_FORWARD; // we actually never get here, but the compiler can't figure that out
}
 
Example 3
Project: s-store   File: JDBC4Statement.java   View Source Code Vote up 5 votes
@Override
public void setFetchDirection(int direction) throws SQLException
{
    checkClosed();
    if ((direction != ResultSet.FETCH_FORWARD) && (direction != ResultSet.FETCH_REVERSE) && (direction != ResultSet.FETCH_UNKNOWN)) {
        throw SQLError.get(SQLError.ILLEGAL_ARGUMENT, direction);
    }
    this.fetchDirection = direction;
}
 
Example 4
Project: OpenVertretung   File: StatementWrapper.java   View Source Code Vote up 5 votes
public int getFetchDirection() throws SQLException {
    try {
        if (this.wrappedStmt != null) {
            return this.wrappedStmt.getFetchDirection();
        }

        throw SQLError.createSQLException("Statement already closed", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
    } catch (SQLException sqlEx) {
        checkAndFireConnectionError(sqlEx);
    }

    return ResultSet.FETCH_FORWARD; // we actually never get here, but the compiler can't figure that out
}
 
Example 5
Project: lams   File: StatementWrapper.java   View Source Code Vote up 5 votes
public int getFetchDirection() throws SQLException {
    try {
        if (this.wrappedStmt != null) {
            return this.wrappedStmt.getFetchDirection();
        }

        throw SQLError.createSQLException("Statement already closed", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
    } catch (SQLException sqlEx) {
        checkAndFireConnectionError(sqlEx);
    }

    return ResultSet.FETCH_FORWARD; // we actually never get here, but the compiler can't figure that out
}
 
Example 6
Project: ProyectoPacientes   File: StatementWrapper.java   View Source Code Vote up 5 votes
public int getFetchDirection() throws SQLException {
    try {
        if (this.wrappedStmt != null) {
            return this.wrappedStmt.getFetchDirection();
        }

        throw SQLError.createSQLException("Statement already closed", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
    } catch (SQLException sqlEx) {
        checkAndFireConnectionError(sqlEx);
    }

    return ResultSet.FETCH_FORWARD; // we actually never get here, but the compiler can't figure that out
}
 
Example 7
Project: blanco-sfdc-jdbc-driver   File: AbstractBlancoGenericJdbcStatement.java   View Source Code Vote up 5 votes
public int getFetchDirection() throws SQLException {
	if (conn.isClosed()) {
		throw new SQLException(BlancoGenericJdbcConstants.MESSAGE_DATABASE_CLOSED);
	}

	// Always FETCH FORWARD.
	return ResultSet.FETCH_FORWARD;
}
 
Example 8
Project: BibliotecaPS   File: StatementWrapper.java   View Source Code Vote up 5 votes
public int getFetchDirection() throws SQLException {
    try {
        if (this.wrappedStmt != null) {
            return this.wrappedStmt.getFetchDirection();
        }

        throw SQLError.createSQLException("Statement already closed", SQLError.SQL_STATE_ILLEGAL_ARGUMENT, this.exceptionInterceptor);
    } catch (SQLException sqlEx) {
        checkAndFireConnectionError(sqlEx);
    }

    return ResultSet.FETCH_FORWARD; // we actually never get here, but the compiler can't figure that out
}
 
Example 9
Project: jdk8u-jdk   File: CommonRowSetTests.java   View Source Code Vote up 5 votes
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
    RowSet rs = newInstance();
    return new Object[][]{
        {rs, ResultSet.FETCH_FORWARD},
        {rs, ResultSet.FETCH_REVERSE},
        {rs, ResultSet.FETCH_UNKNOWN}
    };
}
 
Example 10
Project: openjdk-jdk10   File: CommonRowSetTests.java   View Source Code Vote up 5 votes
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
    RowSet rs = newInstance();
    return new Object[][]{
        {rs, ResultSet.FETCH_FORWARD},
        {rs, ResultSet.FETCH_REVERSE},
        {rs, ResultSet.FETCH_UNKNOWN}
    };
}
 
Example 11
Project: iotdb-jdbc   File: TsfileStatement.java   View Source Code Vote up 5 votes
@Override
public void setFetchDirection(int direction) throws SQLException {
	checkConnection("setFetchDirection");
	if (direction != ResultSet.FETCH_FORWARD) {
		throw new SQLException(String.format("direction %d is not supported!", direction));
	}
}
 
Example 12
Project: spanner-jdbc   File: AbstractCloudSpannerFetcher.java   View Source Code Vote up 4 votes
public void setFetchDirection(int direction) throws SQLException
{
	if (direction != ResultSet.FETCH_FORWARD)
		throw new SQLFeatureNotSupportedException("Only FETCH_FORWARD is supported");
}
 
Example 13
Project: spanner-jdbc   File: AbstractCloudSpannerFetcher.java   View Source Code Vote up 4 votes
public int getFetchDirection() throws SQLException
{
	return ResultSet.FETCH_FORWARD;
}
 
Example 14
Project: Saturn   File: SyncRS.java   View Source Code Vote up 4 votes
public int getFetchDirection() throws SQLException {
    checkOpen();
    return ResultSet.FETCH_FORWARD;
}
 
Example 15
Project: Saturn   File: SyncRS.java   View Source Code Vote up 4 votes
public void setFetchDirection(int d) throws SQLException {
    checkOpen();
    if (d != ResultSet.FETCH_FORWARD)
        throw new SQLException("only FETCH_FORWARD direction supported");
}
 
Example 16
Project: agroal   File: MockStatement.java   View Source Code Vote up 4 votes
@Override
default int getFetchDirection() throws SQLException {
    return ResultSet.FETCH_FORWARD;
}
 
Example 17
Project: iotdb-jdbc   File: TsfileQueryResultSet.java   View Source Code Vote up 4 votes
@Override
public int getFetchDirection() throws SQLException {
	return ResultSet.FETCH_FORWARD;
}
 
Example 18
Project: iotdb-jdbc   File: TsfileStatement.java   View Source Code Vote up 4 votes
@Override
public int getFetchDirection() throws SQLException {
	checkConnection("getFetchDirection");
	return ResultSet.FETCH_FORWARD;
}