
package de.ivu.elect.business.geodata.boundary;

import java.util.List;

import javax.ejb.Stateless;
import javax.inject.Inject;

import de.ivu.elect.business.exchange.control.AbstractExporter;
import de.ivu.elect.business.exchange.control.ExportExchange;
import de.ivu.elect.business.exchange.control.NoContext;
import de.ivu.elect.business.exchange.entity.DateiExportArt;
import de.ivu.elect.business.geodata.control.GeodataOrtExportExchange;
import de.ivu.elect.business.geodata.entity.GeodataOrt;

@Stateless
public class GeodataOrtExporter extends AbstractExporter<List<GeodataOrt>, NoContext> {

  @Inject
  private GeodataOrtExportExchange exportExchange;

  @Inject
  private GeodataOrtDAO geodataOrtDao;

  public GeodataOrtExporter() {
    super();
  }

  @Override
  protected ExportExchange<List<GeodataOrt>, NoContext> getExchange() {
    return exportExchange;
  }

  @Override
  protected boolean isExportHeader() {
    return true;
  }

  @Override
  protected List<GeodataOrt> getExportObject(NoContext context) {
    return geodataOrtDao.findByAll();
  }

  @Override
  protected DateiExportArt getDateiExportArt() {
    return DateiExportArt.GEODATA_ORT_EXPORT;
  }
}
