@SuppressWarnings("unchecked")
 public List<CmsKeyword> getList(Integer siteId, boolean onlyEnabled, boolean cacheable) {
   Finder f = Finder.create("from CmsKeyword bean where 1=1");
   if (siteId != null) {
     f.append(" and bean.site.id=:siteId");
     f.setParam("siteId", siteId);
   }
   if (onlyEnabled) {
     f.append(" and bean.disabled=false");
   }
   f.append(" order by bean.id desc");
   f.setCacheable(cacheable);
   return find(f);
 }
Esempio n. 2
0
 /**
  * 设置参数。与hibernate的Query接口一致。
  *
  * @param paramMap
  * @return
  * @see Query#setProperties(Map)
  */
 public Finder setParams(Map<String, Object> paramMap) {
   for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
     setParam(entry.getKey(), entry.getValue());
   }
   return this;
 }