@Test public void testConvert() throws Exception { try (Connection con = dbSetup.getConnection()) { try (Statement st = con.createStatement()){ st.execute("drop table if exists tt"); st.execute("create table tt (annes text[])"); st.execute("insert into tt values ('{RANK_INVALID,RANK_INVALID,CHAINED_SYNOYM}')"); st.execute("insert into tt values ('{\"RANK_INVALID\",\"RANK_INVALID\",\"CHAINED_SYNOYM\"}')"); st.execute("select annes from tt"); ArraySetIssueTypeHandler th = new ArraySetIssueTypeHandler(); ResultSet rs = st.getResultSet(); while (rs.next()) { Set<NameUsageIssue> res = th.getNullableResult(rs, 1); assertEquals(2, res.size()); assertTrue(res.contains(NameUsageIssue.RANK_INVALID)); assertTrue(res.contains(NameUsageIssue.CHAINED_SYNOYM)); } } } }
@Override protected NameUsageIssue convert(String x) { return NameUsageIssue.valueOf(x); }
ArraySetIssueTypeHandler extends ArraySetTypeHandler<NameUsageIssue> { @Override protected NameUsageIssue convert(String x) { return NameUsageIssue.valueOf(x); } }
ArraySetIssueTypeHandler extends ArraySetTypeHandler<NameUsageIssue> { @Override protected NameUsageIssue convert(String x) { return NameUsageIssue.valueOf(x); } ArraySetIssueTypeHandler(); }
ArraySetIssueTypeHandler extends ArraySetTypeHandler<NameUsageIssue> { @Override protected NameUsageIssue convert(String x) { return NameUsageIssue.valueOf(x); } ArraySetIssueTypeHandler();  }
ArraySetIssueTypeHandler extends ArraySetTypeHandler<NameUsageIssue> { @Override protected NameUsageIssue convert(String x) { return NameUsageIssue.valueOf(x); } ArraySetIssueTypeHandler();   }