public class TellerImpl extends Object implements Teller
Modifier and Type | Field and Description |
---|---|
private AccountDAO |
acctDAO |
static String |
ALL_ACCOUNTS |
(package private) org.apache.commons.logging.Log |
log |
static String |
OVERDRAWN_ACCOUNTS |
private OwnerDAO |
ownerDAO |
Constructor and Description |
---|
TellerImpl() |
Modifier and Type | Method and Description |
---|---|
Owner |
addOwner(long ownerId,
String accountNumber) |
Account |
closeAccount(String accountNum) |
Account |
createAccount(String accountNum) |
Owner |
createOwner(String firstName,
String lastName,
String ssn) |
Account |
getAccount(String accountNum) |
List<Account> |
getAccounts(int index,
int count) |
Ledger |
getLedger() |
double |
getLedgerAveBalance() |
long |
getLedgerCount() |
double |
getLedgerSum() |
List<Account> |
getOverdrawnAccounts(int index,
int count) |
List<Owner> |
getOwners(int index,
int count) |
Owner |
openAccount(long ownerId,
String accountNumber) |
void |
removeOwner(long ownerId) |
void |
setAcctDAO(AccountDAO acctDAO) |
void |
setOwnerDAO(OwnerDAO ownerDAO) |
void |
updateAccount(Account account) |
org.apache.commons.logging.Log log
public static final String OVERDRAWN_ACCOUNTS
public static final String ALL_ACCOUNTS
private AccountDAO acctDAO
private OwnerDAO ownerDAO
public void setAcctDAO(AccountDAO acctDAO)
public void setOwnerDAO(OwnerDAO ownerDAO)
public Account createAccount(String accountNum) throws BankException
createAccount
in interface Teller
BankException
public Account getAccount(String accountNum) throws BankException
getAccount
in interface Teller
BankException
public List<Account> getOverdrawnAccounts(int index, int count) throws BankException
getOverdrawnAccounts
in interface Teller
BankException
public List<Account> getAccounts(int index, int count) throws BankException
getAccounts
in interface Teller
BankException
public Account closeAccount(String accountNum) throws BankException
closeAccount
in interface Teller
BankException
public void updateAccount(Account account) throws BankException
updateAccount
in interface Teller
BankException
public Ledger getLedger() throws BankException
getLedger
in interface Teller
BankException
public double getLedgerAveBalance() throws BankException
getLedgerAveBalance
in interface Teller
BankException
public long getLedgerCount() throws BankException
getLedgerCount
in interface Teller
BankException
public double getLedgerSum() throws BankException
getLedgerSum
in interface Teller
BankException
public Owner addOwner(long ownerId, String accountNumber) throws BankException
addOwner
in interface Teller
BankException
public Owner createOwner(String firstName, String lastName, String ssn) throws BankException
createOwner
in interface Teller
BankException
public void removeOwner(long ownerId)
removeOwner
in interface Teller
public List<Owner> getOwners(int index, int count) throws BankException
getOwners
in interface Teller
BankException
public Owner openAccount(long ownerId, String accountNumber) throws BankException
openAccount
in interface Teller
BankException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.