Class LocalDateSerde
java.lang.Object
io.micronaut.serde.support.serdes.DefaultFormattedTemporalSerde<LocalDate>
io.micronaut.serde.support.serdes.LocalDateSerde
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,Deserializer<LocalDate>
,Serde<LocalDate>
,Serializer<LocalDate>
,DeserializerRegistrar<LocalDate>
,SerdeRegistrar<LocalDate>
,TemporalSerde<LocalDate>
,SerializerRegistrar<LocalDate>
public final class LocalDateSerde
extends DefaultFormattedTemporalSerde<LocalDate>
implements TemporalSerde<LocalDate>, SerdeRegistrar<LocalDate>
Local date serde. Slightly different to
NumericSupportTemporalSerde
, we only support one
unit (epoch day)-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.serde.Deserializer
Deserializer.DecoderContext
Nested classes/interfaces inherited from interface io.micronaut.serde.Serializer
Serializer.EncoderContext
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Fields inherited from interface io.micronaut.serde.support.serdes.TemporalSerde
UTC
-
Constructor Summary
ConstructorDescriptionLocalDateSerde
(SerdeConfiguration configuration) Allows configuring a default time format for temporal date/time types. -
Method Summary
Modifier and TypeMethodDescriptionprotected DefaultFormattedTemporalSerde<LocalDate>
createSpecific
(SerdeConfiguration configuration) Create the same serde with new configuration.io.micronaut.core.type.Argument<LocalDate>
getType()
query()
Methods inherited from class io.micronaut.serde.support.serdes.DefaultFormattedTemporalSerde
createSpecific, createSpecific, deserialize, serialize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.serde.Deserializer
allowNull, deserialize, deserializeNullable, getDefaultValue
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
Methods inherited from interface io.micronaut.serde.support.SerdeRegistrar
getTypes
Methods inherited from interface io.micronaut.serde.Serializer
isAbsent, isEmpty, serialize
Methods inherited from interface io.micronaut.serde.support.serdes.TemporalSerde
createSpecific, createSpecific
-
Constructor Details
-
LocalDateSerde
Allows configuring a default time format for temporal date/time types.- Parameters:
configuration
- The configuration
-
-
Method Details
-
query
- Specified by:
query
in interfaceTemporalSerde<LocalDate>
- Returns:
- The temporal query for the type.
-
createSpecific
Description copied from class:DefaultFormattedTemporalSerde
Create the same serde with new configuration.- Overrides:
createSpecific
in classDefaultFormattedTemporalSerde<LocalDate>
- Parameters:
configuration
- The new configuration- Returns:
- The updated serde
-
getType
- Specified by:
getType
in interfaceDeserializerRegistrar<LocalDate>
- Specified by:
getType
in interfaceSerdeRegistrar<LocalDate>
- Specified by:
getType
in interfaceSerializerRegistrar<LocalDate>
- Returns:
- The serde argument type
-