Package org.hibernate.type.format
Interface JsonValueJDBCTypeAdapter
- All Known Implementing Classes:
OsonValueJDBCTypeAdapter,StringJsonValueJDBCTypeAdapter
public interface JsonValueJDBCTypeAdapter
Adapter for JSON value on given JDBC types.
-
Method Summary
Modifier and TypeMethodDescriptionfromNumericValue(JavaType<?> jdbcJavaType, JdbcType jdbcType, JsonDocumentReader source, WrapperOptions options) Gets an Object out of a JSON document reader according to a given types.fromValue(JavaType<?> jdbcJavaType, JdbcType jdbcType, JsonDocumentReader source, WrapperOptions options) Gets an Object out of a JSON document reader according to a given types.
-
Method Details
-
fromValue
Object fromValue(JavaType<?> jdbcJavaType, JdbcType jdbcType, JsonDocumentReader source, WrapperOptions options) throws SQLException Gets an Object out of a JSON document reader according to a given types.- Parameters:
jdbcJavaType- the desired JavaType for the return Object.jdbcType- the desired JdbcType for the return Object.source- the JSON document reader from which to get the value to be translated.options- the wrapping option- Returns:
- the translated value.
- Throws:
SQLException- if translation failed.
-
fromNumericValue
Object fromNumericValue(JavaType<?> jdbcJavaType, JdbcType jdbcType, JsonDocumentReader source, WrapperOptions options) throws SQLException Gets an Object out of a JSON document reader according to a given types. This method is called when the current available value in the reader is a numeric one.- Parameters:
jdbcJavaType- the desired JavaType for the return Object.jdbcType- the desired JdbcType for the return Object.source- the JSON document reader from which to get the value to be translated.options- the wrapping option- Returns:
- the translated value.
- Throws:
SQLException- if translation failed.
-