Class AbstractKeyedHandler<K,​V>

    • Method Detail

      • createKey

        protected abstract K createKey​(ResultSet resultSet)
                                throws SQLException
        This factory method is called by handle() to retrieve the key value from the current ResultSet row.
        Parameters:
        resultSet - ResultSet to create a key from
        Returns:
        K from the configured key column name/index
        Throws:
        SQLException - if a database access error occurs
      • createMap

        protected Map<K,​VcreateMap()
        This factory method is called by handle() to create the Map to store records in. This implementation returns a HashMap instance.
        Returns:
        Map to store records in
      • createRow

        protected abstract V createRow​(ResultSet resultSet)
                                throws SQLException
        This factory method is called by handle() to store the current ResultSet row in some object.
        Parameters:
        resultSet - ResultSet to create a row from
        Returns:
        V object created from the current row
        Throws:
        SQLException - if a database access error occurs