⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iuserdao.java

📁 当下流行的struts2的一个简单应用
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -