Exemple #1
0
  public MasterDegreeCandidate getMasterDegreeCandidateBySpecializationAndCandidateNumber(
      Specialization specialization, Integer candidateNumber) {

    for (final MasterDegreeCandidate masterDegreeCandidate : this.getMasterDegreeCandidatesSet()) {
      if (masterDegreeCandidate.getSpecialization() == specialization
          && masterDegreeCandidate.getCandidateNumber().equals(candidateNumber)) {
        return masterDegreeCandidate;
      }
    }
    return null;
  }
Exemple #2
0
 public Integer generateCandidateNumberForSpecialization(Specialization specialization) {
   int maxCandidateNumber = 0;
   for (final MasterDegreeCandidate masterDegreeCandidate : this.getMasterDegreeCandidatesSet()) {
     if (masterDegreeCandidate.getSpecialization() == specialization
         && masterDegreeCandidate.getCandidateNumber() != null) {
       maxCandidateNumber =
           Math.max(maxCandidateNumber, masterDegreeCandidate.getCandidateNumber());
     }
   }
   return Integer.valueOf(++maxCandidateNumber);
 }
Exemple #3
0
  public List<CandidateSituation> getCandidateSituationsInSituation(
      List<SituationName> situationNames) {
    List<CandidateSituation> result = new ArrayList<CandidateSituation>();

    for (MasterDegreeCandidate candidate : getMasterDegreeCandidatesSet()) {
      for (CandidateSituation situation : candidate.getSituationsSet()) {

        if (situation.getValidation().getState() == null
            || situation.getValidation().getState() != State.ACTIVE) {
          continue;
        }

        if (situationNames != null && !situationNames.contains(situation.getSituation())) {
          continue;
        }

        result.add(situation);
      }
    }

    return result;
  }