📄 genericpagelist.java
字号:
package com.easyjf.core.support;import java.util.Collection;import com.easyjf.core.dao.GenericDAO;import com.easyjf.core.support.query.IQueryObject;import com.easyjf.web.tools.IQuery;import com.easyjf.web.tools.PageList;public class GenericPageList extends PageList { protected String scope; protected Class cls; public GenericPageList(Class cls,IQueryObject queryObject,GenericDAO dao) { this(cls,queryObject.getQuery(),queryObject.getParameters(),dao); } public GenericPageList(Class cls, String scope, Collection paras, GenericDAO dao) { this.cls = cls; this.scope = scope; IQuery query = new GenericQuery(dao); query.setParaValues(paras); this.setQuery(query); } /** * 查询 * * @param currentPage * 当前页数 * @param pageSize * 一页的查询个数 */ public void doList(int currentPage, int pageSize) { String totalSql = "select COUNT(obj) from " + cls.getName() + " obj where " + scope; super.doList(pageSize, currentPage, totalSql, scope); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -