Package net.fqsc.inscriptions.model.categories

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


   * @see wicket.markup.html.form.ChoiceRenderer#getDisplayValue(java.lang.Object)
   */
  @Override
  public Object getDisplayValue(final Object object)
  {
    final Discipline discipline = (Discipline) object;
    if (discipline == null)
    {
      return null;
    }
    else
    {
      return discipline.getNom();
    }
  }
View Full Code Here


  {
    if (index < 0)
    {
      return "";
    }
    final Discipline discipline = (Discipline) object;
    return discipline.getOid().toString();
  }
View Full Code Here

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

    if (parameters == null)
    {
      this.discipline = new Discipline(fqscContext.getPersistentModel()
          .getDomainModel());
    }
    else
    {
      final TypeParameters typeParameters = TypeParameters.DISCIPLINE;
View Full Code Here

  }

  @Override
  protected void populateItem(final ListItem item)
  {
    final Discipline discipline = (Discipline) item.getModelObject();

    item.add(new Label("nom", discipline.getNom()));

    final Map<TypeParameters, Object> hashMap = new HashMap<TypeParameters, Object>();
    hashMap.put(DisciplinePanel.TypeParameters.DISCIPLINE, discipline);
    item.add(HomePage.link("modifier", DisciplinePanel.class, hashMap));
  }
View Full Code Here

   */
  public void updateDiscipline(final Discipline discipline)
  {
    try
    {
      final Discipline beforeDiscipline = (Discipline) this.disciplines.retrieveByOid(discipline.getOid());
     
      if (!this.disciplines.update(beforeDiscipline, discipline))
      {
        throw new ValidationException("La validation de dmLite à échoué. ");
      }
View Full Code Here

      {
        if (this.getDomainModel().isInitialized())
        {
          final Course course = (Course) entity;

          final Discipline discipline = course.getDiscipline();
          if (this.getDiscipline() == null)
          {
            if (!discipline.getCourses().contain(course))
            {
              post = discipline.getCourses().add(course);
            }
          }
        }
      }
      else
View Full Code Here

    {
      if (super.postRemove(entity))
      {
        final Course course = (Course) entity;

        final Discipline discipline = course.getDiscipline();
        if (this.getDiscipline() == null)
        {
          if (discipline.getCourses().contain(course))
          {
            post = discipline.getCourses().remove(course);
          }
        }
      }
      else
      {
View Full Code Here

      if (super.postUpdate(beforeEntity, afterEntity))
      {
        final Course beforeCourse = (Course) beforeEntity;
        final Course afterCourse = (Course) afterEntity;

        final Discipline beforeDiscipline = beforeCourse
            .getDiscipline();
        final Discipline afterDiscipline = afterCourse.getDiscipline();

        if (beforeEntity != afterEntity)
        {
          if (beforeDiscipline.getCourses().contain(beforeCourse))
            post = beforeDiscipline.getCourses().remove(
                beforeCourse);

          if (post && !afterDiscipline.getCourses().contain(afterCourse))
            post = afterDiscipline.getCourses().add(afterCourse);
        }
      }
      else
      {
        post = false;
View Full Code Here

   * {@link net.fqsc.inscriptions.controller.categories.DisciplineController#getByNom(java.lang.String)}.
   */
  @Test
  public void testGetByNom()
  {
    final Discipline discipline = this.disciplineCtrl.getByNom("XC");
    Assert.assertNotNull(discipline);
    Assert.assertEquals("XC", discipline.getNom());
  }
View Full Code Here

  }

  @Test
  public void testCreateDiscipline()
  {
    final Discipline discipline = new Discipline(this.utils.getDomainModel());
    discipline.setNom("XCMQ");

    this.disciplineCtrl.createDiscipline(discipline);

    Assert.assertNotNull(this.disciplineCtrl.getByNom("XCMQ"));
  }
View Full Code Here

TOP

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

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.