예제 #1
0
 @SuppressWarnings("unchecked")
 public List<CmsKeyword> getListGlobal(boolean onlyEnabled, boolean cacheable) {
   Finder f = Finder.create("from CmsKeyword bean where bean.site.id is null");
   if (onlyEnabled) {
     f.append(" and bean.disabled=false");
   }
   f.append(" order by bean.id desc");
   return find(f);
 }
예제 #2
0
 @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);
 }
예제 #3
0
파일: Finder.java 프로젝트: kevonz/saas-cms
 public static void main(String[] args) {
   Finder find = Finder.create("select distinct p FROM BookType join fetch p");
   System.out.println(find.getRowCountHql());
   System.out.println(find.getOrigHql());
 }