Table customerTable = dc.getDefaultSchema().getTableByName("CUSTOMERS");
Query q = new Query().from(customerTable).select(
customerTable.getColumns());
DataSet dataSet = dc.executeQuery(q);
IRowFilter filter1 = new IRowFilter() {
public boolean accept(Row row) {
// This will only accept five records
boolean result = ((Integer) row.getValue(0)) > 485;
System.out.println("Evaluating: " + row);
System.out.println("Accepting: " + result);
return result;
}
};
IRowFilter filter2 = new IRowFilter() {
int count = 0;
public boolean accept(Row row) {
count++;
return (count == 2 || count == 3);