accountdao.java

来自「如题ServletJSP.rar 为网络收集的JSP网站源文件」· Java 代码 · 共 60 行

JAVA
60
字号
/*
 * XP Forum
 *
 * Copyright (c) 2002-2003 RedSoft Group.  All rights reserved.
 *
 */
package org.redsoft.forum.dao;

import org.redsoft.forum.web.Account;
import org.redsoft.forum.exception.AccountNotFoundException;
import org.redsoft.forum.exception.AccountAlreadyExistException;
import java.sql.SQLException;

/**
 * Account DAO interface
 *
 * @author charles Huang
 * @version 1.0
 */

public interface AccountDAO {

    /**
     *  Add a user account
     *
     * @param Account - A account object that contains the user info,like userName,
     *                  password,email
     * @exception SQLException - Thrown if a db error happens
     */
    public void addAccount( final Account account ) throws SQLException,AccountAlreadyExistException;

    /**
     *  Edit a user account
     *
     * @param Account - A account object that contains the user info,like userName,
     *                  password,email
     * @exception SQLException - Thrown if a db error happens
     * @exception AccountNotFoundException
     */
    public void updateAccount( final Account account ) throws SQLException,AccountNotFoundException;

    /**
     *  Find a user given a user name
     *
     * @param String - The user name
     * @return Account - A account object that contains the user info
     * @exception SQLException - Thrown if a db error happens
     * @exception AccountNotFoundException
     */
    public Account findByUserName( final String userName )
                                               throws SQLException,
                                                      AccountNotFoundException;

    /**
     *  Remove a account given a user name
     *
     *  @param String - User name
     */
    public void removeAccount( final String userName ) throws SQLException;
}//EOI

⌨️ 快捷键说明

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