|
|
@@ -18,6 +18,7 @@ package com.jfinal.plugin.activerecord;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.function.Function;
|
|
|
|
|
|
/**
|
|
|
* DaoTemplate
|
|
|
@@ -71,6 +72,12 @@ public class DaoTemplate<M extends Model> {
|
|
|
|
|
|
// ---------
|
|
|
|
|
|
+ public void each(Function<Model, Boolean> func) {
|
|
|
+ dao.each(func, sqlPara.getSql(), sqlPara.getPara());
|
|
|
+ }
|
|
|
+
|
|
|
+ // ---------
|
|
|
+
|
|
|
public List<M> findByCache(String cacheName, Object key) {
|
|
|
return dao.findByCache(cacheName, key, sqlPara.getSql(), sqlPara.getPara());
|
|
|
}
|