モジュール org.nkjmlab.sorm4j

クラス DefaultColumnValueToJavaObjectConverters

    • コンストラクタの詳細

      • DefaultColumnValueToJavaObjectConverters

        public DefaultColumnValueToJavaObjectConverters()
      • DefaultColumnValueToJavaObjectConverters

        public DefaultColumnValueToJavaObjectConverters​(Map<Class<?>,​ColumnValueToJavaObjectConverter<?>> converters)
        パラメータ:
        converters - the converter which corresponding to the key class is applied to the column value.
    • メソッドの詳細

      • convertTo

        public <T> T convertTo​(ResultSet resultSet,
                               int columnIndex,
                               int columnType,
                               Class<T> toType)
        インタフェースからコピーされた説明: ColumnValueToJavaObjectConverters
        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 converting the result of query. 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.
        定義:
        convertTo インタフェース内 ColumnValueToJavaObjectConverters
        パラメータ:
        resultSet - ResultSet (positioned in the row to be processed)
        columnIndex - column index in the result set (starting with 1)
        toType - Class of the object to be returned