package com.peetz.tradingcards.view;

import com.peetz.tradingcards.service.TradingcardService;
import java.io.Serializable;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author TPEETZ
 */
@ManagedBean(name="TradingCardsView")
@RequestScoped
public class TradingCardsView implements Serializable {

    private static final Logger LOG = Logger.getLogger(TradingCardsView.class.getName());

    @EJB
    private TradingcardService tradingcardService;

    private static final long serialVersionUID = -8261128991042235283L;

    public TradingCardsView() {
        LOG.info("TradingCardsView created");
    }

    public Integer getManufacturerNumber() {
        return tradingcardService.getAllManufacturers().size();
    }
    
    public Integer getSportCardNumber() {
        return tradingcardService.getAllSportCards().size();
    }
}
