Exemplo n.º 1
0
  private Registration getActiveRegistration(Student student) {
    List<Registration> activeRegistrations = student.getActiveRegistrations();

    if (activeRegistrations.isEmpty()) {
      return student.getLastRegistration();
    }

    for (Registration registration : activeRegistrations) {
      if (registration.getDegree().getDegreeType().isEmpty()) {
        continue;
      }

      return registration;
    }

    return student.getLastRegistration();
  }
 private Registration findRegistration(final Student student) {
   return student.getLastRegistration();
 }