Package ma.glasnost.orika

Examples of ma.glasnost.orika.MapperFactory.classMap()


   
    @Test
    public void testNestedInheritance() {
        MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.registerClassMap(factory.classMap(Person.class, PersonDTO.class).byDefault());
        factory.registerClassMap(factory.classMap(Client.class, ClientDTO.class).byDefault());
        factory.registerClassMap(factory.classMap(Subscription.class, SubscriptionDTO.class).field("client", "person"));
       
        Client client = new Client();
        client.setName("Khalil Gebran");
View Full Code Here


    @Test
    public void testNestedInheritance() {
        MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.registerClassMap(factory.classMap(Person.class, PersonDTO.class).byDefault());
        factory.registerClassMap(factory.classMap(Client.class, ClientDTO.class).byDefault());
        factory.registerClassMap(factory.classMap(Subscription.class, SubscriptionDTO.class).field("client", "person"));
       
        Client client = new Client();
        client.setName("Khalil Gebran");
       
View Full Code Here

    public void testNestedInheritance() {
        MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.registerClassMap(factory.classMap(Person.class, PersonDTO.class).byDefault());
        factory.registerClassMap(factory.classMap(Client.class, ClientDTO.class).byDefault());
        factory.registerClassMap(factory.classMap(Subscription.class, SubscriptionDTO.class).field("client", "person"));
       
        Client client = new Client();
        client.setName("Khalil Gebran");
       
        Subscription subscription = new Subscription();
View Full Code Here

   
    @Test
    public void test() {

        MapperFactory factory = new DefaultMapperFactory.Builder().build();
        factory.classMap(Parent.class, ParentDto.class).byDefault().register();
        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
View Full Code Here

    @Test
    public void test() {

        MapperFactory factory = new DefaultMapperFactory.Builder().build();
        factory.classMap(Parent.class, ParentDto.class).byDefault().register();
        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
        factory.classMap(ChildDto111.class, Child111.class).byDefault().register();
View Full Code Here

    public void test() {

        MapperFactory factory = new DefaultMapperFactory.Builder().build();
        factory.classMap(Parent.class, ParentDto.class).byDefault().register();
        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
        factory.classMap(ChildDto111.class, Child111.class).byDefault().register();
View Full Code Here

        MapperFactory factory = new DefaultMapperFactory.Builder().build();
        factory.classMap(Parent.class, ParentDto.class).byDefault().register();
        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
        factory.classMap(ChildDto111.class, Child111.class).byDefault().register();

        ChildDto11 dto11 = factory.getMapperFacade().map(new Child11(), ChildDto11.class);
View Full Code Here

        MapperFactory factory = new DefaultMapperFactory.Builder().build();
        factory.classMap(Parent.class, ParentDto.class).byDefault().register();
        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
        factory.classMap(ChildDto111.class, Child111.class).byDefault().register();

        ChildDto11 dto11 = factory.getMapperFacade().map(new Child11(), ChildDto11.class);
        ChildDto12 dto12 = factory.getMapperFacade().map(new Child12(), ChildDto12.class);
View Full Code Here

        factory.classMap(Parent.class, ParentDto.class).byDefault().register();
        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
        factory.classMap(ChildDto111.class, Child111.class).byDefault().register();

        ChildDto11 dto11 = factory.getMapperFacade().map(new Child11(), ChildDto11.class);
        ChildDto12 dto12 = factory.getMapperFacade().map(new Child12(), ChildDto12.class);
        ChildDto111 dto111 = factory.getMapperFacade().map(new Child111(), ChildDto111.class);
View Full Code Here

        factory.classMap(Child1.class, ChildDto1.class).byDefault().register();
        factory.classMap(Child2.class, ChildDto2.class).byDefault().register();
        factory.classMap(Child3.class, ChildDto3.class).byDefault().register();
        factory.classMap(ChildDto11.class, Child11.class).byDefault().register();
        factory.classMap(ChildDto12.class, Child12.class).byDefault().register();
        factory.classMap(ChildDto111.class, Child111.class).byDefault().register();

        ChildDto11 dto11 = factory.getMapperFacade().map(new Child11(), ChildDto11.class);
        ChildDto12 dto12 = factory.getMapperFacade().map(new Child12(), ChildDto12.class);
        ChildDto111 dto111 = factory.getMapperFacade().map(new Child111(), ChildDto111.class);
        ChildDto3 dto3 = factory.getMapperFacade().map(new Child3(), ChildDto3.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.