Example #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);
  }
Example #2
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;
 }
Example #3
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);
 }