accountdao.java

来自「java写的blog」· Java 代码 · 共 36 行

JAVA
36
字号
/*
 * Created on 2004-8-28
 * Author: Xuefeng, Copyright (C) 2004, Xuefeng.
 */
package org.crystalblog.dao;

import java.util.List;

import org.crystalblog.domain.Account;
import org.crystalblog.exception.*;

/**
 * Inteface of all operations on account table.
 * 
 * @author Xuefeng
 */
public interface AccountDao {

    // for browse:
    Account getAccount(String username) throws QueryException;
    Account getAccount(int accountId) throws QueryException;
    Account getAccountByCategory(int categoryId) throws QueryException;
    Account getAccountByArticle(int articleId) throws QueryException;
    List getRecentAccounts(int num) throws QueryException;
    void sendMessage(int accountId, String sender, String address, String subject, String msg);

    // for management:
    int loginAccount(String username, String password) throws AuthorizationException;
    void createAccount(Account account) throws CreateException;
    void updateAccount(Account account) throws UpdateException;
    void deleteAccount(int accountId) throws DeleteException;
    void lockAccount(int accountId) throws UpdateException;
    void changePassword(int accountId, String password) throws UpdateException;

}

⌨️ 快捷键说明

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