Class AbstractOracleJsonSerde<T>
java.lang.Object
io.micronaut.serde.oracle.jdbc.json.serde.AbstractOracleJsonSerde<T>
- Type Parameters:
T- the type being deserialized
- All Implemented Interfaces:
Deserializer<T>, Serde<T>, Serializer<T>
- Direct Known Subclasses:
OracleJsonBinarySerde, OracleJsonLocaleDateSerde, OracleJsonLocaleDateTimeSerde, OracleJsonLocaleTimeSerde, OracleJsonOffsetDateTimeSerde, OracleJsonZonedDateTimeSerde
-
Nested Class Summary
Nested classes/interfaces inherited from interface Deserializer
Deserializer.DecoderContextNested classes/interfaces inherited from interface Serializer
Serializer.EncoderContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Tdeserialize(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) final @Nullable TdeserializeNullable(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) protected abstract TdoDeserializeNonNull(OracleJdbcJsonParserDecoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) Deserializes object usingOracleJdbcJsonParserDecoder.protected abstract voiddoSerializeNonNull(OracleJdbcJsonGeneratorEncoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) Serializes non null value.voidserialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) Serializes the given value using the passedEncoder.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Deserializer
createSpecific, getDefaultValueMethods inherited from interface Serializer
createSpecific, isAbsent, isDefault, isEmpty
-
Constructor Details
-
AbstractOracleJsonSerde
public AbstractOracleJsonSerde()
-
-
Method Details
-
deserialize
public final T deserialize(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) throws IOException Description copied from interface:Deserializer- Specified by:
deserializein interfaceDeserializer<T>- Parameters:
decoder- The decoder, nevernulldecoderContext- The decoder context, nevernulltype- The generic type to be deserialized- Returns:
- The deserialized object, never
null. UseDeserializer.deserializeNullable(Decoder, DecoderContext, Argument)when the decoder value can benull. - Throws:
IOException- If an error occurs during deserialization of the object
-
deserializeNullable
public final @Nullable T deserializeNullable(Decoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) throws IOException Description copied from interface:DeserializerDeserializes from the current state of theDecoderan object of typeT. If the decoder value isnull, this must be permitted. By default, in this case, this method will returnnull.- Specified by:
deserializeNullablein interfaceDeserializer<T>- Parameters:
decoder- The decoder, nevernulldecoderContext- The decoder context, nevernulltype- The generic type to be deserialized- Returns:
- The deserialized object or
null - Throws:
IOException- If an error occurs during deserialization of the object
-
serialize
public void serialize(Encoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) throws IOException Description copied from interface:SerializerSerializes the given value using the passedEncoder.- Specified by:
serializein interfaceSerializer<T>- Parameters:
encoder- The encoder to usecontext- The encoder context, nevernulltype- Models the generic type of the valuevalue- The value to serialize, nevernull. Callers should encode null values directly.- Throws:
IOException- If an error occurs during serialization
-
doDeserializeNonNull
protected abstract T doDeserializeNonNull(OracleJdbcJsonParserDecoder decoder, Deserializer.DecoderContext decoderContext, io.micronaut.core.type.Argument<? super T> type) throws IOException Deserializes object usingOracleJdbcJsonParserDecoder.- Parameters:
decoder- the Oracle JSON decoderdecoderContext- the decoder contexttype- the type being deserialized- Returns:
- the deserialized instance of given type
- Throws:
IOException- if an unrecoverable error occurs
-
doSerializeNonNull
protected abstract void doSerializeNonNull(OracleJdbcJsonGeneratorEncoder encoder, Serializer.EncoderContext context, io.micronaut.core.type.Argument<? extends T> type, T value) throws IOException Serializes non null value.- Parameters:
encoder- the encodercontext- the encoder contexttype- the type of object being serializedvalue- the value being serialized- Throws:
IOException- if an unrecoverable error occurs
-
getDefault
-