Class IntegerColumnHandler

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object apply​(java.sql.ResultSet rs, int columnIndex)
      Do the work required to retrieve and store a column from ResultSet into something of type propType.
      boolean match​(java.lang.Class<?> propType)
      Test whether this ColumnHandler wants to handle a column targeted for a value type matching propType.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntegerColumnHandler

        public IntegerColumnHandler()
    • Method Detail

      • match

        public boolean match​(java.lang.Class<?> propType)
        Description copied from interface: ColumnHandler
        Test whether this ColumnHandler wants to handle a column targeted for a value type matching propType.
        Specified by:
        match in interface ColumnHandler
        Parameters:
        propType - The type of the target parameter.
        Returns:
        true is this property handler can/wants to handle this value; false otherwise.
      • apply

        public java.lang.Object apply​(java.sql.ResultSet rs,
                                      int columnIndex)
                               throws java.sql.SQLException
        Description copied from interface: ColumnHandler
        Do the work required to retrieve and store a column from ResultSet into something of type propType. This method is called only if this handler responded true after a call to ColumnHandler.match(Class).
        Specified by:
        apply in interface ColumnHandler
        Parameters:
        rs - The result set to get data from. This should be moved to the correct row already.
        columnIndex - The position of the column to retrieve.
        Returns:
        The converted value or the original value if something doesn't work out.
        Throws:
        java.sql.SQLException - if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set