Package de.zalando.typemapper.namedresult.results

Examples of de.zalando.typemapper.namedresult.results.ClassWithEmbed


        final PreparedStatement ps = connection.prepareStatement("SELECT 1 as i, 2 as l, 'c' as c, 'str' as str");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithEmbed.class);
        int i = 0;
        while (rs.next()) {
            final ClassWithEmbed result = (ClassWithEmbed) mapper.mapRow(rs, i++);
            Assert.assertNotNull(result.getPrimitives());
            Assert.assertEquals(1, result.getPrimitives().getI());
            Assert.assertEquals(2, result.getPrimitives().getL());
            Assert.assertEquals('c', result.getPrimitives().getC());
            Assert.assertEquals("str", result.getStr());
        }
    }
View Full Code Here


        final PreparedStatement ps = connection.prepareStatement("SELECT null as str");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithEmbed.class);
        int i = 0;
        while (rs.next()) {
            final ClassWithEmbed result = (ClassWithEmbed) mapper.mapRow(rs, i++);
            Assert.assertNull(result.getStr());
        }
    }
View Full Code Here

        final PreparedStatement ps = connection.prepareStatement("SELECT '' as str");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithEmbed.class);
        int i = 0;
        while (rs.next()) {
            final ClassWithEmbed result = (ClassWithEmbed) mapper.mapRow(rs, i++);
            Assert.assertEquals("", result.getStr());
        }
    }
View Full Code Here

TOP

Related Classes of de.zalando.typemapper.namedresult.results.ClassWithEmbed

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.