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

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 EmailVorgangEmailsFehlerhaftColumn<E extends EmailVorgang> extends AbstractEmailVorgangColumn<E> {

  private static final long serialVersionUID = 1L;

  protected EmailVorgangEmailsFehlerhaftColumn(Messages messages, EmailExtendedDAO emailDAO) {
    super("EmailVorgang-EmailsFehlerhaft", messages, "email.vorgang.column.emails.fehlerhaft", ColumnType.LONG,
        entity -> {
          return emailDAO.findByCountEmailVorgangAndStatus(entity, EmailStatusType.FEHLER);
        });
  }
}
