Package org.hibernate.type.format
Class StringJsonValueJDBCTypeAdapter
java.lang.Object
org.hibernate.type.format.StringJsonValueJDBCTypeAdapter
- All Implemented Interfaces:
JsonValueJDBCTypeAdapter
JDBC type adapter for String-based JSON document reader.
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
StringJsonValueJDBCTypeAdapter
public StringJsonValueJDBCTypeAdapter(boolean returnEmbeddable)
-
-
Method Details
-
fromValue
public Object fromValue(JavaType<?> jdbcJavaType, JdbcType jdbcType, JsonDocumentReader source, WrapperOptions options) throws SQLException Description copied from interface:JsonValueJDBCTypeAdapterGets an Object out of a JSON document reader according to a given types.- Specified by:
fromValuein interfaceJsonValueJDBCTypeAdapter- 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
public Object fromNumericValue(JavaType<?> jdbcJavaType, JdbcType jdbcType, JsonDocumentReader source, WrapperOptions options) throws SQLException Description copied from interface:JsonValueJDBCTypeAdapterGets 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.- Specified by:
fromNumericValuein interfaceJsonValueJDBCTypeAdapter- 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.
-