} // getTables() public static DataSet getPaged(DataSet dataSet, int firstRow, int maxRows) { if (firstRow > 1) { dataSet = new FirstRowDataSet(dataSet, firstRow); } if (maxRows != -1) { dataSet = new MaxRowsDataSet(dataSet, maxRows); } return(dataSet); } // getPaged()
} // materializeMainSchemaTable() /** * Executes a simple one-table query against a table in the main schema of * the subclasses of this class. This default implementation will delegate * to {@link #materializeMainSchemaTable(Table, Column[], int)} and apply a * {@link FirstRowDataSet} if necessary. * * @param table * @param columns * @param firstRow * @param maxRows * @return */ public virtual DataSet materializeMainSchemaTable(Table table, Column[] columns, int firstRow, int maxRows) { int rowsToMaterialize; if (firstRow == 1) { rowsToMaterialize = maxRows; } else { rowsToMaterialize = maxRows + (firstRow - 1); } DataSet dataSet = materializeMainSchemaTable(table, columns, rowsToMaterialize); if (firstRow > 1) { dataSet = new FirstRowDataSet(dataSet, firstRow); } return(dataSet); } // materializeMainSchemaTable()