Class ArrayColumnMapper

  • All Implemented Interfaces:
    ColumnMapper<java.lang.Object>

    class ArrayColumnMapper
    extends java.lang.Object
    implements ColumnMapper<java.lang.Object>
    • Field Detail

      • UNSUPPORTED_TYPES

        private static final java.util.concurrent.CopyOnWriteArraySet<java.lang.Integer> UNSUPPORTED_TYPES
      • elementMapper

        private final ColumnMapper<?> elementMapper
      • componentType

        private final java.lang.Class<?> componentType
    • Constructor Detail

      • ArrayColumnMapper

        ArrayColumnMapper​(ColumnMapper<?> elementMapper,
                          java.lang.Class<?> componentType)
    • Method Detail

      • map

        public java.lang.Object map​(java.sql.ResultSet r,
                                    int columnNumber,
                                    StatementContext ctx)
                             throws java.sql.SQLException
        Description copied from interface: ColumnMapper
        Map the given column of the current row of the result set to an Object. This method should not cause the result set to advance; allow Jdbi to do that, please.
        Specified by:
        map in interface ColumnMapper<java.lang.Object>
        Parameters:
        r - the result set being iterated
        columnNumber - the column number to map (starts at 1)
        ctx - the statement context
        Returns:
        the value to return for this column
        Throws:
        java.sql.SQLException - if anything goes wrong go ahead and let this percolate; Jdbi will handle it
      • buildArray

        private java.lang.Object buildArray​(java.sql.Array array,
                                            StatementContext ctx)
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • buildFromResultSet

        private java.lang.Object buildFromResultSet​(java.sql.Array array,
                                                    StatementContext ctx)
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException