use of org.sagacity.sqltoy.model.Page in project sagacity-sqltoy by chenrenfei.
the class SqlToyDaoSupport method convertType.
protected <T extends Serializable> Page<T> convertType(Page sourcePage, Class<T> resultType) {
if (sourcePage == null) {
return null;
}
Page result = new Page();
result.setPageNo(sourcePage.getPageNo());
result.setPageSize(sourcePage.getPageSize());
result.setRecordCount(sourcePage.getRecordCount());
result.setSkipQueryCount(sourcePage.getSkipQueryCount());
if (sourcePage.getRows().isEmpty()) {
return result;
}
result.setRows(convertType(sourcePage.getRows(), resultType));
return result;
}
Aggregations