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

import de.ivu.elect.business.kandidatur.boundary.NlKandidaturGewaehltSearch;
import de.ivu.elect.business.kandidatur.entity.KandidaturGewaehlt;
import de.ivu.elect.jee.faces.Messages;
import de.ivu.elect.jee.presentation.dynamictable.ColumnType;

public class NlGewaehltePositionColumn extends AbstractKandidaturGewaehltColumn {

  private static final long serialVersionUID = 1L;

  public NlGewaehltePositionColumn(Messages messages) {
    super(messages);
  }

  @Override
  public ColumnType getType() {
    return ColumnType.LONG;
  }

  @Override
  public String getHeader() {
    return getMessage("nl.gewaehlt.position.header");
  }

  @Override
  public Object getValue(KandidaturGewaehlt kandidaturGewaehlt) {
    return kandidaturGewaehlt.getKandidatur().getTransientContext().get(NlKandidaturGewaehltSearch.NL_POSITION);
  }
}