Package org.mongojack

Enum MongoJackModuleFeature

    • Enum Constant Detail

      • 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 objectMapper.configure(SerializationFeature.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:
        SerializationFeature.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 Detail

      • values

        public static MongoJackModuleFeature[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MongoJackModuleFeature c : MongoJackModuleFeature.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MongoJackModuleFeature valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • enabledByDefault

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

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

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