Exemplo n.º 1
0
  public void associatePhotoCellRun(PhotoCellRaceRun photoCellRun) {

    RaceRun matchingRun = null;

    for (RaceRun r : activeRuns) {
      try {
        if (sameRun(r, photoCellRun)) {
          matchingRun = r;
          // log.info/*trace*/("Found bib#" + r.getBoat().getRacer().getBibNumber() + " r#"+
          // r.getRunNumber() +  " in Active Runs");

        }
      } catch (Exception e) {
        e.printStackTrace();
      }
    }

    if (matchingRun == null) {
      for (RaceRun r : completedRuns) {
        try {
          if (sameRun(r, photoCellRun)) {
            matchingRun = r;
            //    log.trace("Found bib#" + r.getBoat().getRacer().getBibNumber() + " r#"+
            // r.getRunNumber() + " + in Completed Runs");
          }
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }

    if (matchingRun != null) {
      matchingRun.setPhotoCellRaceRun(
          photoCellRun); /// MUST FIX 2016 Nationals ERROR CONCurrentMpdificationException
    }
  }