コード例 #1
0
 @Atomic
 private static OutboundMobilityCandidacySubmission getOutboundMobilityCandidacySubmission(
     final OutboundMobilityCandidacyContest contest, final Registration registration) {
   final OutboundMobilityCandidacyPeriod candidacyPeriod =
       contest.getOutboundMobilityCandidacyPeriod();
   for (final OutboundMobilityCandidacySubmission submission :
       registration.getOutboundMobilityCandidacySubmissionSet()) {
     if (submission.getOutboundMobilityCandidacyPeriod() == candidacyPeriod) {
       return submission;
     }
   }
   return new OutboundMobilityCandidacySubmission(candidacyPeriod, registration);
 }
コード例 #2
0
 @Override
 public int compareTo(final OutboundMobilityCandidacySubmission o) {
   final int r =
       Registration.COMPARATOR_BY_NUMBER_AND_ID.compare(getRegistration(), o.getRegistration());
   return r == 0 ? getExternalId().compareTo(o.getExternalId()) : r;
 }
コード例 #3
0
 public static void apply(
     final OutboundMobilityCandidacyContest contest, final Registration registration) {
   final OutboundMobilityCandidacySubmission submission =
       getOutboundMobilityCandidacySubmission(contest, registration);
   submission.apply(contest);
 }