Package org.graylog2.database.jackson
Class CustomJacksonCodec<T>
java.lang.Object
org.mongojack.internal.stream.JacksonCodec<T>
org.graylog2.database.jackson.CustomJacksonCodec<T>
- All Implemented Interfaces:
org.bson.codecs.Codec<T>,org.bson.codecs.CollectibleCodec<T>,org.bson.codecs.Decoder<T>,org.bson.codecs.Encoder<T>,org.bson.codecs.OverridableUuidRepresentationCodec<T>
public class CustomJacksonCodec<T>
extends org.mongojack.internal.stream.JacksonCodec<T>
A custom implementation of Mongojack's
JacksonCodec that doesn't attempt to modify potentially immutable
domain objects, because that sometimes just isn't possible, e.g. for Records.-
Constructor Summary
ConstructorsConstructorDescriptionCustomJacksonCodec(org.mongojack.internal.stream.JacksonEncoder<T> encoder, org.mongojack.internal.stream.JacksonDecoder<T> decoder, com.fasterxml.jackson.databind.ObjectMapper objectMapper, CustomJacksonCodecRegistry jacksonCodecRegistry) -
Method Summary
Modifier and TypeMethodDescriptionorg.bson.codecs.Codec<T>withUuidRepresentation(org.bson.UuidRepresentation uuidRepresentation) Methods inherited from class org.mongojack.internal.stream.JacksonCodec
constructIdValue, decode, documentHasId, encode, getDocumentId, getEncoderClass, getIdElementDeserializationDescription, getIdElementSerializationDescription
-
Constructor Details
-
CustomJacksonCodec
public CustomJacksonCodec(org.mongojack.internal.stream.JacksonEncoder<T> encoder, org.mongojack.internal.stream.JacksonDecoder<T> decoder, com.fasterxml.jackson.databind.ObjectMapper objectMapper, CustomJacksonCodecRegistry jacksonCodecRegistry)
-
-
Method Details
-
generateIdIfAbsentFromDocument
-
withUuidRepresentation
public org.bson.codecs.Codec<T> withUuidRepresentation(org.bson.UuidRepresentation uuidRepresentation)
-