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 AccountDAODAOExceptionpublic List<Account> findAccounts(String queryName, Map<String,Object> params, int index, int count) throws DAOException
findAccounts in interface AccountDAODAOExceptionpublic Account getAccountById(long id) throws DAOException
getAccountById in interface AccountDAODAOExceptionpublic Account getAccountByNum(String acctNum) throws DAOException
getAccountByNum in interface AccountDAODAOExceptionpublic Account removeAccount(Account account) throws DAOException
removeAccount in interface AccountDAODAOExceptionpublic Account updateAccount(Account account) throws DAOException
updateAccount in interface AccountDAODAOExceptionpublic Ledger getLedger() throws DAOException
getLedger in interface AccountDAODAOExceptionpublic double getLedgerAveBalance()
throws DAOException
getLedgerAveBalance in interface AccountDAODAOExceptionpublic long getLedgerCount()
throws DAOException
getLedgerCount in interface AccountDAODAOExceptionpublic double getLedgerSum()
throws DAOException
getLedgerSum in interface AccountDAODAOExceptionCopyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.