示例#1
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);
 }
示例#2
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);
  }
示例#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;
 }
示例#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);
 }
示例#5
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.openiam.idm.srvc.user.service.UserDataService#updateSupervisor(org
  * .openiam.idm.srvc.user.dto.Supervisor)
  */
 @Transactional
 public void updateSupervisor(Supervisor supervisor) {
   if (supervisor == null) throw new NullPointerException("supervisor is null");
   this.supervisorDao.update(supervisorDozerConverter.convertToEntity(supervisor, true));
 }