iuserdao.java

来自「当下流行的struts2的一个简单应用」· Java 代码 · 共 67 行

JAVA
67
字号
package com.jack.user.dao;

import com.jack.user.pojo.User;

/**
 * A data access object (DAO) providing persistence and search support for User
 * entities. Transaction control of the save(), update() and delete() operations
 * can directly support Spring container-managed transactions or they can be
 * augmented to handle user-managed Spring transactions. Each of these methods
 * provides additional information for how to configure it for the desired type
 * of transaction control.
 * 
 * @see com.jack.user.pojo.User
 * @author 张云杰
 */
public interface IUserDAO {
	/**
	 * 保存用户
	 * 
	 * @param user
	 * @throws Exception
	 */
	public void saveUser(User user) throws RuntimeException;

	/**
	 * 查看用户名是否已经存在
	 * 
	 * @param userName
	 *            用户名
	 * @return 返回用户是否存在
	 * @throws Exception
	 */
	public boolean findUserByUserName(String userName) throws RuntimeException;

	/**
	 * 根据用户名和密码查找用户是否存在
	 * 
	 * @param userName
	 *            用户名
	 * @param password
	 *            密码
	 * @return 返回用户是否存在,true代表存在,false代表不存在
	 * @throws RuntimeException
	 */
	public boolean findUserByUNameAndPwd(String userName,
			String password) throws RuntimeException;

	/**
	 * 删除用户
	 * 
	 * @param user
	 *            用户对象
	 * @throws Exception
	 */
	public void deleteUser(User user) throws RuntimeException;

	/**
	 * 通过用户ID删除用户
	 * 
	 * @param id
	 *            用户ID号
	 * @return 返回删除用户是否成功
	 * @throws Exception
	 */
	public boolean deleteUserById(String id) throws RuntimeException;
}

⌨️ 快捷键说明

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