Package org.hibernate.type.format
Class OsonDocumentWriter
java.lang.Object
org.hibernate.type.format.OsonDocumentWriter
- All Implemented Interfaces:
JsonDocumentWriter
Implementation of
JsonDocumentWriter for OSON document.
This implementation will produce an Object Array based on
embeddable mapping
Once All JSON document is handle the mapped Object array can be retrieved using the
getObjectArray() method.-
Constructor Summary
ConstructorsConstructorDescriptionOsonDocumentWriter(oracle.sql.json.OracleJsonGenerator generator) Creates a new OSON document writer -
Method Summary
Modifier and TypeMethodDescriptionbooleanValue(boolean value) Adds a new JSON element boolean value.endArray()Ends a new JSON array.Ends a new JSON ObjectsAdds a new JSON element null value.numericValue(Number number) Adds a new JSON element numeric value.Adds a new JSON element name.serializeJsonValue(Object value, JavaType<T> javaType, JdbcType jdbcType, WrapperOptions options) Adds a JSON value to the documentStarts a new JSON array.Starts a new JSON Objects.stringValue(String value) Adds a new JSON element string value.
-
Constructor Details
-
OsonDocumentWriter
public OsonDocumentWriter(oracle.sql.json.OracleJsonGenerator generator) Creates a new OSON document writer- Parameters:
generator- the JSON generator.
-
-
Method Details
-
startObject
Description copied from interface:JsonDocumentWriterStarts a new JSON Objects.- Specified by:
startObjectin interfaceJsonDocumentWriter- Returns:
- this instance
-
endObject
Description copied from interface:JsonDocumentWriterEnds a new JSON Objects- Specified by:
endObjectin interfaceJsonDocumentWriter- Returns:
- this instance
-
startArray
Description copied from interface:JsonDocumentWriterStarts a new JSON array.- Specified by:
startArrayin interfaceJsonDocumentWriter- Returns:
- this instance
-
endArray
Description copied from interface:JsonDocumentWriterEnds a new JSON array.- Specified by:
endArrayin interfaceJsonDocumentWriter- Returns:
- this instance
-
objectKey
Description copied from interface:JsonDocumentWriterAdds a new JSON element name.- Specified by:
objectKeyin interfaceJsonDocumentWriter- Parameters:
key- the element name.- Returns:
- this instance
-
nullValue
Description copied from interface:JsonDocumentWriterAdds a new JSON element null value.- Specified by:
nullValuein interfaceJsonDocumentWriter- Returns:
- this instance
-
booleanValue
Description copied from interface:JsonDocumentWriterAdds a new JSON element boolean value.- Specified by:
booleanValuein interfaceJsonDocumentWriter- Parameters:
value- the element boolean name.- Returns:
- this instance
-
numericValue
Description copied from interface:JsonDocumentWriterAdds a new JSON element numeric value.- Specified by:
numericValuein interfaceJsonDocumentWriter- Parameters:
number- the element numeric name.- Returns:
- this instance
-
stringValue
Description copied from interface:JsonDocumentWriterAdds a new JSON element string value.- Specified by:
stringValuein interfaceJsonDocumentWriter- Parameters:
value- the element string name.- Returns:
- this instance
-
serializeJsonValue
public <T> JsonDocumentWriter serializeJsonValue(Object value, JavaType<T> javaType, JdbcType jdbcType, WrapperOptions options) Description copied from interface:JsonDocumentWriterAdds a JSON value to the document- Specified by:
serializeJsonValuein interfaceJsonDocumentWriter- Parameters:
value- the value to be serializedjavaType- the Java type of the valuejdbcType- the JDBC type for the value to be serializedoptions- the wrapping options- Returns:
- this instance
-