Examples of CategorieParticipante


Examples of net.fqsc.inscriptions.model.categories.CategorieParticipante

      {
        map.put(line.getPlaque(), line);
      }
    }

    final CategorieParticipante catPart = this.categorieParticipanteController
        .getCategorieParticipante(this.saison, categorie);

    if (catPart.getPlaqueMin() != null && catPart.getPlaqueMax() != null)
    {
      for (int i = catPart.getPlaqueMin(); i <= catPart.getPlaqueMax(); i++)
      {
        if (!map.containsKey(new Integer(i).toString()))
        {
          map.put(new Integer(i).toString(), new PlaqueAttribueeLine(
              new Integer(i).toString()));
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

  {
    Validate.argNotNull(plaque, "plaque");
    Validate.argNotNull(saison, "saison");
    Validate.argNotNull(categorie, "categorie");

    final CategorieParticipante categorieParticipante = categorieParticipanteService
        .getCategorieParticipante(saison, categorie);
    boolean plaqueMinMaxDefini = (categorieParticipante.getPlaqueMin() != null && categorieParticipante
        .getPlaqueMax() != null);
    boolean plaqueGeleMinMaxDefini = (categorieParticipante
        .getPlaqueGeleMin() != null && categorieParticipante
        .getPlaqueGeleMax() != null);

    int plaqueint = 0;
    try
    {
      plaqueint = Integer.parseInt(plaque);
    }
    catch (NumberFormatException e)
    {
      if (plaqueMinMaxDefini)
      {
        throw new PlaqueException("La plaque n'est pas un numéro. ");
      }
    }

    if (plaqueMinMaxDefini)
    {
      if (plaqueint < categorieParticipante.getPlaqueMin()
          || plaqueint > categorieParticipante.getPlaqueMax())
      {
        throw new PlaqueException("La plaque n'est pas dans la plage"
            + " de plaques assignées. ");
      }

      if (plaqueGeleMinMaxDefini)
      {
        if (plaqueint >= categorieParticipante.getPlaqueGeleMin()
            && plaqueint <= categorieParticipante
                .getPlaqueGeleMax())
        {
          throw new PlaqueException(
              "La plaque est dans la plage des "
                  + "plaques gelées. ");
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

  private InfoSaison setInfoSaison(final Saison saison,
      final Personne personne, final Categorie categorie,
      final Set<MultiKey<Object>> plaques)
  {
    final CategorieParticipante categorieParticipante = categorieParticipanteService
        .getCategorieParticipante(saison, categorie);

    valideSaisonCategorie(saison, categorie);

    // Vérification s'il existe un InfoSaison pour cette
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

  }

  private void valideSaisonCategorie(final Saison saison,
      final Categorie categorie)
  {
    final CategorieParticipante catPart = categorieParticipanteService
        .getCategorieParticipante(saison, categorie);

    if (catPart == null)
    {
      throw new CategorieException(
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

    Validate.argNotNull(evenement, "rabaisEvenement.evenement");

    final Categorie categorie = rabaisEvenement.getCategorie();
    Validate.argNotNull(categorie, "rabaisEvenement.categorie");

    final CategorieParticipante categorieParticipante = categorieParticipanteService
        .getCategorieParticipante(evenement.getSaison(), categorie);
    if (categorieParticipante == null)
    {
      throw new CategorieException(
          "La catégorie ne participe pas à la saison. ");
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

            "Le maximum des plaques gelées doit être plus petit "
                + "que le maximum des plaques attribuées. ");
      }
    }

    CategorieParticipante categorieParticipante = getCategorieParticipante(
        saison, categorie);

    if (categorieParticipante == null)
    {
      categorieParticipante = new CategorieParticipante();
      categorieParticipante.setSaison(saison);
      categorieParticipante.setCategorie(categorie);
    }

    categorieParticipante.setPlaqueMin(plaqueMin);
    categorieParticipante.setPlaqueMax(plaqueMax);
    categorieParticipante.setPlaqueGeleMin(plaqueGeleMin);
    categorieParticipante.setPlaqueGeleMax(plaqueGeleMax);

    getGenericDao().save(categorieParticipante);

    return categorieParticipante;
  }
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

  public void annule(final Saison saison, final Categorie categorie)
  {
    Validate.argNotNull(categorie, "categorie");
    Validate.argNotNull(saison, "saison");

    final CategorieParticipante catPart = getCategorieParticipante(saison,
        categorie);

    if (catPart != null)
    {
      delete(catPart);
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

        .getCategories(saison2007).size());
  }

  public final void testSetCategorieParticipanteSaisonCategorie()
  {
    final CategorieParticipante catParticipante = getCategorieParticipanteService()
        .setCategorieParticipante(4000, 4100, 4010, 4019, saison2007,
            categorieHardtail);

    Assert.assertEquals(4100, catParticipante.getPlaqueMax().intValue());
    Assert.assertNotNull(getCategorieParticipanteService()
        .getCategorieParticipante(saison2007, categorieHardtail));
  }
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

        .getCategorieParticipante(saison2007, categorieHardtail));
  }

  public final void testSetCategorieParticipanteSaisonCategorieExiste()
  {
    CategorieParticipante catParticipante = getCategorieParticipanteService()
        .setCategorieParticipante(7000, 7100, null, null, saison2007,
            categorieXU15);
    catParticipante = getCategorieParticipanteService()
        .getCategorieParticipante(saison2007, categorieXU15);

    Assert.assertEquals(7000, catParticipante.getPlaqueMin().intValue());
    Assert.assertEquals(7100, catParticipante.getPlaqueMax().intValue());
    Assert.assertEquals(null, catParticipante.getPlaqueGeleMin());
    Assert.assertEquals(null, catParticipante.getPlaqueGeleMax());
  }
View Full Code Here

Examples of org.xrace.model.evenements.CategorieParticipante

    Assert.assertEquals(null, catParticipante.getPlaqueGeleMax());
  }

  public final void testSetCategorieParticipanteNoRange()
  {
    CategorieParticipante catParticipante = getCategorieParticipanteService()
        .setCategorieParticipante(null, null, null, null, saison2007,
            categorieXU15);
    catParticipante = getCategorieParticipanteService()
        .getCategorieParticipante(saison2007, categorieXU15);

    Assert.assertEquals(null, catParticipante.getPlaqueMin());
    Assert.assertEquals(null, catParticipante.getPlaqueMax());
    Assert.assertEquals(null, catParticipante.getPlaqueGeleMin());
    Assert.assertEquals(null, catParticipante.getPlaqueGeleMax());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.