
package de.ivu.elect.presentation.email.table;

import static java.util.Arrays.asList;

import de.ivu.elect.business.email.boundary.EmailExtendedDAO;
import de.ivu.elect.business.email.entity.EmailStatusType;
import de.ivu.elect.business.email.entity.EmailVorgang;
import de.ivu.elect.jee.faces.Messages;
import de.ivu.elect.jee.presentation.dynamictable.ColumnType;

public class EmailVorgangAnzahlEmailsZuVersendenColumn<E extends EmailVorgang> extends AbstractEmailVorgangColumn<E> {

  private static final long serialVersionUID = 1L;

  public EmailVorgangAnzahlEmailsZuVersendenColumn(Messages messages, EmailExtendedDAO emailExtendedDAO) {
    super("EmailVorgang-AnzahlEmailsZuVersenden", messages, "email.vorgang.column.emails.zu.versenden", ColumnType.LONG,
        emailVorgang -> emailExtendedDAO.findByCountEmailVorgangAndStatusIn(emailVorgang, asList(EmailStatusType.ZU_VERSENDEN, EmailStatusType.ABGEBROCHEN)));
  }
}
