Package net.fqsc.inscriptions.model.categories

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


      {
        if (this.getDomainModel().isInitialized())
        {
          final Tarification tarification = (Tarification) entity;

          final Categorie categorieTarification = tarification
              .getCategorie();
          if (this.getCategorie() == null)
          {
            if (!categorieTarification.getTarifications().contain(
                tarification))
            {
              post = categorieTarification.getTarifications()
                  .add(tarification);
            }
          }
        }
      }
View Full Code Here


    {
      if (super.postRemove(entity))
      {
        final Tarification tarification = (Tarification) entity;

        final Categorie categorieTarification = tarification
            .getCategorie();
        if (this.getCategorie() == null)
        {
          if (categorieTarification.getTarifications().contain(
              tarification))
          {
            post = categorieTarification.getTarifications().remove(
                tarification);
          }
        }
      }
      else
View Full Code Here

      if (super.postUpdate(beforeEntity, afterEntity))
      {
        final Tarification beforeTarification = (Tarification) beforeEntity;
        final Tarification afterTarification = (Tarification) afterEntity;

        final Categorie beforeCategorie = beforeTarification
            .getCategorie();
        final Categorie afterCategorie = afterTarification
            .getCategorie();

        if (beforeEntity != afterEntity)
        {
          if (beforeCategorie.getTarifications().contain(
              beforeTarification))
            post = beforeCategorie.getTarifications().remove(
                beforeTarification);

          if (post)
            post = afterCategorie.getTarifications().add(
                afterTarification);
        }
      }
      else
      {
View Full Code Here

   * @see wicket.markup.html.form.IChoiceRenderer#getDisplayValue(Object)
   */
  @Override
  public Object getDisplayValue(final Object object)
  {
    final Categorie categorie = (Categorie) object;
    final String display = categorie.getNom();
    return display;
  }
View Full Code Here

  {
    if (index < 0)
    {
      return "";
    }
    final Categorie categorie = (Categorie) object;
    final String id = categorie.getOid().toString();
    return id;
  }
View Full Code Here

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final Categorie categorie = (Categorie) item.getModelObject();

    item.add(new Label("codeCategorie", categorie.getCodeCategorie()));
    item.add(new Label("nom", categorie.getNom()));
    item.add(new Label("ageMin", categorie.getAgeMin().toString()));
    item.add(new Label("ageMax", categorie.getAgeMax().toString()));
    item.add(new Label("niveau", categorie.getNiveau()));
    item.add(new Label("sexe", categorie.getSexe()));

    final Map<TypeParameters, Object> hashMap = new HashMap<TypeParameters, Object>();
    final CategoriePanel.TypeParameters parameters = CategoriePanel.TypeParameters.CATEGORIE;
    hashMap.put(parameters, categorie);
    item.add(HomePage.link("modifier", CategoriePanel.class, hashMap));
View Full Code Here

    final InscriptionsApp app = (InscriptionsApp) this.getApplication();
    final IPersistentModelContext fqscContext = app.getDbContext();

    if (parameters == null)
    {
      this.categorie = new Categorie(fqscContext.getPersistentModel()
          .getDomainModel());
    }
    else
    {
      final TypeParameters typeParameters = TypeParameters.CATEGORIE;
View Full Code Here

 
  @Override
  protected void populateItem(final ListItem item) {
    final InfoSaison infoSaison = (InfoSaison) item.getModelObject();
    final Personne personne = (Personne) this.personnes.retrieveByOid(infoSaison.getPersonne().getOid());
    final Categorie categorie = (Categorie) this.categories.retrieveByOid(infoSaison.getCategorie().getOid());
   
    final Map map = new HashMap();
    map.put(DisplayPlaquePersonne.TypeParameters.INFOSAISON, infoSaison);
    map.put(DisplayPlaquePersonne.TypeParameters.ISNEW, false);
    map.put(DisplayPlaquePersonne.TypeParameters.PERSONNE, personne);
View Full Code Here

      throw new UniqueException(
          "Il existe déjà une catégorie ayant le même code, "
              + "sexe et discipline. ");
    }

    final Categorie categorieDb = new Categorie(this.domainModel);

    categorieDb.setCodeCategorie(categorie.getCodeCategorie());
    categorieDb.setNom(categorie.getNom());
    categorieDb.setAgeMax(categorie.getAgeMax());
    categorieDb.setAgeMin(categorie.getAgeMin());
    categorieDb.setSexe(categorie.getSexe());
    categorieDb.setNiveau(categorie.getNiveau());
    categorieDb.setDiscipline(categorie.getDiscipline());

    try
    {
      if (!this.categories.add(categorieDb))
      {
View Full Code Here

   */
  public void updateCategorie(final Categorie categorie)
  {
    try
    {
      final Categorie beforeCategorie = (Categorie) this.categories.retrieveByOid(categorie.getOid());
     
      if (!this.categories.update(beforeCategorie, categorie))
      {
        throw new ValidationException("La validation de dmLite à échoué. ");
      }
View Full Code Here

TOP

Related Classes of net.fqsc.inscriptions.model.categories.Categorie

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.