Struts数据库开发中的一个案例

源代码在线查看: userdao.java

软件大小: 9629 K
上传用户: wldxmy
关键词: Struts 数据库 案例
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.relationinfo.dao;
				
				import java.util.List;
				
				import com.relationinfo.model.User;
				import com.relationinfo.model.UserCookie;
				
				/**
				 * User Data Access Object (DAO) interface.
				 *
				 * 
				 * www.relationinfo.com
				 * 
				 *
				 * @author caoguangxin www.relationinfo.com
				 */
				public interface UserDAO extends DAO {
				    /**
				     * Gets users information based on login name.
				     * @param username the current username
				     * @return user populated user object
				     */
				    public User getUser(String username);
				
				    /**
				     * Gets a list of users based on parameters passed in.
				     *
				     * @return List populated list of users
				     */
				    public List getUsers(User user);
				
				    /**
				     * Saves a user's information
				     * @param user the object to be saved
				     */
				    public void saveUser(User user);
				
				    /**
				     * Removes a user from the database by id
				     * @param username the user's username
				     */
				    public void removeUser(String username);
				
				    /**
				     * Gets a userCookie object from the database,
				     * based on username and password
				     * @param cookie with username and password
				     */
				    public UserCookie getUserCookie(UserCookie cookie);
				
				    /**
				     * Saves a userCookie object to the database
				     * @param cookie
				     */
				    public void saveUserCookie(UserCookie cookie);
				
				    /**
				     * Removes all cookies for a specified username
				     * @param username
				     */
				    public void removeUserCookies(String username);
				}
							

相关资源