Пример #1
0
 public Object findById(Serializable id) {
   try {
     return service.findById(id);
   } catch (Exception e) {
     return null;
   }
 }
Пример #2
0
 public void deleteByKey(Serializable id) {
   try {
     service.deleteByKey(id);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #3
0
 public void update(T entity) {
   try {
     service.update(entity);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #4
0
 public List<T> find(final String hql, Object[] values) {
   try {
     return service.find(hql, values);
   } catch (Exception e) {
     e.printStackTrace();
     return null;
   }
 }
Пример #5
0
 public List<T> findByHQL(final String hql) {
   return service.findByHQL(hql);
 }
Пример #6
0
 public Map findCountAndPageBySql(int currPage, int pagesize, String sql, Class<T> cls) {
   return service.findCountAndPageBySql(currPage, pagesize, sql, cls);
 }
Пример #7
0
 public Map findPage(int currPage, int pagesize, String hql) {
   return service.findPage(currPage, pagesize, hql);
 }
Пример #8
0
 public List<T> findByHQL(int currPage, int pagesize, String hql) {
   return service.findByHQL(currPage, pagesize, hql);
 }
Пример #9
0
 public Long getRowCount(String HQL) throws Exception {
   return service.getRowCount(HQL);
 }
Пример #10
0
 public List<T> findByCriteria(int firstResult, int maxResults, DetachedCriteria criteria)
     throws Exception {
   return service.findByCriteria(maxResults, (firstResult - 1) * maxResults, criteria);
 }