Package org.dozer.vo.recursive

Examples of org.dozer.vo.recursive.ClassB


    ClassAA classA = newInstance(ClassAA.class);

    classA.setNom("gbs");
    classA.setPrenom("prn");

    ClassB classB = newInstance(ClassB.class);
    classA.addSubs(classB);
    classB.setRue("rue");
    classB.setVille("ville");
    return classA;
  }
View Full Code Here


  public void testConvertWithSubClass() {
    mapper = getMapper("recursivemappings.xml", "recursivemappings2.xml");
    ClassAA testAA = createTestClassAA();
    // the == is on purpose, we test that the referenced parent of the first item of the subs is the parent instance
    // itself
    ClassB testClassB = testAA.getSubs().iterator().next();
    assertTrue(testClassB.getParent() == testAA);
    ClassAAPrime testAAPrime = mapper.map(testAA, ClassAAPrime.class, null);
    // testing the new dozer3.0 bi-directionnal reference through a set
    assertEquals(testAA.getSubs().size(), testAAPrime.getSubs().size());
    // the equality is true at the data level
    ClassBPrime testClassBPrime = testAAPrime.getSubs().iterator().next();
View Full Code Here

    ClassAA classA = newInstance(ClassAA.class);

    classA.setNom("gbs");
    classA.setPrenom("prn");

    ClassB classB = newInstance(ClassB.class);
    classA.addSubs(classB);
    classB.setRue("rue");
    classB.setVille("ville");
    return classA;
  }
View Full Code Here

  public void testConvertWithSubClass() {
    mapper = getMapper("recursivemappings.xml", "recursivemappings2.xml");
    ClassAA testAA = createTestClassAA();
    // the == is on purpose, we test that the referenced parent of the first item of the subs is the parent instance
    // itself
    ClassB testClassB = testAA.getSubs().iterator().next();
    assertTrue(testClassB.getParent() == testAA);
    ClassAAPrime testAAPrime = mapper.map(testAA, ClassAAPrime.class, null);
    // testing the new dozer3.0 bi-directionnal reference through a set
    assertEquals(testAA.getSubs().size(), testAAPrime.getSubs().size());
    // the equality is true at the data level
    ClassBPrime testClassBPrime = testAAPrime.getSubs().iterator().next();
View Full Code Here

TOP

Related Classes of org.dozer.vo.recursive.ClassB

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.