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

import javax.annotation.Nonnull;

import de.ivu.elect.business.person.entity.PersonendatenConstants;
import de.ivu.elect.jee.faces.Messages;
import de.ivu.elect.jee.presentation.dynamictable.ColumnType;
import de.ivu.elect.presentation.personenregister.AbstractEntityMitPersonendatenSearchResultEntry;

public class EntityMitPersonendatenSearchResultEntryFamiliennameColumn<E extends AbstractEntityMitPersonendatenSearchResultEntry>
    extends
      AbstractEntityMitPersonendatenSearchResultEntryPersonendatenColumn<E> {

  private static final long serialVersionUID = 1L;

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

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

  @Override
  public String getHeader() {
    return getMessage(PersonendatenConstants.MESSAGE_KEY_FAMILIENNAME_EINZAHL);
  }

  @Override
  protected Object getValueInternal(@Nonnull E entry) {
    return entry.getFamilienname();
  }
}
