(int totalCnt, SearchCondition sc)
| 32 | } |
| 33 | |
| 34 | private void doPaging(int totalCnt, SearchCondition sc) { |
| 35 | this.totalPage = totalCnt / sc.getPageSize() + (totalCnt % sc.getPageSize()==0? 0:1); |
| 36 | this.sc.setPage(Math.min(sc.getPage(), totalPage)); // page가 totalPage보다 크지 않게 |
| 37 | this.beginPage = (this.sc.getPage() -1) / NAV_SIZE * NAV_SIZE + 1; // 11 -> 11, 10 -> 1, 15->11. 따로 떼어내서 테스트 |
| 38 | this.endPage = Math.min(beginPage + NAV_SIZE - 1, totalPage); |
| 39 | this.showPrev = beginPage!=1; |
| 40 | this.showNext = endPage!=totalPage; |
| 41 | } |
| 42 | |
| 43 | public String getQueryString() { |
| 44 | return getQueryString(this.sc.getPage()); |
no test coverage detected