Example usage for org.apache.commons.dbutils ResultSetIterator ResultSetIterator

List of usage examples for org.apache.commons.dbutils ResultSetIterator ResultSetIterator

Introduction

In this page you can find the example usage for org.apache.commons.dbutils ResultSetIterator ResultSetIterator.

Prototype

public ResultSetIterator(ResultSet rs) 

Source Link

Document

Constructor for ResultSetIterator.

Usage

From source file:org.paxml.table.jdbc.JdbcTable.java

@Override
protected Iterator<IRow> getAllRows() {
    return new AbstractIteratorDecorator(new ResultSetIterator(rs)) {
        private int index;

        @Override/*from ww w .ja v a  2 s .c om*/
        public Object next() {

            Object[] row = (Object[]) super.next();
            return new JdbcRow(index++, row, JdbcTable.this);
        }

    };

}