Package org.xrace.model.evenements

Examples of org.xrace.model.evenements.Course


    try
    {
      Long id = Long.parseLong(courseId);

      Course course = courseService.find(id);

      if (course == null)
      {
        error(getLocalizer().getString("invalidRaceNumber", this));
        addEmptyPanels();
        return;
      }

      List<Inscription> items = inscriptionService
          .findByCourseApproved(course);
      add(new ContextPanel("contextPanel", course.getEvenement()
          .getSaison(), course.getEvenement(), course));
      add(new InscriptionsPanel("inscriptions",
          BusinessObjectListDecorator.decorate(items,
              Inscription.class)));
    }
    catch (NumberFormatException e)
View Full Code Here


  @Override
  protected void populateItem(final ListItem item)
  {

    final Course course = (Course) item.getModelObject();

    item.add(new Label("nom", new PropertyModel(course, "nom")));
    item.add(new Label("date", new PropertyModel(course, "date")));

    String statut = gestionProcessusInscription
View Full Code Here

  @Override
  protected void populateItem(final ListItem item)
  {

    final Course course = (Course) item.getModelObject();

    item.add(new Label("nom", new PropertyModel(course, "nom")));
    item.add(new Label("date", new PropertyModel(course, "date")));

    PageParameters params = new PageParameters();
    params.add("course", course.getId().toString());

    BookmarkablePageLink link;
    link = new BookmarkablePageLink("selection", InscriptionsPage.class, params);

    item.add(link);
View Full Code Here

    row.createCell((short) 21).setCellValue(
        new HSSFRichTextString("Toutes"));

    for (Map.Entry<Course, Integer> entry : mapCourseIndex.entrySet())
    {
      Course course = entry.getKey();
      short index = entry.getValue().shortValue();
      row.createCell(index).setCellValue(
          new HSSFRichTextString(course.getNom()));
    }

    HSSFUtils.applyStyle(row, style);

    // --------- Liste des inscrits -------
    int i = 3;

    for (final DossierInscriptionEvenement dossier : dossierInscriptionService
        .generateDossiersInscriptions(evenement))
    {
      row = sheet.createRow((short) ++i);

      final Personne personneInscrite = dossier.getPersonneInscrite();
      final Inscription inscription = getInscription(dossier);

      row.createCell((short) 0).setCellValue(personneInscrite.getId());
      row.createCell((short) 1).setCellValue(
          new HSSFRichTextString(personneInscrite.getNoLicence()));
      row.createCell((short) 2).setCellValue(
          new HSSFRichTextString(inscription.getCategorie()
              .getNomComplet()));
      row.createCell((short) 3).setCellValue(
          new HSSFRichTextString(inscription.getNoPlaque()));
      row.createCell((short) 4).setCellValue(
          new HSSFRichTextString(personneInscrite.getNom()));
      row.createCell((short) 5).setCellValue(
          new HSSFRichTextString(personneInscrite.getPrenom()));

      Club club = inscription.getClub();
      if (club != null)
      {
        row.createCell((short) 6).setCellValue(
            new HSSFRichTextString(club.getNomComplet()));
      }

      row.createCell((short) 7).setCellValue(
          new HSSFRichTextString(inscription.getPersonne().getPays()
              .getCode()));
      row.createCell((short) 8).setCellValue(
          new HSSFRichTextString(inscription.getPersonne()
              .getCodeUCI()));
      HSSFUtils.createDateCell(wb, row, 9, inscription.getPersonne()
          .getDateNaissance());
      row.createCell((short) 10)
          .setCellValue(
              new HSSFRichTextString(inscription.getPersonne()
                  .getSexe()));
      row.createCell((short) 11).setCellValue(
          new HSSFRichTextString(personneInscrite.getAdresse()));
      row.createCell((short) 12).setCellValue(
          new HSSFRichTextString(personneInscrite.getVille()));
      row.createCell((short) 13).setCellValue(
          new HSSFRichTextString(personneInscrite.getCodePostal()));
      row.createCell((short) 14).setCellValue(
          new HSSFRichTextString(personneInscrite.getTelephone()));

      if (personneInscrite.getProvince() != null)
      {
        row.createCell((short) 15).setCellValue(
            new HSSFRichTextString(personneInscrite.getProvince()
                .getCode()));
      }
      else
      {
        row.createCell((short) 15).setCellValue(
            new HSSFRichTextString("N/A"));
      }

      row.createCell((short) 16).setCellValue(
          new HSSFRichTextString(personneInscrite.getAllergies()));
      row.createCell((short) 17).setCellValue(
          new HSSFRichTextString(personneInscrite
              .getEmergencyNumber()));
      row.createCell((short) 18).setCellValue(
          new HSSFRichTextString(personneInscrite
              .getEmergencyContact()));

      // --------- Information sur le compte de la personne inscrite (si applicable) -------
      if (personneInscrite.getCompte() != null)
      {
        row.createCell((short) 19).setCellValue(
            new HSSFRichTextString(personneInscrite.getCompte()
                .getUsername()));
      }

      row.createCell((short) 20).setCellValue(
          new HSSFRichTextString(inscription.getCommanditaire()));

      if (dossier.isInscritToAll())
      {
        row.createCell((short) 21).setCellValue(
            new HSSFRichTextString("X"));
      }

      for (Map.Entry<Course, Integer> entry : mapCourseIndex.entrySet())
      {
        Course course = entry.getKey();
        short index = entry.getValue().shortValue();

        if (dossier.getMapCourseInscription().containsKey(course))
        {
          row.createCell(index).setCellValue(
View Full Code Here

      @Override
      public void onClick()
      {
        if (disciplineService.list().size() > 0)
        {
          final Course course = new Course();
          course.setEvenement(evenement);
          course.setDiscipline(disciplineService.list().get(0));

          this.setResponsePage(new CourseUpdatePage(course, true));
        }
        else
        {
View Full Code Here

  @Transactional
  public AssignPlaqueResult assignPlaques(final Course course)
  {
    Validate.argNotNull(course, "course");

    final Course courseLoad = courseService.find(course.getId());
    final AssignPlaqueResult result = new AssignPlaqueResult();
    final Set<MultiKey<Object>> plaques = createPlaques(course
        .getEvenement().getSaison());

    for (final Inscription inscription : courseLoad.getInscriptions())
    {
      InfoSaison infoSaison = findBySaisonPersonneCategorie(courseLoad
          .getEvenement().getSaison(), inscription.getPersonne(),
          inscription.getCategorie());
      final boolean isNew = (infoSaison == null);

      //Si cet infoSaison est non-null, on le prend. Sinon, on en cherche un
      //nouveau.
      if (infoSaison == null)
      {
        infoSaison = this.setInfoSaison(courseLoad.getEvenement()
            .getSaison(), inscription.getPersonne(), inscription
            .getCategorie(), plaques);
      }

      inscription.setNoPlaque(infoSaison.getPlaqueUnique());
View Full Code Here

  public void testDelete()
  {
    Saison saison = getSaisonService().findByAnnee(2007).iterator().next();
    Evenement evenement = getEvenementService()
        .getEvenementParNo(saison, 1);
    Course course = getCourseService().getCourseParNom(evenement,
        "Cross-Country");
    CourseEnsemblePuces cep = course.getCourseEnsemblePuces().iterator()
        .next();

    getCourseEnsemblePucesService().delete(cep);
    flush(getCourseEnsemblePucesService());

    assertEquals(0, course.getCourseEnsemblePuces().size());
    assertEquals(19, countRowsInTable("courseensemblepuces"));
  }
View Full Code Here

        new GregorianCalendar(2008, 3, 1).getTime()).size());
  }

  public final void testSave()
  {
    final Course autreCourse = getCourseService().getCourseParNom(
        evenement, "Downhill");
    final Date newDate = new GregorianCalendar(2008, 0, 1).getTime();
    autreCourse.setDate(newDate);
    getCourseService().save(autreCourse);

    Assert.assertEquals(newDate, getCourseService().getCourseParNom(
        evenement, "Downhill").getDate());
  }
View Full Code Here

  public final void testSaveValidateNomDouble()
  {
    try
    {
      Course course = createCourse();
      course.setNom("Cross-Country");
      getCourseService().save(course);

      fail();
    }
    catch (final ValidationException vex)
View Full Code Here

      final Double priceAjustment)
  {
    Validate.argNotNull(inscription, "inscription");
    Validate.argNotNull(priceAjustment, "priceAjustment");

    final Course course = inscription.getCourse();
    final Categorie categorie = inscription.getCategorie();

    final Double prix = tarificationService.findByCourseCategorie(course,
        categorie).getPrixEnVigueur();
    inscription.setPrix(prix + priceAjustment);
View Full Code Here

TOP

Related Classes of org.xrace.model.evenements.Course

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.