Package org.xrace.model.puces

Examples of org.xrace.model.puces.EnsemblePuces


  public EnsemblePucesUpdatePage(EnsemblePuces ensemblePuces)
  {
    super();

    final EnsemblePuces ensemblePucesEffectif;

    if (ensemblePuces.isNew())
    {
      ensemblePucesEffectif = ensemblePuces;
    }
View Full Code Here


      private static final long serialVersionUID = 1L;

      @Override
      public void onClick()
      {
        EnsemblePuces newEnsemblePuces = ensemblePucesService
            .newEnsemblePuces(new DateMidnight().toDate());
        setResponsePage(new EnsemblePucesUpdatePage(newEnsemblePuces));
      }
    });
View Full Code Here

  }

  @Override
  protected void onBeforeRender()
  {
    EnsemblePuces ens = ensemblePucesService.find(ensemblePuces.getId());
    pucesDataViewPanel.updatePuces(ens.getPucesAsList());

    super.onBeforeRender();
  }
View Full Code Here

*/
public class PuceServiceTests extends XRaceTestCase
{
  public void testFindByCode() throws Exception
  {
    EnsemblePuces ensemblePuces = getEnsemblePucesService().findByCode(
        "20100330-01");
    assertNotNull(getPuceService().findByCode("Puce1", ensemblePuces));
  }
View Full Code Here

    assertNotNull(getPuceService().findByCode("Puce1", ensemblePuces));
  }

  public void testFindByNumero() throws Exception
  {
    EnsemblePuces ensemblePuces = getEnsemblePucesService().findByCode(
        "20100330-01");
    assertNotNull(getPuceService().findByNumero(1, ensemblePuces));
  }
View Full Code Here

    assertNotNull(getPuceService().findByNumero(1, ensemblePuces));
  }

  public void testFindByCodeNotFound() throws Exception
  {
    EnsemblePuces ensemblePuces = getEnsemblePucesService().findByCode(
        "20100330-01");
    assertNull(getPuceService().findByCode("Puce999", ensemblePuces));
  }
View Full Code Here

    assertNull(getPuceService().findByCode("Puce999", ensemblePuces));
  }

  public void testSave() throws Exception
  {
    EnsemblePuces ensemblePuces = getEnsemblePucesService().findByCode(
        "20100330-01");
    Puce puce = new Puce();
    puce.setCode("Puce999");
    puce.setNumero(999);
    puce.setEnsemblePuces(ensemblePuces);
View Full Code Here

    assertEquals(843, countRowsInTable("puce"));
  }

  public void testSaveUnique1() throws Exception
  {
    EnsemblePuces ensemblePuces = getEnsemblePucesService().findByCode(
        "20100330-01");
    Puce puce = new Puce();
    puce.setCode("Puce1");
    puce.setNumero(9999);
    puce.setEnsemblePuces(ensemblePuces);
View Full Code Here

    }
  }

  public void testSaveUnique2() throws Exception
  {
    EnsemblePuces ensemblePuces = getEnsemblePucesService().findByCode(
        "20100330-01");
    Puce puce = new Puce();
    puce.setCode("PuceXXX");
    puce.setNumero(1);
    puce.setEnsemblePuces(ensemblePuces);
View Full Code Here

  }

  public void validateAndImport(ImportationPuces importationPuces)
  {
    importationPuces = getGenericDao().merge(importationPuces);
    EnsemblePuces ensemblePuces = importationPuces.getEnsemblePuces();

    validate(importationPuces);

    if (importationPuces.isRemplacerPuces())
    {
      for (Puce puce : new ArrayList<Puce>(ensemblePuces.getPuces()))
      {
        ensemblePuces.removePuce(puce);
        puceService.delete(puce);
      }
    }

    // On doit faire un flush pour que les delete se rendent à la BD.
View Full Code Here

TOP

Related Classes of org.xrace.model.puces.EnsemblePuces

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.