package foam.dao;

import foam.core.Detachable;
import foam.core.FObject;

public class RemoveSink {

  public RemoveSink(final DAO dao) {
    dao.select_(((AbstractDAO) dao).getX(), new AbstractSink() {
      @Override
      public void put(FObject obj, Detachable sub) {
        dao.remove(obj);
      }
    }, 0, AbstractDAO.MAX_SAFE_INTEGER,null, null);
  }
}

@@ -66,16 +66,91 @@
 FObject;
+%0Aimport foam.mlang.order.Comparator;%0Aimport foam.mlang.predicate.Predicate;
 %0A%0Apublic
@@ -429,11 +429,321 @@
 ll);%0A  %7D
+%0A%0A  public RemoveSink(final DAO dao, long skip, long limit, Comparator order, Predicate predicate) %7B%0A    dao.select_(((AbstractDAO) dao).getX(), new AbstractSink() %7B%0A      @Override%0A      public void put(FObject obj, Detachable sub) %7B%0A        dao.remove(obj);%0A      %7D%0A    %7D, skip, limit, order, predicate);%0A  %7D
 %0A%7D%0A

add second constructor to remove sink class