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
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.JacksonModule
tools.jackson.databind.JacksonModule.SetupContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MongoJackModuleConfigurationstatic final tools.jackson.databind.JacksonModule -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic tools.jackson.databind.ObjectMapperconfigure(tools.jackson.databind.ObjectMapper objectMapper) Configure the given object mapper to be used with MongoJack.static tools.jackson.databind.ObjectMapperconfigure(tools.jackson.databind.ObjectMapper objectMapper, MongoJackModuleConfiguration moduleConfiguration) Configure the given object mapper to be used with MongoJack.voidsetupModule(tools.jackson.databind.JacksonModule.SetupContext context) tools.jackson.core.Versionversion()Methods inherited from class tools.jackson.databind.JacksonModule
getDependencies, getRegistrationId
-
Field Details
-
DEFAULT_CONFIGURATION
-
DEFAULT_MODULE_INSTANCE
public static final tools.jackson.databind.JacksonModule DEFAULT_MODULE_INSTANCE
-
-
Constructor Details
-
MongoJackModule
public MongoJackModule() -
MongoJackModule
-
-
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 configuremoduleConfiguration- The configuration of the module- Returns:
- This object mapper (for chaining)
-
getModuleName
- Specified by:
getModuleNamein classtools.jackson.databind.JacksonModule
-
version
public tools.jackson.core.Version version()- Specified by:
versionin interfacetools.jackson.core.Versioned- Specified by:
versionin classtools.jackson.databind.JacksonModule
-
setupModule
public void setupModule(tools.jackson.databind.JacksonModule.SetupContext context) - Specified by:
setupModulein classtools.jackson.databind.JacksonModule
-