DetachedCriteria的使用

DetachedCriteria detachedCriteria = DetachedCriteria.forClass(WtPepBillpay.class);
detachedCriteria.createAlias("id", "id");
detachedCriteria.add(Restrictions.eq(WtPepBillpay.BILLMERCODE, organizationCode));
detachedCriteria.add(Restrictions.between(WtPepBillpay.PEPDATE, start, end));
detachedCriteria.add(Restrictions.like(WtPepBillpay.PHONE, form.getZonePhone().trim()));
detachedCriteria.add(Restrictions.ne(WtPepBillpay.BILLPAYCODE, "SS"));
detachedCriteria.addOrder(Order.desc("pepdate"));
detachedCriteria.addOrder(Order.desc("peptime"));
PaginationSupport pagination = this.getBill2Service().getBillPayList(detachedCriteria, form.getStartIndex());
List billPayList = pagination.getItems();
request.setAttribute("billList", billPayList);
request.setAttribute("pagination", pagination);

你可能感兴趣的:(Criteria)