public class UserMgmtEJB extends Object implements UserMgmtRemote, UserMgmtLocal
| Modifier and Type | Field and Description |
|---|---|
private EntityManager |
em |
private static org.apache.commons.logging.Log |
log |
private PersonDAO |
userDAO |
| Constructor and Description |
|---|
UserMgmtEJB() |
| Modifier and Type | Method and Description |
|---|---|
long |
createUser(String userId,
String name) |
Person |
getUser(long id) |
Person |
getUserByUserId(String userId) |
List<Person> |
getUsers(int index,
int count) |
void |
init() |
private Bid |
makeDTO(Bid bid,
AuctionItem item) |
private Collection<AuctionItem> |
makeDTO(Collection<AuctionItem> items,
Person owner) |
private List<Bid> |
makeDTO(List<Bid> bids,
AuctionItem item) |
private List<Person> |
makeDTO(List<Person> people) |
private Person |
makeDTO(Person user) |
private Person |
makeDTO(Person bidder,
Bid bid) |
void |
removeUser(String userId) |
private static final org.apache.commons.logging.Log log
private EntityManager em
private PersonDAO userDAO
@PostConstruct public void init()
public long createUser(String userId, String name) throws MarketException
createUser in interface UserMgmtMarketExceptionpublic List<Person> getUsers(int index, int count) throws MarketException
getUsers in interface UserMgmtMarketExceptionpublic Person getUser(long id) throws MarketException
getUser in interface UserMgmtMarketExceptionpublic Person getUserByUserId(String userId) throws MarketException
getUserByUserId in interface UserMgmtMarketExceptionpublic void removeUser(String userId) throws MarketException
removeUser in interface UserMgmtMarketExceptionprivate Collection<AuctionItem> makeDTO(Collection<AuctionItem> items, Person owner)
private List<Bid> makeDTO(List<Bid> bids, AuctionItem item)
private Bid makeDTO(Bid bid, AuctionItem item)
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.