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

import de.ivu.elect.business.gebietsbaum.entity.Gebiet;
import de.ivu.elect.business.gebietsbaum.entity.GebietConstants;
import de.ivu.elect.jee.faces.Messages;
import de.ivu.elect.jee.presentation.dynamictable.ColumnType;
import de.ivu.elect.presentation.table.AbstractColumnEntry;

public class GebietNameColumn extends AbstractColumnEntry<Gebiet> {

  private static final long serialVersionUID = 1L;

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

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

  @Override
  public String getHeader() {
    return getMessage(GebietConstants.MESSAGE_KEY_NAME_EINZAHL);
  }

  @Override
  public Object getValue(Gebiet gebiet) {
    return gebiet.getName();
  }
}
