public class JPAAuctionItemDAO extends Object implements AuctionItemDAO
Modifier and Type | Field and Description |
---|---|
private EntityManager |
em |
Constructor and Description |
---|
JPAAuctionItemDAO() |
Modifier and Type | Method and Description |
---|---|
Bid |
addBid(long itemId,
Bid bid) |
AuctionItem |
createItem(AuctionItem item) |
List<AuctionItem> |
getAvailableItems(int index,
int count) |
Bid |
getBid(long bidId) |
AuctionItem |
getItem(long itemId) |
List<AuctionItem> |
getItems(int index,
int count) |
List<AuctionItem> |
getItems(String queryString,
Map<String,Object> params,
int index,
int count) |
void |
removeBid(Bid bid) |
void |
removeItem(long id) |
void |
setEntityManager(EntityManager em) |
AuctionItem |
updateItem(AuctionItem item) |
private EntityManager em
public void setEntityManager(EntityManager em)
public AuctionItem getItem(long itemId)
getItem
in interface AuctionItemDAO
public AuctionItem createItem(AuctionItem item)
createItem
in interface AuctionItemDAO
public AuctionItem updateItem(AuctionItem item)
updateItem
in interface AuctionItemDAO
public Bid addBid(long itemId, Bid bid)
addBid
in interface AuctionItemDAO
public List<AuctionItem> getItems(int index, int count)
getItems
in interface AuctionItemDAO
public List<AuctionItem> getAvailableItems(int index, int count)
getAvailableItems
in interface AuctionItemDAO
public List<AuctionItem> getItems(String queryString, Map<String,Object> params, int index, int count)
getItems
in interface AuctionItemDAO
public void removeItem(long id)
removeItem
in interface AuctionItemDAO
public Bid getBid(long bidId)
getBid
in interface AuctionItemDAO
public void removeBid(Bid bid)
removeBid
in interface AuctionItemDAO
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.