Package auction.model

Examples of auction.model.Bid


@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class ItemDAOBean extends GenericEJB3DAO<Item, Long> implements ItemDAO {

    public Bid getMaxBid(Item item) {
        // TODO: em.getSingleResult() doesn't return null but throws an exception, how inconvenient
        Bid currentMaxBid = null;
        List result = getEntityManager()
                            .createNamedQuery("Item-getMaxBid")
                             .setParameter("itemId", item.getId())
                             .getResultList();
        if (result.size() > 0) currentMaxBid = (Bid)result.get(0);
View Full Code Here


        return currentMaxBid;
    }

    public Bid getMinBid(Item item) {
        // TODO: em.getSingleResult() doesn't return null but throws an exception, how inconvenient
        Bid currentMinBid = null;
        List result = getEntityManager()
                             .createNamedQuery("Item-getMinBid")
                             .setParameter("itemId", item.getId())
                             .getResultList();
        if (result.size() > 0) currentMinBid = (Bid)result.get(0);
View Full Code Here

TOP

Related Classes of auction.model.Bid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.