// Path: mardao-core/src/main/java/net/sf/mardao/core/CursorPage.java
// public class CursorPage<T extends Object> implements Serializable {
//     
//     /** requested page size, not acutal */
//     @Deprecated
//     private transient int requestedPageSize;
//     
//     /** provide this to get next page */
//     private String cursorKey;
//     
//     /** the page of items */
//     private Collection<T> items;
// 
//     /**
//      * The total number of items available. Use for progress indication.
//      */
//     private Integer totalSize;
//     
//     public String getCursorKey() {
//         return cursorKey;
//     }
// 
//     public void setCursorKey(String cursorKey) {
//         this.cursorKey = cursorKey;
//     }
// 
//     public Collection<T> getItems() {
//         return items;
//     }
// 
//     public void setItems(Collection<T> items) {
//         this.items = items;
//     }
// 
//     @Deprecated
//     public int getRequestedPageSize() {
//         return requestedPageSize;
//     }
// 
//     @Deprecated
//     public void setRequestedPageSize(int requestedPageSize) {
//         this.requestedPageSize = requestedPageSize;
//     }
// 
//     public Integer getTotalSize() {
//         return totalSize;
//     }
// 
//     public void setTotalSize(Integer totalSize) {
//         this.totalSize = totalSize;
//     }
// 
// }
// 
// Path: mardao-core/src/main/java/net/sf/mardao/core/filter/Filter.java
// public class Filter {
//     private final String column;
//     private final FilterOperator operator;
//     private final Object operand;
// 
//     private Filter(String column, FilterOperator operation, Object operand) {
//         this.column = column;
//         this.operator = operation;
//         this.operand = operand;
//     }
// 
//     /** Builds an EqualsFilter */
//     public static Filter equalsFilter(String column, Object operand) {
//       return new Filter(column, FilterOperator.EQUALS, operand);
//     }
// 
//     /** Builds an InFilter */
//     public static Filter inFilter(String column, Object operand) {
//       return new Filter(column, FilterOperator.IN, operand);
//     }
// 
//     public static Filter greaterThan(String column, Object operand) {
//         return new Filter(column, FilterOperator.GREATER_THAN, operand);
//     }
// 
//     public static Filter greaterThanOrEquals(String column, Object operand) {
//         return new Filter(column, FilterOperator.GREATER_THAN_OR_EQUALS, operand);
//     }
// 
//     public static Filter lessThan(String column, Object operand) {
//         return new Filter(column, FilterOperator.LESS_THAN, operand);
//     }
// 
//     public static Filter notEqualsFilter(String column, Object operand) {
//       return new Filter(column, FilterOperator.NOT_EQUALS, operand);
//     }
// 
//     public String toString() {
//         return column + " " + operator + " " + operand;
//     }
// 
//     public String getColumn() {
//         return column;
//     }
// 
//     public FilterOperator getOperator() {
//         return operator;
//     }
// 
//     public Object getOperand() {
//         return operand;
//     }
// 
// }


import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import net.sf.mardao.core.CursorPage;
import net.sf.mardao.core.filter.Filter;
import java.io.IOException;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.util.*;
import java.util.concurrent.Callable;
  }

  private Collection<Map<String, Object>> filterValues(Collection<Map<String, Object>> values, Filter... filters) {
    Collection<Map<String, Object>> after = values;
    if (null != filters) {
      for (Filter f : filters) {
        after = new ArrayList<Map<String, Object>>();
        for (Map<String, Object> v : values) {
          if (match(v, f)) {
            after.add(v);
          }
        }
        values = after;
        if (after.isEmpty()) {
          break;
        }
      }
    }
    return after;
  }

  @Override
  public Map<String, Object> queryUnique(Object tx, Mapper mapper, InMemoryKey parentKey, Filter... filters) {
    final Iterable<Map<String, Object>> iterable = queryIterable(tx, mapper, false, 0, 1,
      parentKey, null, null, false, null, false, filters);
    final Iterator<Map<String, Object>> iterator = iterable.iterator();
    return iterator.hasNext() ? iterator.next() : null;
  }

  @Override
// Path: mardao-core/src/main/java/net/sf/mardao/core/CursorPage.java
// public class CursorPage<T extends Object> implements Serializable {
//     
//     /** requested page size, not acutal */
//     @Deprecated
//     private transient int requestedPageSize;
//     
//     /** provide this to get next page */
//     private String cursorKey;
//     
//     /** the page of items */
//     private Collection<T> items;
// 
//     /**
//      * The total number of items available. Use for progress indication.
//      */
//     private Integer totalSize;
//     
//     public String getCursorKey() {
//         return cursorKey;
//     }
// 
//     public void setCursorKey(String cursorKey) {
//         this.cursorKey = cursorKey;
//     }
// 
//     public Collection<T> getItems() {
//         return items;
//     }
// 
//     public void setItems(Collection<T> items) {
//         this.items = items;
//     }
// 
//     @Deprecated
//     public int getRequestedPageSize() {
//         return requestedPageSize;
//     }
// 
//     @Deprecated
//     public void setRequestedPageSize(int requestedPageSize) {
//         this.requestedPageSize = requestedPageSize;
//     }
// 
//     public Integer getTotalSize() {
//         return totalSize;
//     }
// 
//     public void setTotalSize(Integer totalSize) {
//         this.totalSize = totalSize;
//     }
// 
// }
// 
// Path: mardao-core/src/main/java/net/sf/mardao/core/filter/Filter.java
// public class Filter {
//     private final String column;
//     private final FilterOperator operator;
//     private final Object operand;
// 
//     private Filter(String column, FilterOperator operation, Object operand) {
//         this.column = column;
//         this.operator = operation;
//         this.operand = operand;
//     }
// 
//     /** Builds an EqualsFilter */
//     public static Filter equalsFilter(String column, Object operand) {
//       return new Filter(column, FilterOperator.EQUALS, operand);
//     }
// 
//     /** Builds an InFilter */
//     public static Filter inFilter(String column, Object operand) {
//       return new Filter(column, FilterOperator.IN, operand);
//     }
// 
//     public static Filter greaterThan(String column, Object operand) {
//         return new Filter(column, FilterOperator.GREATER_THAN, operand);
//     }
// 
//     public static Filter greaterThanOrEquals(String column, Object operand) {
//         return new Filter(column, FilterOperator.GREATER_THAN_OR_EQUALS, operand);
//     }
// 
//     public static Filter lessThan(String column, Object operand) {
//         return new Filter(column, FilterOperator.LESS_THAN, operand);
//     }
// 
//     public static Filter notEqualsFilter(String column, Object operand) {
//       return new Filter(column, FilterOperator.NOT_EQUALS, operand);
//     }
// 
//     public String toString() {
//         return column + " " + operator + " " + operand;
//     }
// 
//     public String getColumn() {
//         return column;
//     }
// 
//     public FilterOperator getOperator() {
//         return operator;
//     }
// 
//     public Object getOperand() {
//         return operand;
//     }
// 
// }


// Path: mardao-core/src/main/java/net/sf/mardao/dao/InMemorySupplier.java
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import net.sf.mardao.core.CursorPage;
import net.sf.mardao.core.filter.Filter;
import java.io.IOException;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.util.*;
import java.util.concurrent.Callable;

  }

  private Collection<Map<String, Object>> filterValues(Collection<Map<String, Object>> values, Filter... filters) {
    Collection<Map<String, Object>> after = values;
    if (null != filters) {
      for (Filter f : filters) {
        after = new ArrayList<Map<String, Object>>();
        for (Map<String, Object> v : values) {
          if (match(v, f)) {
            after.add(v);
          }
        }
        values = after;
        if (after.isEmpty()) {
          break;
        }
      }
    }
    return after;
  }

  @Override
  public Map<String, Object> queryUnique(Object tx, Mapper mapper, InMemoryKey parentKey, Filter... filters) {
    final Iterable<Map<String, Object>> iterable = queryIterable(tx, mapper, false, 0, 1,
      parentKey, null, null, false, null, false, filters);
    final Iterator<Map<String, Object>> iterator = iterable.iterator();
    return iterator.hasNext() ? iterator.next() : null;
  }

  @Override
  public CursorPage<Map<String, Object>> queryPage(Object tx, Mapper mapper, boolean keysOnly,