Integer currentPage = voIn.getCurrentPage();
if (currentPage == null) {
currentPage = 1;
}
Integer pageSize = voIn.getPageSize();
if (pageSize == null) {
pageSize = 10;
}
int start = (currentPage - 1) * pageSize;
int end = start + pageSize;
if (CLS_Easy7_Types.db_driver.equals("oracle.jdbc.driver.OracleDriver")) {
sqlPaging.append(" SELECT * FROM (SELECT t.*,rownum rn FROM ( ");
sqlPaging.append(sql);
sqlPaging.append(" ) t WHERE rownum <= ?) WHERE rn > ? ");
listParam.add(end);
listParam.add(start);
} else {
sqlPaging.append(sql);
sqlPaging.append(" LIMIT ?,?");
listParam.add(start);
listParam.add(pageSize);
}