
package de.ivu.elect.presentation.person.form;

import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;

import de.ivu.elect.business.person.boundary.BerufExtendedDAO;
import de.ivu.elect.business.person.entity.Beruf;
import de.ivu.elect.business.person.entity.BerufPK;
import de.ivu.elect.business.person.entity.BerufUK;
import de.ivu.elect.jee.entity.DAO;
import de.ivu.elect.jee.faces.AbstractEntityUniqueUKFacesValidator;

@RequestScoped
public class BerufUniqueUKFacesValidator extends AbstractEntityUniqueUKFacesValidator<Beruf, BerufPK, BerufUK> {

  private static final long serialVersionUID = 1L;

  @Inject
  BerufExtendedDAO dao;

  @Override
  protected BerufUK createUK(Object value) {
    return new BerufUK((String) value);
  }

  @Override
  protected DAO<Beruf, BerufPK, BerufUK> getDao() {
    return dao;
  }
}
