Examples of IRowFilter


Examples of org.apache.metamodel.data.IRowFilter

    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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.