インタフェース ResultSetConverter

  • 既知の実装クラスのリスト:
    DefaultResultSetConverter

    public interface ResultSetConverter
    Convert ResultSet from database to specified objects.
    作成者:
    nkjm
    • メソッドの詳細

      • getValueBySetterParameterType

        Object getValueBySetterParameterType​(ResultSet resultSet,
                                             int column,
                                             Class<?> setterParameterType)
                                      throws SQLException
        Reads a column from the current row in the provided ResultSet and returns an instance of the specified Java Class containing the values read. This method is mainly used for "SEARCH SQL AND READ TO POJO". i.e. Convert from Sql to Java by the specified class. This method is used while converting ResultSet rows to objects. The class type is the field type in the target bean. null's will be respected for any non-native types. This means that if a field is of type Integer it will be able to receive a null value from the ResultSet; on the other hand, if a field is of type int it will receive 0 for a null value from the ResultSet.
        パラメータ:
        resultSet - ResultSet (positioned in the row to be processed)
        column - column index in the result set (starting with 1)
        setterParameterType - Class of the object to be returned
        例外:
        SQLException
      • isEnableToConvertNativeObject

        boolean isEnableToConvertNativeObject​(Class<?> type)
        Returns the given type could be converted to the native object or not.
        パラメータ:
        type -
        戻り値:
      • toSingleNativeObject

        <T> T toSingleNativeObject​(ResultSet resultSet,
                                   Class<T> objectClass)
                            throws SQLException
        Converts to a single native object of the given object class.
        型パラメータ:
        T -
        パラメータ:
        resultSet -
        objectClass -
        戻り値:
        例外:
        SQLException