Package de.zalando.typemapper.namedresult.results

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


                "SELECT ROW(1,2,'c', null)::tmp.simple_type_for_embed as obj");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithObjectWithEmbed.class);
        int i = 0;
        while (rs.next()) {
            final ClassWithObjectWithEmbed result = (ClassWithObjectWithEmbed) mapper.mapRow(rs, i++);
            Assert.assertNotNull(result.getClassWithEmbed());
            Assert.assertNull(result.getClassWithEmbed().getStr());
        }
    }
View Full Code Here


                "SELECT  ROW(1,2,'c','')::tmp.simple_type_for_embed as obj");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<?> mapper = TypeMapperFactory.createTypeMapper(ClassWithObjectWithEmbed.class);
        int i = 0;
        while (rs.next()) {
            final ClassWithObjectWithEmbed result = (ClassWithObjectWithEmbed) mapper.mapRow(rs, i++);
            Assert.assertNotNull(result.getClassWithEmbed());
            Assert.assertEquals("", result.getClassWithEmbed().getStr());
        }
    }
View Full Code Here

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

TOP

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

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.