
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.WahlStatus;

@GroupedConversationScoped
@ConversationGroup(AbstractWahlSearchParameters.class)
public class WahlSearchParameters extends AbstractWahlSearchParameters {

  private static final long serialVersionUID = 1L;

  public static final List<WahlStatus> WAHL_STATUS_INITIAL = Collections.singletonList(WahlStatus.INITIAL);

  public WahlSearchParameters() {
    super();
  }

  private Collection<WahlStatus> wahlStatus = new ArrayList<>(WAHL_STATUS_INITIAL);

  private Mandant mandant;

  public Mandant getMandant() {
    return mandant;
  }

  public Collection<WahlStatus> getWahlStatus() {
    return wahlStatus;
  }

  public void setWahlStatus(Collection<WahlStatus> wahlStatus) {
    this.wahlStatus = wahlStatus;
  }

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

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