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

import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import de.ivu.elect.business.wertelisten.entity.Wertelisten;
import de.ivu.elect.business.wertelisten.entity.WertelistenMeta;
import de.ivu.elect.jee.presentation.dynamictable.AbstractColumnBuilder;
import de.ivu.elect.jee.presentation.dynamictable.ColumnEntry;

@Named(WertelistenColumnBuilder.COMPONENT_NAME)
public class WertelistenColumnBuilder extends AbstractColumnBuilder<Wertelisten> {

  public static final String COMPONENT_NAME = "wertelistenColumnBuilder";

  private static final long serialVersionUID = 1L;

  private AbstractWertelistenColumn<Wertelisten> wertelistenNameColumn;

  private AbstractWertelistenColumn<Wertelisten> wertelistenWertelistenArtColumn;

  @Inject
  private WertelistenMeta meta;

  @Override
  protected void initColumns() {
    wertelistenNameColumn = AbstractWertelistenColumn.createWertelistenNameColumn(getMessages());
    wertelistenWertelistenArtColumn = AbstractWertelistenColumn.createWertelistenWertelistenArtColumn(getMessages());
  }

  @Override
  protected List<ColumnEntry< ? super Wertelisten>> getColumnEntriesSorted() {
    List<ColumnEntry< ? super Wertelisten>> result = new ArrayList<>();

    result.add(wertelistenNameColumn);
    result.add(wertelistenWertelistenArtColumn);

    return result;
  }
}
