use of app.hongs.db.util.FetchCase in project HongsCORE by ihongs.
the class UserAction method getList.
@Action("list")
public void getList(ActionHelper helper) throws HongsException {
Map rd = helper.getRequestData();
FetchCase fc = model.fetchCase();
fc.setOption("INCLUDE_REMOVED", Synt.declare(rd.get("include-removed"), false));
fc.setOption("INCLUDE_PARENTS", Synt.declare(rd.get("include-parents"), false));
rd = model.getList(rd, fc);
// Remove the password field, don't show password in page
List<Map> list = (List) rd.get("list");
for (Map info : list) {
info.remove("password");
info.remove("passcode");
}
helper.reply(rd);
}
use of app.hongs.db.util.FetchCase in project HongsCORE by ihongs.
the class DBAction method isUnique.
@Action("unique")
public void isUnique(ActionHelper helper) throws HongsException {
Model ett = getEntity(helper);
Map req = helper.getRequestData();
req = getReqMap(helper, ett, "unique", req);
FetchCase c = new FetchCase();
c.setOption("INCLUDE_REMOVED", Synt.declare(req.get("include-removed"), false));
boolean val = ett.unique(req, c);
helper.reply(null, val ? 1 : 0);
}
Aggregations