Package org.dozer.vo.generics.deepindex

Examples of org.dozer.vo.generics.deepindex.Pet


  @Test
  public void testDeepMapIndexed() throws Exception {
    Mapper mapper = getMapper(new String[] { "genericCollectionMapping.xml" });
    Pet[] myPets = new Pet[2];
    Family source = newInstance(Family.class, new Object[] {"john", "jane", "doe", new Integer(22000), new Integer(20000)});
    Pet firstPet = newInstance(Pet.class, new Object[] {"molly", 2});
    myPets[0] = firstPet;

    Pet[] offSprings = new Pet[4];
    offSprings[0] = newInstance(Pet.class, new Object[] {"Rocky1", 1});
    offSprings[1] = newInstance(Pet.class, new Object[] {"Rocky2", 1});
    offSprings[2] = newInstance(Pet.class, new Object[] {"Rocky3", 1});
    offSprings[3] = newInstance(Pet.class, new Object[] {"Rocky4", 1});

    Pet secondPet = newInstance(Pet.class, new Object[] {"Rocky", 3, offSprings});
    myPets[1] = secondPet;

    // Save the pet details into the source object
    source.setPets(myPets);
View Full Code Here


  @Test
  public void testDeepMapIndexed() throws Exception {
    Mapper mapper = getMapper(new String[] { "genericCollectionMapping.xml" });
    Pet[] myPets = new Pet[2];
    Family source = newInstance(Family.class, new Object[] {"john", "jane", "doe", new Integer(22000), new Integer(20000)});
    Pet firstPet = newInstance(Pet.class, new Object[] {"molly", 2});
    myPets[0] = firstPet;

    Pet[] offSprings = new Pet[4];
    offSprings[0] = newInstance(Pet.class, new Object[] {"Rocky1", 1});
    offSprings[1] = newInstance(Pet.class, new Object[] {"Rocky2", 1});
    offSprings[2] = newInstance(Pet.class, new Object[] {"Rocky3", 1});
    offSprings[3] = newInstance(Pet.class, new Object[] {"Rocky4", 1});

    Pet secondPet = newInstance(Pet.class, new Object[] {"Rocky", 3, offSprings});
    myPets[1] = secondPet;

    // Save the pet details into the source object
    source.setPets(myPets);
View Full Code Here

TOP

Related Classes of org.dozer.vo.generics.deepindex.Pet

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.