Skip to content

Commit

Permalink
countAll return Long
Browse files Browse the repository at this point in the history
  • Loading branch information
nk committed Feb 17, 2012
1 parent 687b9f1 commit 1f25572
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -31,7 +31,7 @@ public String list(Integer page, Integer size, Model model, HttpServletRequest r
int sizeNo = size == null ? 50 : size.intValue(); int sizeNo = size == null ? 50 : size.intValue();
int pageNo = page == null ? 0 : (page.intValue()); int pageNo = page == null ? 0 : (page.intValue());
int offset = pageNo * sizeNo; int offset = pageNo * sizeNo;
Integer itemNo = dao.countAll(entityClass); Long itemNo = dao.countAll(entityClass);
Pager pager = new Pager(request.getRequestURI(), itemNo.longValue(), Integer.valueOf(pageNo).longValue(), sizeNo); Pager pager = new Pager(request.getRequestURI(), itemNo.longValue(), Integer.valueOf(pageNo).longValue(), sizeNo);
model.addAttribute("itemNo", itemNo); model.addAttribute("itemNo", itemNo);
model.addAttribute("sizeNo", sizeNo); model.addAttribute("sizeNo", sizeNo);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gr/dsigned/springcrudutils/data/Dao.java
Expand Up @@ -17,7 +17,7 @@ public interface Dao<K, E> {


public void merge(E entity); public void merge(E entity);


public Integer countAll(Class<? extends SystemEntity> entity); public Long countAll(Class<? extends SystemEntity> entity);


public List<E> listAll(Class<? extends SystemEntity> entity, int maxNo, int offset); public List<E> listAll(Class<? extends SystemEntity> entity, int maxNo, int offset);


Expand Down

0 comments on commit 1f25572

Please sign in to comment.