package com.peetz.medien.view;

import com.peetz.medien.service.MedienService;
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="MedienView")
@RequestScoped
public class MedienView implements Serializable {

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

    @EJB
    private MedienService medienService;

    private static final long serialVersionUID = -8261128991042235283L;

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

    public Integer getCdNumber() {
        return medienService.getAllCDs().size();
    }
    
    public Integer getDvdNumber() {
        return medienService.getAllDVDs().size();
    }
}
