Package dev.morphia.mapping.codec
Class MorphiaDateCodec
- java.lang.Object
-
- dev.morphia.mapping.codec.MorphiaDateCodec
-
- All Implemented Interfaces:
org.bson.codecs.Codec<LocalDate>
,org.bson.codecs.Decoder<LocalDate>
,org.bson.codecs.Encoder<LocalDate>
public class MorphiaDateCodec extends Object implements org.bson.codecs.Codec<LocalDate>
Converts theLocalDate
values to and from the zone defined inMapperOptions.getDateStorage()
- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalDate
decode(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext)
void
encode(org.bson.BsonWriter writer, LocalDate value, org.bson.codecs.EncoderContext encoderContext)
Class<LocalDate>
getEncoderClass()
-
-
-
Method Detail
-
decode
public LocalDate decode(org.bson.BsonReader reader, org.bson.codecs.DecoderContext decoderContext)
- Specified by:
decode
in interfaceorg.bson.codecs.Decoder<LocalDate>
-
encode
public void encode(org.bson.BsonWriter writer, LocalDate value, org.bson.codecs.EncoderContext encoderContext)
- Specified by:
encode
in interfaceorg.bson.codecs.Encoder<LocalDate>
-
-