package com.peetz.comics.view;

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

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

    @EJB
    private ComicService comicService;

    private static final long serialVersionUID = -8261128991042235283L;

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

    public Integer getComicsNumber() {
        return comicService.getAllComics().size();
    }
    
    public Integer getPublisherNumber() {
        return comicService.getAllPublisher().size();
    }
}
