Package org.mongojack

Class JacksonCodecRegistry

  • All Implemented Interfaces:
    org.bson.codecs.configuration.CodecProvider, org.bson.codecs.configuration.CodecRegistry

    public class JacksonCodecRegistry
    extends Object
    implements org.bson.codecs.configuration.CodecRegistry, org.bson.codecs.configuration.CodecProvider
    This is an experimental JacksonCodecRegistry for use with the Mongo 3.0+ java driver. It has only undergone basic testing. This is use at your own risk.
    Author:
    christopher.ogrady
    • Constructor Summary

      Constructors 
      Constructor Description
      JacksonCodecRegistry​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.bson.codecs.configuration.CodecRegistry defaultCodecRegistry, Class<?> view, org.bson.UuidRepresentation uuidRepresentation)  
      JacksonCodecRegistry​(com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.bson.codecs.configuration.CodecRegistry defaultCodecRegistry, org.bson.UuidRepresentation uuidRepresentation)  
    • Constructor Detail

      • JacksonCodecRegistry

        public JacksonCodecRegistry​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                    org.bson.codecs.configuration.CodecRegistry defaultCodecRegistry,
                                    org.bson.UuidRepresentation uuidRepresentation)
      • JacksonCodecRegistry

        public JacksonCodecRegistry​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                    org.bson.codecs.configuration.CodecRegistry defaultCodecRegistry,
                                    Class<?> view,
                                    org.bson.UuidRepresentation uuidRepresentation)
    • Method Detail

      • get

        public <T> org.bson.codecs.Codec<T> get​(Class<T> clazz)
        Specified by:
        get in interface org.bson.codecs.configuration.CodecRegistry
      • get

        public <T> org.bson.codecs.Codec<T> get​(Class<T> clazz,
                                                org.bson.codecs.configuration.CodecRegistry registry)
        Specified by:
        get in interface org.bson.codecs.configuration.CodecProvider
      • isDefault

        protected <T> boolean isDefault​(Class<T> clazz)
      • addCodecForClass

        public <T> org.bson.codecs.Codec<T> addCodecForClass​(Class<T> clazz)
      • getUuidRepresentation

        public org.bson.UuidRepresentation getUuidRepresentation()