All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.jdbcproc.daofactory.internal.ResultSetConverterRowIterator Maven / Gradle / Ivy

There is a newer version: 1.1-35
Show newest version
package com.googlecode.jdbcproc.daofactory.internal;

import com.googlecode.jdbcproc.daofactory.impl.block.IResultSetConverterBlock;

import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Objects;

public class ResultSetConverterRowIterator implements IResultSetConverterBlock {

    @Override public Object convertResultSet(ResultSet resultSet, CallableStatement statement) throws SQLException {
        Objects.requireNonNull(resultSet, "ResultSet is null");

        resultSet.setFetchDirection(ResultSet.FETCH_FORWARD);
        resultSet.setFetchSize(1);

        return new RowIteratorImpl(resultSet, statement);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy