
package de.ivu.elect.jee.presentation.dynamicform;

import java.util.List;

import javax.faces.convert.Converter;

import de.ivu.elect.jee.entity.Entity;
import de.ivu.elect.jee.faces.EntityConverter;

public abstract class AbstractAutoCompleteEntityOptionsProvider<T extends Entity< ? , ? >> extends AbstractAutoCompleteOptionsProvider<T> {

  private static final long serialVersionUID = 1L;

  private final List<T> optionsSorted;

  private final Converter converter;

  public AbstractAutoCompleteEntityOptionsProvider(List<T> optionsSorted) {
    super();

    this.optionsSorted = optionsSorted;
    this.converter = EntityConverter.getInstance();
  }

  @Override
  protected List<T> getOptions() {
    return optionsSorted;
  }

  @Override
  public Converter getConverter() {
    return converter;
  }
}
