http://extremecomponents.org/wiki/index.php/Simplified_Chinese_Tutorials_Limit
上面的版本是mysql
oracle的分页实现, 在传参数时增加limit.getRowStart()即可
public String limitQuery(int rowStart, int rowEnd, String query) {
String querySql = "select * from ( " +
" select my_table.*, rownum my_rownum from ( " +
query +
" ) my_table where rownum <= " + rowEnd +
") where my_rownum > " + rowStart;
return querySql;
}