
package de.ivu.elect.exchange.rolle.csv;

import java.util.List;

import org.jsefa.csv.annotation.CsvDataType;
import org.jsefa.csv.annotation.CsvField;
import org.jsefa.csv.annotation.CsvSubRecordList;
import org.jsefa.rbf.annotation.Record;

import de.ivu.elect.exchange.rolle.DefaultExchangePermission;
import de.ivu.elect.exchange.rolle.ExchangeRolleDTO;
import de.ivu.jsefa.CsvHeader;

/**
 * Urspüngliches Standard-CSV-Format. Wird noch für Standard-XML-Format verwendet.
 *
 * Deprecated: Bitte überarbeitetes Format <code>DefaultRolleCsvDTO</code> verwenden!
 */
@Deprecated
@CsvDataType(defaultPrefix = "ROL")
public class DefaultExchangeRolleCsvDTO implements ExchangeRolleDTO {

  @CsvField(pos = 1)
  @CsvHeader("Name")
  String name;

  @CsvField(pos = 2)
  @CsvHeader("Beschreibung")
  String beschreibung;

  @CsvField(pos = 3)
  @CsvHeader("Rollenart")
  String rolleArt;

  @CsvSubRecordList(pos = 3, records = @Record(prefix = "PER"))
  private List<DefaultExchangePermission> permissions;

  @Override
  public String getName() {
    return name;
  }

  @Override
  public void setName(String name) {
    this.name = name;
  }

  @Override
  public String getRolleArt() {
    return rolleArt;
  }

  @Override
  public void setRolleArt(String rolleArt) {
    this.rolleArt = rolleArt;
  }

  @Override
  public String getBeschreibung() {
    return beschreibung;
  }

  @Override
  public void setBeschreibung(String beschreibung) {
    this.beschreibung = beschreibung;
  }

  @Override
  public List<DefaultExchangePermission> getPermissions() {
    return permissions;
  }

  @Override
  public void setPermissions(List<DefaultExchangePermission> permissions) {
    this.permissions = permissions;
  }

}
