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 UserMgmt
MarketException
public List<Person> getUsers(int index, int count) throws MarketException
getUsers
in interface UserMgmt
MarketException
public Person getUser(long id) throws MarketException
getUser
in interface UserMgmt
MarketException
public Person getUserByUserId(String userId) throws MarketException
getUserByUserId
in interface UserMgmt
MarketException
public void removeUser(String userId) throws MarketException
removeUser
in interface UserMgmt
MarketException
private 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.