Class MongoJackModule

java.lang.Object
tools.jackson.databind.JacksonModule
org.mongojack.internal.MongoJackModule
All Implemented Interfaces:
tools.jackson.core.Versioned

public class MongoJackModule extends tools.jackson.databind.JacksonModule
The ObjectID serialising module
Since:
1.0
Author:
James Roper
  • Field Details

    • DEFAULT_CONFIGURATION

      public static final MongoJackModuleConfiguration DEFAULT_CONFIGURATION
    • DEFAULT_MODULE_INSTANCE

      public static final tools.jackson.databind.JacksonModule DEFAULT_MODULE_INSTANCE
  • Constructor Details

  • Method Details

    • configure

      public static tools.jackson.databind.ObjectMapper configure(tools.jackson.databind.ObjectMapper objectMapper)
      Configure the given object mapper to be used with MongoJack. Please call this method rather than calling objectMapper.with(MongoJacksonMapperModule.INSTANCE), because Jacksons module system doesn't allow MongoJack to do all the configuration it needs to do. This method will do that configuration though.
      Parameters:
      objectMapper - The object mapper to configure
      Returns:
      This object mapper (for chaining)
    • configure

      public static tools.jackson.databind.ObjectMapper configure(tools.jackson.databind.ObjectMapper objectMapper, MongoJackModuleConfiguration moduleConfiguration)
      Configure the given object mapper to be used with MongoJack. Please call this method rather than calling objectMapper.with(MongoJacksonMapperModule.INSTANCE), because Jacksons module system doesn't allow MongoJack to do all the configuration it needs to do. This method will do that configuration though.
      Parameters:
      objectMapper - The object mapper to configure
      moduleConfiguration - The configuration of the module
      Returns:
      This object mapper (for chaining)
    • getModuleName

      public String getModuleName()
      Specified by:
      getModuleName in class tools.jackson.databind.JacksonModule
    • version

      public tools.jackson.core.Version version()
      Specified by:
      version in interface tools.jackson.core.Versioned
      Specified by:
      version in class tools.jackson.databind.JacksonModule
    • setupModule

      public void setupModule(tools.jackson.databind.JacksonModule.SetupContext context)
      Specified by:
      setupModule in class tools.jackson.databind.JacksonModule