@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);
 }
 @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;
 }
 public static void apply(
     final OutboundMobilityCandidacyContest contest, final Registration registration) {
   final OutboundMobilityCandidacySubmission submission =
       getOutboundMobilityCandidacySubmission(contest, registration);
   submission.apply(contest);
 }