コード例 #1
0
 @Atomic
 public void apply(final OutboundMobilityCandidacyContest contest) {
   for (final OutboundMobilityCandidacy candidacy : getOutboundMobilityCandidacySet()) {
     if (candidacy.getOutboundMobilityCandidacyContest() == contest) {
       return;
     }
   }
   new OutboundMobilityCandidacy(contest, this);
 }
コード例 #2
0
 public boolean hasContestInGroup(final OutboundMobilityCandidacyContestGroup mobilityGroup) {
   for (final OutboundMobilityCandidacy candidacy : getOutboundMobilityCandidacySet()) {
     final OutboundMobilityCandidacyContest contest =
         candidacy.getOutboundMobilityCandidacyContest();
     if (contest.getOutboundMobilityCandidacyContestGroup() == mobilityGroup) {
       return true;
     }
   }
   return false;
 }
コード例 #3
0
 public void select() {
   if (!hasSelectedCandidacy()) {
     for (final OutboundMobilityCandidacy candidacy : getSortedOutboundMobilityCandidacySet()) {
       if (candidacy.getOutboundMobilityCandidacyContest().hasVacancy()) {
         candidacy.select();
         return;
       }
     }
   }
 }
コード例 #4
0
 public SortedSet<OutboundMobilityCandidacyContestGroup>
     getOutboundMobilityCandidacyContestGroupSet() {
   final SortedSet<OutboundMobilityCandidacyContestGroup> result =
       new TreeSet<OutboundMobilityCandidacyContestGroup>();
   for (final OutboundMobilityCandidacy candidacy : getOutboundMobilityCandidacySet()) {
     final OutboundMobilityCandidacyContest contest =
         candidacy.getOutboundMobilityCandidacyContest();
     result.add(contest.getOutboundMobilityCandidacyContestGroup());
   }
   return result;
 }
 public boolean hasCandidacy(final Student student) {
   for (final Registration registration : student.getRegistrationsSet()) {
     for (final OutboundMobilityCandidacySubmission submission :
         registration.getOutboundMobilityCandidacySubmissionSet()) {
       for (final OutboundMobilityCandidacy candidacy :
           submission.getOutboundMobilityCandidacySet()) {
         if (candidacy.getOutboundMobilityCandidacyContest() == this) {
           return true;
         }
       }
     }
   }
   return false;
 }