Package de.zalando.typemapper.namedresult.results

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


        final PreparedStatement ps = connection.prepareStatement("SELECT tmp.string_array_function();");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<ClassWithStringSet> mapper = TypeMapperFactory.createTypeMapper(ClassWithStringSet.class);
        int i = 0;
        while (rs.next()) {
            ClassWithStringSet result = (ClassWithStringSet) mapper.mapRow(rs, i++);
            Assert.assertNotNull(result);
            Assert.assertEquals("str", result.getStr());
            Assert.assertNotNull(result.getArray());
            Assert.assertTrue(result.getArray().size() == 2);
            Assert.assertTrue(result.getArray().contains("result_1"));
            Assert.assertTrue(result.getArray().contains("result_2"));
        }

    }
View Full Code Here


        final PreparedStatement ps = connection.prepareStatement("SELECT tmp.string_null_array_function();");
        final ResultSet rs = ps.executeQuery();
        final TypeMapper<ClassWithStringSet> mapper = TypeMapperFactory.createTypeMapper(ClassWithStringSet.class);
        int i = 0;
        while (rs.next()) {
            ClassWithStringSet result = (ClassWithStringSet) mapper.mapRow(rs, i++);
            Assert.assertNotNull(result);
            Assert.assertEquals("str", result.getStr());
            Assert.assertNotNull(result.getArray());
            Assert.assertTrue(result.getArray().isEmpty());
        }

    }
View Full Code Here

TOP

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

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.