Package org.dozer.vo.inheritance

Examples of org.dozer.vo.inheritance.SClass


  public AnotherSubClass getAnotherSubClass() {
    AnotherSubClass asub = newInstance(AnotherSubClass.class);
    asub.setBaseAttribute("base");
    asub.setSubAttribute("sub");
    List<BaseSubClass> list = newInstance(ArrayList.class);
    SClass s = newInstance(SClass.class);
    s.setBaseSubAttribute("sBase");
    s.setSubAttribute("s");
    S2Class s2 = newInstance(S2Class.class);
    s2.setBaseSubAttribute("s2Base");
    s2.setSub2Attribute("s2");
    list.add(s2);
    list.add(s);
    asub.setSubList(list);

    List<BaseSubClass> list2 = newInstance(ArrayList.class);
    SClass sclass = newInstance(SClass.class);
    sclass.setBaseSubAttribute("sBase");
    sclass.setSubAttribute("s");
    S2Class s2class = newInstance(S2Class.class);
    s2class.setBaseSubAttribute("s2Base");
    s2class.setSub2Attribute("s2");
    SClass sclass2 = newInstance(SClass.class);
    sclass2.setBaseSubAttribute("sclass2");
    sclass2.setSubAttribute("sclass2");
    list2.add(s2class);
    list2.add(sclass);
    list2.add(sclass2);
    asub.setListToArray(list2);

    SClass sclassA = newInstance(SClass.class);
    SClass sclassB = newInstance(SClass.class);
    sclassA.setBaseSubAttribute("sBase");
    sclassA.setSubAttribute("s");
    sclassB.setBaseSubAttribute("sBase");
    sclassB.setSubAttribute("s");
    asub.setSClass(sclassA);
    asub.setSClass2(sclassB);

    return asub;
  }
View Full Code Here


    // test base to base and sub to sub mapping with an intermediate on the destination
    AnotherSubClass asub = newInstance(AnotherSubClass.class);
    asub.setBaseAttribute("base");
    asub.setSubAttribute("sub");
    List<BaseSubClass> list = newInstance(ArrayList.class);
    SClass s = newInstance(SClass.class);
    s.setBaseSubAttribute("sBase");
    s.setSubAttribute("s");
    S2Class s2 = newInstance(S2Class.class);
    s2.setBaseSubAttribute("s2Base");
    s2.setSub2Attribute("s2");
    list.add(s2);
    list.add(s);
    asub.setSubList(list);

    List<BaseSubClass> list2 = newInstance(ArrayList.class);
    SClass sclass = newInstance(SClass.class);
    sclass.setBaseSubAttribute("sBase");
    sclass.setSubAttribute("s");
    S2Class s2class = newInstance(S2Class.class);
    s2class.setBaseSubAttribute("s2Base");
    s2class.setSub2Attribute("s2");
    SClass sclass2 = newInstance(SClass.class);
    sclass2.setBaseSubAttribute("sclass2");
    sclass2.setSubAttribute("sclass2");
    list2.add(s2class);
    list2.add(sclass);
    list2.add(sclass2);
    asub.setListToArray(list2);

    SClass sclassA = newInstance(SClass.class);
    SClass sclassB = newInstance(SClass.class);
    sclassA.setBaseSubAttribute("sBase");
    sclassA.setSubAttribute("s");
    sclassB.setBaseSubAttribute("sBase");
    sclassB.setSubAttribute("s");
    asub.setSClass(sclassA);
    asub.setSClass2(sclassB);

    AnotherSubClassPrime subPrime = mapper.map(asub, AnotherSubClassPrime.class);
View Full Code Here

    // test base to base and sub to sub mapping with an intermediate on the destination
    AnotherSubClass asub = newInstance(AnotherSubClass.class);
    asub.setBaseAttribute("base");
    asub.setSubAttribute("sub");
    List<BaseSubClass> list = newInstance(ArrayList.class);
    SClass s = newInstance(SClass.class);
    s.setBaseSubAttribute("sBase");
    s.setSubAttribute("s");
    S2Class s2 = newInstance(S2Class.class);
    s2.setBaseSubAttribute("s2Base");
    s2.setSub2Attribute("s2");
    list.add(s2);
    list.add(s);
    asub.setSubList(list);

    List<BaseSubClass> list2 = newInstance(ArrayList.class);
    SClass sclass = newInstance(SClass.class);
    sclass.setBaseSubAttribute("sBase");
    sclass.setSubAttribute("s");
    S2Class s2class = newInstance(S2Class.class);
    s2class.setBaseSubAttribute("s2Base");
    s2class.setSub2Attribute("s2");
    SClass sclass2 = newInstance(SClass.class);
    sclass2.setBaseSubAttribute("sclass2");
    sclass2.setSubAttribute("sclass2");
    list2.add(s2class);
    list2.add(sclass);
    list2.add(sclass2);
    asub.setListToArray(list2);

    SClass sclassA = newInstance(SClass.class);
    SClass sclassB = newInstance(SClass.class);
    sclassA.setBaseSubAttribute("sBase");
    sclassA.setSubAttribute("s");
    sclassB.setBaseSubAttribute("sBase");
    sclassB.setSubAttribute("s");
    asub.setSClass(sclassA);
    asub.setSClass2(sclassB);

    AnotherSubClassPrime subPrime = mapper.map(asub, AnotherSubClassPrime.class);
View Full Code Here

  public AnotherSubClass getAnotherSubClass() {
    AnotherSubClass asub = newInstance(AnotherSubClass.class);
    asub.setBaseAttribute("base");
    asub.setSubAttribute("sub");
    List<BaseSubClass> list = newInstance(ArrayList.class);
    SClass s = newInstance(SClass.class);
    s.setBaseSubAttribute("sBase");
    s.setSubAttribute("s");
    S2Class s2 = newInstance(S2Class.class);
    s2.setBaseSubAttribute("s2Base");
    s2.setSub2Attribute("s2");
    list.add(s2);
    list.add(s);
    asub.setSubList(list);

    List<BaseSubClass> list2 = newInstance(ArrayList.class);
    SClass sclass = newInstance(SClass.class);
    sclass.setBaseSubAttribute("sBase");
    sclass.setSubAttribute("s");
    S2Class s2class = newInstance(S2Class.class);
    s2class.setBaseSubAttribute("s2Base");
    s2class.setSub2Attribute("s2");
    SClass sclass2 = newInstance(SClass.class);
    sclass2.setBaseSubAttribute("sclass2");
    sclass2.setSubAttribute("sclass2");
    list2.add(s2class);
    list2.add(sclass);
    list2.add(sclass2);
    asub.setListToArray(list2);

    SClass sclassA = newInstance(SClass.class);
    SClass sclassB = newInstance(SClass.class);
    sclassA.setBaseSubAttribute("sBase");
    sclassA.setSubAttribute("s");
    sclassB.setBaseSubAttribute("sBase");
    sclassB.setSubAttribute("s");
    asub.setSClass(sclassA);
    asub.setSClass2(sclassB);

    return asub;
  }
View Full Code Here

TOP

Related Classes of org.dozer.vo.inheritance.SClass

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.