Enum Class MongoJackModuleFeature

java.lang.Object
java.lang.Enum<MongoJackModuleFeature>
org.mongojack.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
  • Enum Constant Details

    • REGISTER_JAVA_TIME

      public static final MongoJackModuleFeature REGISTER_JAVA_TIME
      Register the java time module on configuration
    • DISABLE_DATES_AS_TIMESTAMPS

      public static final MongoJackModuleFeature DISABLE_DATES_AS_TIMESTAMPS
      Disable writing dates as timestamps builder.configure(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS, false);, because we get fewer runtime problems that way.
    • SET_SERIALIZATION_INCLUSION_NON_NULL

      public static final MongoJackModuleFeature SET_SERIALIZATION_INCLUSION_NON_NULL
      Sets the mapper's serialization inclusion to non-null
    • WRITE_INSTANT_AS_BSON_DATE

      public static final MongoJackModuleFeature WRITE_INSTANT_AS_BSON_DATE
      Serialises Instants as BSON dates when nanosecond precision is disabled.
      See Also:
      • DateTimeFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
    • ENABLE_BSON_VALUE_SERIALIZATION

      public static final MongoJackModuleFeature ENABLE_BSON_VALUE_SERIALIZATION

      Adds a set of serializers so that you can properly serialize BsonValue values and Bson values 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

      public static MongoJackModuleFeature[] 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

      public static MongoJackModuleFeature valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • enabledByDefault

      public boolean enabledByDefault()
      Specified by:
      enabledByDefault in interface tools.jackson.databind.cfg.ConfigFeature
    • getMask

      public int getMask()
      Specified by:
      getMask in interface tools.jackson.databind.cfg.ConfigFeature
    • enabledIn

      public boolean enabledIn(int flags)
      Specified by:
      enabledIn in interface tools.jackson.databind.cfg.ConfigFeature