Enum Class MongoJackModuleFeature
- All Implemented Interfaces:
Serializable, Comparable<MongoJackModuleFeature>, Constable, tools.jackson.databind.cfg.ConfigFeature
public enum MongoJackModuleFeature
extends Enum<MongoJackModuleFeature>
implements tools.jackson.databind.cfg.ConfigFeature
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDisable writing dates as timestampsbuilder.configure(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS, false);, because we get fewer runtime problems that way.Adds a set of serializers so that you can properly serializeBsonValuevalues andBsonvalues in your input documents.Register the java time module on configurationSets the mapper's serialization inclusion to non-nullSerialisesInstants as BSON dates when nanosecond precision is disabled. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanenabledIn(int flags) intgetMask()static MongoJackModuleFeatureReturns the enum constant of this class with the specified name.static MongoJackModuleFeature[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REGISTER_JAVA_TIME
Register the java time module on configuration -
DISABLE_DATES_AS_TIMESTAMPS
Disable writing dates as timestampsbuilder.configure(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS, false);, because we get fewer runtime problems that way. -
SET_SERIALIZATION_INCLUSION_NON_NULL
Sets the mapper's serialization inclusion to non-null -
WRITE_INSTANT_AS_BSON_DATE
SerialisesInstants as BSON dates when nanosecond precision is disabled.- See Also:
-
ENABLE_BSON_VALUE_SERIALIZATION
Adds a set of serializers so that you can properly serialize
BsonValuevalues andBsonvalues in your input documents. Disabled because it has the potential to change expected behavior for users of the library.This feature is primarily meant so you can build aggregation pipelines or filters with embedded bson stuff and have them correctly serialize. It's theoretically possible that you could save this stuff in a POJO, but it won't be read back out correctly because type information is lost. That said, deserialization will be attempted, but only to the point of producing a simple
.Document
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
enabledByDefault
public boolean enabledByDefault()- Specified by:
enabledByDefaultin interfacetools.jackson.databind.cfg.ConfigFeature
-
getMask
public int getMask()- Specified by:
getMaskin interfacetools.jackson.databind.cfg.ConfigFeature
-
enabledIn
public boolean enabledIn(int flags) - Specified by:
enabledInin interfacetools.jackson.databind.cfg.ConfigFeature
-