クラス DefaultResultSetConverter
- java.lang.Object
-
- org.nkjmlab.sorm4j.mapping.extension.DefaultResultSetConverter
-
- すべての実装されたインタフェース:
ResultSetConverter
public final class DefaultResultSetConverter extends Object implements ResultSetConverter
Default implementation ofResultSetConverter
- 作成者:
- nkjm
-
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 static Map<Integer,String>
typeStringMap
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DefaultResultSetConverter()
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Object
getValueBySetterParameterType(ResultSet resultSet, int column, Class<?> setterParameterType)
Object
getValueBySqlType(ResultSet resultSet, int column, int sqlType)
Reads a column from the current row in the providedResultSet
and return a value correspondent to the SQL type provided (as defined injava.sql.Types
). null's are respected for all types.static String
sqlTypeToString(int type)
List<Object>
toObjectsByClasses(ResultSet resultSet, List<Class<?>> setterParameterTypes)
Map<String,Object>
toSingleMap(ResultSet resultSet, List<String> columns, List<Integer> columnTypes)
<T> T
toSingleNativeObject(ResultSet resultSet, Class<T> objectClass)
-
-
-
メソッドの詳細
-
toObjectsByClasses
public final List<Object> toObjectsByClasses(ResultSet resultSet, List<Class<?>> setterParameterTypes) throws SQLException
- 定義:
toObjectsByClasses
インタフェース内ResultSetConverter
- 例外:
SQLException
-
toSingleMap
public Map<String,Object> toSingleMap(ResultSet resultSet, List<String> columns, List<Integer> columnTypes) throws SQLException
- 定義:
toSingleMap
インタフェース内ResultSetConverter
- 例外:
SQLException
-
toSingleNativeObject
public final <T> T toSingleNativeObject(ResultSet resultSet, Class<T> objectClass) throws SQLException
- 定義:
toSingleNativeObject
インタフェース内ResultSetConverter
- 例外:
SQLException
-
getValueBySetterParameterType
public Object getValueBySetterParameterType(ResultSet resultSet, int column, Class<?> setterParameterType) throws SQLException
インタフェースからコピーされた説明:ResultSetConverter
Reads a column from the current row in the providedResultSet
and returns an instance of the specified JavaClass
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 convertingResultSet
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 theResultSet
.- 定義:
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
public Object getValueBySqlType(ResultSet resultSet, int column, int sqlType) throws SQLException
インタフェースからコピーされた説明:ResultSetConverter
Reads a column from the current row in the providedResultSet
and return a value correspondent to the SQL type provided (as defined injava.sql.Types
). null's are respected for all types. This means that if a column is of type LONG and its value comes from the database as null, this method will return null for it. This method is used for "SEARCH AND READ TO MAP". i.e. Convert from Sql to Java by the specified Sql.Types.- 定義:
getValueBySqlType
インタフェース内ResultSetConverter
- パラメータ:
resultSet
-ResultSet
(positioned in the row to be processed)column
- Column index in the result set (starting with 1)sqlType
- type of the column (as defined injava.sql.Types
)- 例外:
SQLException
-
sqlTypeToString
public static String sqlTypeToString(int type)
-
-