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

import static java.util.Objects.nonNull;

import javax.annotation.Nonnull;

import de.ivu.elect.jee.faces.Messages;
import de.ivu.elect.presentation.personenregister.AbstractEntityMitPersonendatenSearchResultEntry;
import de.ivu.elect.presentation.table.AbstractColumnEntry;

public abstract class AbstractEntityMitPersonendatenSearchResultEntryPersonendatenColumn<E extends AbstractEntityMitPersonendatenSearchResultEntry> extends AbstractColumnEntry<E> {

  private static final long serialVersionUID = 1L;

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

  @Override
  public Object getValue(E entry) {
    if (nonNull(entry)) {
      return getValueInternal(entry);
    }

    return "";
  }

  protected abstract Object getValueInternal(@Nonnull E entry);
}
