クラス DefaultResultSetConverter

    • コンストラクタの詳細

      • DefaultResultSetConverter

        public DefaultResultSetConverter()
    • メソッドの詳細

      • getValueBySetterParameterType

        public Object getValueBySetterParameterType​(ResultSet resultSet,
                                                    int column,
                                                    Class<?> setterParameterType)
                                             throws SQLException
        インタフェースからコピーされた説明: ResultSetConverter
        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.
        定義:
        getValueBySetterParameterType インタフェース内 ResultSetConverter
        パラメータ:
        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
      • getValueBySqlType

        protected Object getValueBySqlType​(ResultSet resultSet,
                                           int column,
                                           int sqlType)
                                    throws SQLException
        Reads a column from the current row in the provided ResultSet and returns an instance of the specified Java SQLType containing the values read. This method is mainly used for "SEARCH SQL AND READ TO MAP". i.e. Convert from SQL to Java by the SQL type. This method is used while converting ResultSet rows to Map.
        パラメータ:
        resultSet -
        column -
        sqlType -
        戻り値:
        例外:
        SQLException
      • isEnableToConvertNativeObject

        public boolean isEnableToConvertNativeObject​(Class<?> objectClass)
        Returns the given type is enable to convert native object. Following classes are regarded as native class: boolean.class, Boolean.class, byte.class, Byte.class, short.class, Short.class, int.class, Integer.class, long.class, Long.class, float.class, Float.class, double.class, Double.class, char.class, Character.class, byte[].class, Byte[].class, char[].class, Character[].class, String.class, BigDecimal.class, java.util.Date.class, java.sql.Date.class, java.sql.Time.class, java.sql.Timestamp.class, java.io.InputStream.class, java.io.Reader.class, java.sql.Clob.class, java.sql.Blob.class, Object.class
        定義:
        isEnableToConvertNativeObject インタフェース内 ResultSetConverter
        戻り値: