Package ma.glasnost.orika.converter.builtin

Examples of ma.glasnost.orika.converter.builtin.PassThroughConverter


     * @throws DatatypeConfigurationException
     */
    @Test
    public void overrideDefaultCloneableToImmutable() throws DatatypeConfigurationException {
       
        PassThroughConverter cc = new PassThroughConverter(Date.class, Calendar.class);
       
        MapperFactory factory = MappingUtil.getMapperFactory();
        factory.getConverterFactory().registerConverter(cc);
       
        GregorianCalendar cal = new GregorianCalendar();
View Full Code Here


public class PassThroughConverterTestCase {
   
    @Test
    public void testPassThroughConverter() {
       
      PassThroughConverter ptc = new PassThroughConverter(A.class);
     
     
      MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.getConverterFactory().registerConverter(ptc);
View Full Code Here

      /*
       * Note: we register the generic Holder<?> and pass it a Holder<Wrapper<B>>
       * we expect that it should be passed-through
       *
       */
      PassThroughConverter ptc = new PassThroughConverter(new TypeBuilder<Holder<?>>(){}.build());
      MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.getConverterFactory().registerConverter(ptc);
       
        B b = new B();
View Full Code Here

       
      /*
       * Note: we register the specific Holder<Wrapper<A>> and pass it a Holder<Wrapper<B>>;
       * we expect that it should not be passed through
       */
      PassThroughConverter ptc = new PassThroughConverter(new TypeBuilder<Holder<Wrapper<A>>>(){}.build());
      MapperFactory factory = MappingUtil.getMapperFactory();
       
        factory.getConverterFactory().registerConverter(ptc);
       
        B b = new B();
View Full Code Here

        factory.registerClassMap(classMap);
       
        /*
         * Let Orika know that it's okay to copy Employee or Person by reference...
         */
        factory.getConverterFactory().registerConverter(new PassThroughConverter(Employee.class, Person.class));
       
       
        Employee e = new Employee();
        e.setName("Name");
        TaskLayer1<Employee> t1 = new TaskLayer1<Employee>();
View Full Code Here

        factory.registerClassMap(classMap);
       
        /*
         * Let Orika know that it's okay to copy Employee or Person by reference...
         */
        factory.getConverterFactory().registerConverter(new PassThroughConverter(Employee.class, Person.class));
       
       
        Employee e = new Employee();
        e.setName("Name");
        TaskLayer1<Employee> t1 = new TaskLayer1<Employee>();
View Full Code Here

TOP

Related Classes of ma.glasnost.orika.converter.builtin.PassThroughConverter

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.