public class JPAAccountDAO extends Object implements AccountDAO
Modifier and Type | Field and Description |
---|---|
static String |
ACCOUNT_BY_NUM |
static String |
ACCOUNT_NUM_PARAM |
private EntityManager |
em |
static String |
GET_LEDGER |
static String |
GET_LEDGER_AVE |
static String |
GET_LEDGER_CNT |
static String |
GET_LEDGER_SUM |
private static org.apache.commons.logging.Log |
log |
GET_ACCOUNTS_QUERY
Constructor and Description |
---|
JPAAccountDAO() |
Modifier and Type | Method and Description |
---|---|
Account |
createAccount(Account account) |
List<Account> |
findAccounts(String queryName,
Map<String,Object> params,
int index,
int count) |
Account |
getAccountById(long id) |
Account |
getAccountByNum(String acctNum) |
Ledger |
getLedger() |
double |
getLedgerAveBalance() |
long |
getLedgerCount() |
double |
getLedgerSum() |
Account |
removeAccount(Account account) |
void |
setEntityManager(EntityManager em) |
Account |
updateAccount(Account account) |
private static org.apache.commons.logging.Log log
public static final String ACCOUNT_BY_NUM
public static final String ACCOUNT_NUM_PARAM
public static final String GET_LEDGER
public static final String GET_LEDGER_AVE
public static final String GET_LEDGER_CNT
public static final String GET_LEDGER_SUM
private EntityManager em
public void setEntityManager(EntityManager em)
public Account createAccount(Account account) throws DAOException
createAccount
in interface AccountDAO
DAOException
public List<Account> findAccounts(String queryName, Map<String,Object> params, int index, int count) throws DAOException
findAccounts
in interface AccountDAO
DAOException
public Account getAccountById(long id) throws DAOException
getAccountById
in interface AccountDAO
DAOException
public Account getAccountByNum(String acctNum) throws DAOException
getAccountByNum
in interface AccountDAO
DAOException
public Account removeAccount(Account account) throws DAOException
removeAccount
in interface AccountDAO
DAOException
public Account updateAccount(Account account) throws DAOException
updateAccount
in interface AccountDAO
DAOException
public Ledger getLedger() throws DAOException
getLedger
in interface AccountDAO
DAOException
public double getLedgerAveBalance() throws DAOException
getLedgerAveBalance
in interface AccountDAO
DAOException
public long getLedgerCount() throws DAOException
getLedgerCount
in interface AccountDAO
DAOException
public double getLedgerSum() throws DAOException
getLedgerSum
in interface AccountDAO
DAOException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.