|
|
|
@ -173,24 +173,31 @@ public abstract class AbstractController extends AbstractBean {
|
|
|
|
|
* @return ModelAndView
|
|
|
|
|
*/
|
|
|
|
|
protected ModelAndView setPagingInfo(ModelAndView mav, Collection<?> collection, String prefix) {
|
|
|
|
|
Map<String, Object> map = null;
|
|
|
|
|
if (collection instanceof BoundedList<?> bounded) {
|
|
|
|
|
Map<String, Object> map = Map.of(
|
|
|
|
|
map = Map.of(
|
|
|
|
|
"start", bounded.getStart(),
|
|
|
|
|
"dataSize", bounded.size(),
|
|
|
|
|
"totalSize", bounded.getTotalSize(),
|
|
|
|
|
"fetchSize", bounded.getFetchSize()
|
|
|
|
|
"fetchSize", bounded.getFetchSize(),
|
|
|
|
|
"more", bounded.hasMore(),
|
|
|
|
|
"next", bounded.hasNext(),
|
|
|
|
|
"prev", bounded.hasPrevious()
|
|
|
|
|
);
|
|
|
|
|
mav.addObject(prefix + "List", bounded)
|
|
|
|
|
.addObject(prefix + "PagingInfo", map);
|
|
|
|
|
} else {
|
|
|
|
|
Map<String, Object> map = Map.of(
|
|
|
|
|
map = Map.of(
|
|
|
|
|
"start", 0,
|
|
|
|
|
"dataSize", collection.size(),
|
|
|
|
|
"totalSize", collection.size(),
|
|
|
|
|
"fetchSize", collection.size()
|
|
|
|
|
"fetchSize", collection.size(),
|
|
|
|
|
"more", false,
|
|
|
|
|
"next", false,
|
|
|
|
|
"prev", false
|
|
|
|
|
);
|
|
|
|
|
mav.addObject(prefix + "List", collection)
|
|
|
|
|
.addObject(prefix + "PagingInfo", map);
|
|
|
|
|
}
|
|
|
|
|
return mav;
|
|
|
|
|
return mav.addObject("prefix", prefix)
|
|
|
|
|
.addObject(prefix + "List", collection)
|
|
|
|
|
.addObject(prefix + "Paging", map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**한 번에 반환할 조회 결과의 수를 설정한다.<br />
|
|
|
|
|