ResultSetUtil { public static Array getArray(final ResultSet resultSet, final String columnName) throws SQLException { return getNullableFrom(resultSet, rs -> rs.getArray(columnName)); } private  ResultSetUtil(); static Object getObject(final ResultSet resultSet, final String columnName); static Boolean getBoolean(final ResultSet resultSet, final String columnName); static Byte getByte(final ResultSet resultSet, final String columnName); static Short getShort(final ResultSet resultSet, final String columnName); static Integer getInt(final ResultSet resultSet, final String columnName); static Long getLong(final ResultSet resultSet, final String columnName); static Float getFloat(final ResultSet resultSet, final String columnName); static Double getDouble(final ResultSet resultSet, final String columnName); static String getString(final ResultSet resultSet, final String columnName); static Date getDate(final ResultSet resultSet, final String columnName); static Time getTime(final ResultSet resultSet, final String columnName); static Timestamp getTimestamp(final ResultSet resultSet, final String columnName); static BigDecimal getBigDecimal(final ResultSet resultSet, final String columnName); static Blob getBlob(final ResultSet resultSet, final String columnName); static Clob getClob(final ResultSet resultSet, final String columnName); static Array getArray(final ResultSet resultSet, final String columnName); static Ref getRef(final ResultSet resultSet, final String columnName); static URL getURL(final ResultSet resultSet, final String columnName); static RowId getRowId(final ResultSet resultSet, final String columnName); static NClob getNClob(final ResultSet resultSet, final String columnName); static SQLXML getSQLXML(final ResultSet resultSet, final String columnName); static UUID getUUID(final ResultSet resultSet, final String columnName); static Object getObject(final ResultSet resultSet, final int ordinalPosition); static Boolean getBoolean(final ResultSet resultSet, final int ordinalPosition); static Byte getByte(final ResultSet resultSet, final int ordinalPosition); static Short getShort(final ResultSet resultSet, final int ordinalPosition); static Integer getInt(final ResultSet resultSet, final int ordinalPosition); static Long getLong(final ResultSet resultSet, final int ordinalPosition); static Float getFloat(final ResultSet resultSet, final int ordinalPosition); static Double getDouble(final ResultSet resultSet, final int ordinalPosition); static String getString(final ResultSet resultSet, final int ordinalPosition); static Date getDate(final ResultSet resultSet, final int ordinalPosition); static Time getTime(final ResultSet resultSet, final int ordinalPosition); static Timestamp getTimestamp(final ResultSet resultSet, final int ordinalPosition); static BigDecimal getBigDecimal(final ResultSet resultSet, final int ordinalPosition); static BigInteger getBigInteger(final ResultSet resultSet, final int ordinalPosition); static Blob getBlob(final ResultSet resultSet, final int ordinalPosition); static Clob getClob(final ResultSet resultSet, final int ordinalPosition); static Array getArray(final ResultSet resultSet, final int ordinalPosition); static Ref getRef(final ResultSet resultSet, final int ordinalPosition); static URL getURL(final ResultSet resultSet, final int ordinalPosition); static RowId getRowId(final ResultSet resultSet, final int ordinalPosition); static NClob getNClob(final ResultSet resultSet, final int ordinalPosition); static SQLXML getSQLXML(final ResultSet resultSet, final int ordinalPosition); static UUID getUUID(final ResultSet resultSet, final int ordinalPosition); static byte[] getBytes(final ResultSet resultSet, final int ordinalPosition);  }
@Test void getArray() throws SQLException { assertEquals(RS_ARRAY.getValue(), ResultSetUtil.getArray(RESULT_SET, RS_ARRAY.getLabel())); assertEquals(RS_ARRAY.getValue(), ResultSetUtil.getArray(RESULT_SET, RS_ARRAY.getIndex())); assertNull(ResultSetUtil.getArray(NULL_RESULT_SET, RS_ARRAY.getLabel())); assertNull(ResultSetUtil.getArray(NULL_RESULT_SET, RS_ARRAY.getIndex())); }