Class JsonMapTypeHandler
MyBatis
TypeHandler for mapping between a Map with string
keys and a JSON object.
Note that the handler gets/sets string values, so if the database type is something else then casts in SQL might be necessary.
- Since:
- 2.3
-
Field Summary
Fields inherited from class org.apache.ibatis.type.BaseTypeHandler
configuration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetNullableResult(CallableStatement cs, int columnIndex) getNullableResult(ResultSet rs, int columnIndex) getNullableResult(ResultSet rs, String columnName) voidsetNonNullParameter(PreparedStatement ps, int i, Map<String, Object> parameter, org.apache.ibatis.type.JdbcType jdbcType) Methods inherited from class org.apache.ibatis.type.BaseTypeHandler
getResult, getResult, getResult, setConfiguration, setParameterMethods inherited from class org.apache.ibatis.type.TypeReference
getRawType, toString
-
Constructor Details
-
JsonMapTypeHandler
public JsonMapTypeHandler()
-
-
Method Details
-
setNonNullParameter
public void setNonNullParameter(PreparedStatement ps, int i, Map<String, Object> parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException- Specified by:
setNonNullParameterin classorg.apache.ibatis.type.BaseTypeHandler<Map<String,Object>> - Throws:
SQLException
-
getNullableResult
- Specified by:
getNullableResultin classorg.apache.ibatis.type.BaseTypeHandler<Map<String,Object>> - Throws:
SQLException
-
getNullableResult
- Specified by:
getNullableResultin classorg.apache.ibatis.type.BaseTypeHandler<Map<String,Object>> - Throws:
SQLException
-
getNullableResult
public Map<String,Object> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException - Specified by:
getNullableResultin classorg.apache.ibatis.type.BaseTypeHandler<Map<String,Object>> - Throws:
SQLException
-