Exemplo n.º 1
0
  /*
   * (non-Javadoc)
   *
   * @see
   * org.openiam.idm.srvc.user.service.UserDataService#getPrimarySupervisor
   * (java.lang.String)
   */
  @Transactional(readOnly = true)
  public Supervisor getPrimarySupervisor(String employeeId) {
    if (employeeId == null) throw new NullPointerException("employeeId is null");
    SupervisorEntity entity = supervisorDao.findPrimarySupervisor(employeeId);

    return supervisorDozerConverter.convertToDTO(entity, true);
  }
Exemplo n.º 2
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.openiam.idm.srvc.user.service.UserDataService#addSupervisor(org.openiam
  * .idm.srvc.user.dto.Supervisor)
  */
 @Transactional
 public Supervisor addSupervisor(Supervisor supervisor) {
   if (supervisor == null) throw new NullPointerException("supervisor is null");
   SupervisorEntity supervisorEntity = supervisorDozerConverter.convertToEntity(supervisor, true);
   this.supervisorDao.add(supervisorEntity);
   return supervisorDozerConverter.convertToDTO(supervisorEntity, true);
 }
Exemplo n.º 3
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.openiam.idm.srvc.user.service.UserDataService#getSupervisors(java
  * .lang.String)
  */
 @Transactional(readOnly = true)
 public List<Supervisor> getSupervisors(String employeeId) {
   if (employeeId == null) throw new NullPointerException("employeeId is null");
   List<SupervisorEntity> superVisList = supervisorDao.findSupervisors(employeeId);
   List<Supervisor> supervisorList = new LinkedList<Supervisor>();
   for (SupervisorEntity sup : superVisList) {
     org.hibernate.Hibernate.initialize(sup.getSupervisor().getPhones());
     org.hibernate.Hibernate.initialize(sup.getSupervisor().getEmailAddresses());
     org.hibernate.Hibernate.initialize(sup.getSupervisor().getAddresses());
     org.hibernate.Hibernate.initialize(sup.getSupervisor().getUserAttributes());
     supervisorList.add(supervisorDozerConverter.convertToDTO(sup, true));
   }
   return supervisorList;
 }
Exemplo n.º 4
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.openiam.idm.srvc.user.service.UserDataService#getSupervisor(java.
  * lang.String)
  */
 @Transactional(readOnly = true)
 public Supervisor getSupervisor(String supervisorObjId) {
   if (supervisorObjId == null) throw new NullPointerException("supervisorObjId is null");
   return supervisorDozerConverter.convertToDTO(supervisorDao.findById(supervisorObjId), true);
 }