Package org.graylog2.bindings.providers
Class MongoJackObjectMapperProvider.PreserveLeadingUnderscoreStrategy
java.lang.Object
com.fasterxml.jackson.databind.PropertyNamingStrategy
com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase
com.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy
org.graylog2.bindings.providers.MongoJackObjectMapperProvider.PreserveLeadingUnderscoreStrategy
- All Implemented Interfaces:
Serializable
- Enclosing class:
- MongoJackObjectMapperProvider
public static class MongoJackObjectMapperProvider.PreserveLeadingUnderscoreStrategy
extends com.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy
This abomination is necessary because when using MongoJack to read "_id" object ids back from the database
the property name isn't correctly mapped to the POJO using the LowerCaseWithUnderscoresStrategy.
Apparently no one in the world tried to use a different naming strategy with MongoJack. (one of my many useless talents is finding corner cases).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.PropertyNamingStrategy
com.fasterxml.jackson.databind.PropertyNamingStrategy.KebabCaseStrategy, com.fasterxml.jackson.databind.PropertyNamingStrategy.LowerCaseStrategy, com.fasterxml.jackson.databind.PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy, com.fasterxml.jackson.databind.PropertyNamingStrategy.LowerDotCaseStrategy, com.fasterxml.jackson.databind.PropertyNamingStrategy.PascalCaseStrategy, com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase, com.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy, com.fasterxml.jackson.databind.PropertyNamingStrategy.UpperCamelCaseStrategy
-
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.PropertyNamingStrategy
CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES, KEBAB_CASE, LOWER_CAMEL_CASE, LOWER_CASE, LOWER_DOT_CASE, PASCAL_CASE_TO_CAMEL_CASE, SNAKE_CASE, UPPER_CAMEL_CASE
-
Constructor Summary
-
Method Summary
Methods inherited from class com.fasterxml.jackson.databind.PropertyNamingStrategy.PropertyNamingStrategyBase
nameForConstructorParameter, nameForField, nameForGetterMethod, nameForSetterMethod, translateLowerCaseWithSeparator
-
Constructor Details
-
PreserveLeadingUnderscoreStrategy
public PreserveLeadingUnderscoreStrategy()
-
-
Method Details
-
translate
- Overrides:
translate
in classcom.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy
-