Examples of classMap()


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

    @Test
    public void testMappingInterfaceImplementationWithExistingDirectMapping() throws Exception {
       
        MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.registerClassMap(factory.classMap(Library.class, LibraryMyDTO.class)
                .field("title", "myTitle")
                .field("books", "myBooks")
                .byDefault()
                .toClassMap());
       
View Full Code Here

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

                .field("title", "myTitle")
                .field("books", "myBooks")
                .byDefault()
                .toClassMap());
       
        factory.registerClassMap(factory.classMap(Author.class, AuthorMyDTO.class).field("name", "myName").byDefault().toClassMap());
        factory.registerClassMap(factory.classMap(Book.class, BookMyDTO.class)
                .field("title", "myTitle")
                .field("author", "myAuthor")
                .byDefault()
                .toClassMap());
View Full Code Here

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

                .field("books", "myBooks")
                .byDefault()
                .toClassMap());
       
        factory.registerClassMap(factory.classMap(Author.class, AuthorMyDTO.class).field("name", "myName").byDefault().toClassMap());
        factory.registerClassMap(factory.classMap(Book.class, BookMyDTO.class)
                .field("title", "myTitle")
                .field("author", "myAuthor")
                .byDefault()
                .toClassMap());
       
View Full Code Here

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

   
    @Test
    public void testMappingInterfaceImplementationWithExistingInheritedMapping() throws Exception {
       
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.registerClassMap(factory.classMap(Library.class, LibraryMyDTO.class)
                .field("title", "myTitle")
                .field("books", "myBooks")
                .byDefault()
                .toClassMap());
       
View Full Code Here

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

                .field("title", "myTitle")
                .field("books", "myBooks")
                .byDefault()
                .toClassMap());
       
        factory.registerClassMap(factory.classMap(Author.class, AuthorMyDTO.class).field("name", "myName").byDefault().toClassMap());
        factory.registerClassMap(factory.classMap(Book.class, BookMyDTO.class)
                .field("title", "myTitle")
                .field("author", "myAuthor")
                .byDefault()
                .toClassMap());
View Full Code Here

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

                .field("books", "myBooks")
                .byDefault()
                .toClassMap());
       
        factory.registerClassMap(factory.classMap(Author.class, AuthorMyDTO.class).field("name", "myName").byDefault().toClassMap());
        factory.registerClassMap(factory.classMap(Book.class, BookMyDTO.class)
                .field("title", "myTitle")
                .field("author", "myAuthor")
                .byDefault()
                .toClassMap());
       
View Full Code Here

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

    @Test
    public void testMappingSubclassImplementationWithExistingMapping() throws Exception {
       
        MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.registerClassMap(factory.classMap(AuthorParent.class, AuthorMyDTO.class)
                .field("name", "myName")
                .byDefault()
                .toClassMap());
        factory.registerClassMap(factory.classMap(BookParent.class, BookMyDTO.class)
                .field("title", "myTitle")
View Full Code Here

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

       
        factory.registerClassMap(factory.classMap(AuthorParent.class, AuthorMyDTO.class)
                .field("name", "myName")
                .byDefault()
                .toClassMap());
        factory.registerClassMap(factory.classMap(BookParent.class, BookMyDTO.class)
                .field("title", "myTitle")
                .field("author", "myAuthor")
                .byDefault()
                .toClassMap());
       
View Full Code Here

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

    public void testSimpleCase() throws Throwable {
     
        final SimpleDateFormat df = new SimpleDateFormat(DATE_PATTERN);
        MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.registerClassMap(factory.classMap(PersonVO.class, Person.class)
                //.constructorA()
                .fieldMap("dateOfBirth", "date")
                .converter(DATE_CONVERTER)
                .add()
                .byDefault()
View Full Code Here

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

        Type<MapEntry<String, Integer>> entryType = MapEntry.concreteEntryType(mapType);
        Type<Ranking> rankingType = TypeFactory.valueOf(Ranking.class);
       
       
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.registerClassMap(factory.classMap(rankingType, entryType)
                .field("name", "key")
                .field("rank", "value")
                .byDefault().toClassMap());
               
        MapperFacade mapper = factory.getMapperFacade();
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.