
package de.ivu.elect.business.wahl.boundary;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

import org.apache.deltaspike.core.api.scope.ConversationGroup;
import org.apache.deltaspike.core.api.scope.GroupedConversationScoped;

import de.ivu.elect.business.mandant.entity.Mandant;
import de.ivu.elect.business.wahl.entity.WahlterminStatus;

@GroupedConversationScoped
@ConversationGroup(AbstractWahlterminSearchParameters.class)
public class WahlterminSearchParameters extends AbstractWahlterminSearchParameters {

  private static final long serialVersionUID = 1L;

  public WahlterminSearchParameters() {
    super();
  }

  public static final List<WahlterminStatus> WAHLTERMIN_STATUS_INITIAL = Collections.singletonList(WahlterminStatus.INITIAL);

  private Collection<WahlterminStatus> wahlterminStatus = new ArrayList<>(WAHLTERMIN_STATUS_INITIAL);

  public Collection<WahlterminStatus> getWahlterminStatus() {
    return wahlterminStatus;
  }

  public void setWahlterminStatus(Collection<WahlterminStatus> wahlterminStatus) {
    this.wahlterminStatus = wahlterminStatus;
  }

  private Mandant mandant;

  public Mandant getMandant() {
    return mandant;
  }

  public void setMandant(Mandant mandant) {
    this.mandant = mandant;
  }

  @Override
  public void reset() {
    super.reset();
    mandant = null;
    wahlterminStatus = new ArrayList<>(WAHLTERMIN_STATUS_INITIAL);
  }
}
