1 package ejava.projects.esales.blimpl;
2
3 import java.util.List;
4
5 import ejava.projects.esales.bl.AccountMgmt;
6 import ejava.projects.esales.bl.AccountMgmtException;
7 import ejava.projects.esales.bo.Account;
8 import ejava.projects.esales.dao.AccountDAO;
9
10
11
12
13
14 public class AccountMgmtImpl implements AccountMgmt {
15 private AccountDAO accountDAO;
16
17 public void setAccountDAO(AccountDAO accountDAO) {
18 this.accountDAO = accountDAO;;
19 }
20
21 public List<Account> getAccounts(int index, int count)
22 throws AccountMgmtException {
23
24 if (count < 0) {
25 throw new AccountMgmtException("count must be >= 0");
26 }
27 return accountDAO.getAccounts(index, count);
28 }
29 }