genericpagelist.java.svn-base

来自「EasyJWeb是基于java技术」· SVN-BASE 代码 · 共 41 行

SVN-BASE
41
字号
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 + =
减小字号Ctrl + -
显示快捷键?