Beispiel #1
0
  public byte[] createDiploma(Long competitionId, Locale locale) {
    CompetitionRankingVO ranking = getCompetitionRanking(competitionId);
    if (ranking == null) {
      return null;
    }
    Series series = get(Series.class, ranking.getCompetition().getSeries_id());

    Diplomas diploma = new Diplomas(ranking, series.getLogo(), locale);
    return diploma.create();
  }
Beispiel #2
0
  public byte[] createEmptySheets(Long categoryid, Locale locale) {
    Category category = em.find(Category.class, categoryid);
    if (category == null) {
      throw new IllegalArgumentException();
    }
    Series series = em.find(Series.class, category.getSeries_id());
    if (series == null) {
      throw new IllegalArgumentException();
    }
    Athlete template = new Athlete();
    template.setCategory(category);

    Sheets sheet = new Sheets(template, series.getLogo(), locale);
    return sheet.create();
  }