
package de.ivu.elect.business.benutzerverwaltung.entity;

import de.ivu.elect.business.security.UseCasePermission;

/**
 *  on 05.06.2015.
 */
public abstract class AbstractRechteKonfiguration implements RechteKonfigurationBase {

  private static final long serialVersionUID = 1L;

  public AbstractRechteKonfiguration() {
    super();
  }

  public UseCasePermission getRecht() {
    try {
      return UseCasePermission.valueOf(getRechtAsString());
    } catch (Exception e) {
      // ELECT-9775
      // ignorieren
    }
    return UseCasePermission.UNSINN;
  }

  public void setRecht(UseCasePermission useCasePermission) {
    setRechtAsString(useCasePermission.name());
  }

}
