Esempio n. 1
0
 /**
  * Returns primary assignment's employee for position
  *
  * @param posId
  * @return Employee object
  */
 public Employee getPrimaryAssignmentEmployeeForPos(final Long posId) {
   return assignmentRepository.getPrimaryAssignmentForPosition(posId).getEmployee();
 }
Esempio n. 2
0
 /**
  * Returns employee object for position id and given date
  *
  * @param posId
  * @param givenDate
  * @return Employee object
  */
 public Employee getEmployeeForPositionAndDate(final Long posId, final Date givenDate) {
   return assignmentRepository
       .getPrimaryAssignmentForPositionAndDate(posId, givenDate)
       .getEmployee();
 }
Esempio n. 3
0
 /**
  * Returns list of employee for a given position
  *
  * @param posId
  * @return List of PersonalInformation
  */
 public List<Employee> getEmployeesForPosition(final Long posId) {
   final Set<Employee> employees = new HashSet<Employee>();
   final List<Assignment> assignList = assignmentRepository.getAssignmentsForPosition(posId);
   for (final Assignment assign : assignList) employees.add(assign.getEmployee());
   return new ArrayList<Employee>(employees);
 }