userdaoimpl.java

来自「SSH的平台搭建」· Java 代码 · 共 23 行

JAVA
23
字号
package com.lovo.zengxy.web.dao.hibernate;

import java.util.List;

import com.lovo.zengxy.base.hibernate.BaseDAOImpl;
import com.lovo.zengxy.model.User;
import com.lovo.zengxy.util.BaseDAOException;
import com.lovo.zengxy.web.dao.UserDAO;

public class UserDAOImpl extends BaseDAOImpl implements UserDAO {

	public List<User> findUserListPage(int firstResult, int maxResults)
			throws BaseDAOException {
		String hql = "from User order by id asc";
		return super.cutPage(firstResult, maxResults, hql, null);
	}

	public int getUserTotaleCount() throws BaseDAOException {
		return (Integer)super.getByCondition("select count(*) from User", null);
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?