Class MapperOptions


  • public class MapperOptions
    extends Object
    Options to control mapping behavior.
    • Method Detail

      • builder

        public static MapperOptions.Builder builder​(MapperOptions original)
        Parameters:
        original - an existing set of options to use as a starting point
        Returns:
        a builder to set mapping options
      • getClassLoader

        public ClassLoader getClassLoader()
        Returns the classloader used, in theory, when loading the entity types.
        Returns:
        the classloader
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • isAutoImportModels

        public boolean isAutoImportModels()
        Returns:
        true if EntityModelImporter instances should be loaded
        Since:
        2.3
      • getCollectionNaming

        public NamingStrategy getCollectionNaming()
        Returns:
        the naming strategy for collections unless explicitly set via @Entity
        See Also:
        Entity
      • getDateStorage

        public DateStorage getDateStorage()
        Returns:
        the date storage configuration value
      • getDiscriminator

        public DiscriminatorFunction getDiscriminator()
        Returns:
        the function to determine discriminator value
      • getDiscriminatorKey

        public String getDiscriminatorKey()
        Returns:
        the discriminator property name
      • getPropertyNaming

        public NamingStrategy getPropertyNaming()
        Returns:
        the naming strategy for properties unless explicitly set via @Property
        Since:
        2.2
        See Also:
        Property
      • getQueryFactory

        public QueryFactory getQueryFactory()
        Returns:
        the query factory used by the Datastore
        Since:
        2.0
      • getUuidRepresentation

        public org.bson.UuidRepresentation getUuidRepresentation()
        Returns:
        the UUID representation to use in the driver
      • isCacheClassLookups

        public boolean isCacheClassLookups()
        Returns:
        true if Morphia should cache name to Class lookups
      • isEnablePolymorphicQueries

        public boolean isEnablePolymorphicQueries()
        Returns:
        true if polymorphic queries are enabled
      • isIgnoreFinals

        public boolean isIgnoreFinals()
        Returns:
        true if Morphia should ignore final fields
      • isMapSubPackages

        public boolean isMapSubPackages()
        Returns:
        true if Morphia should map classes from the sub-packages as well
      • isStoreEmpties

        public boolean isStoreEmpties()
        Returns:
        true if Morphia should store empty values for lists/maps/sets/arrays
      • isStoreNulls

        public boolean isStoreNulls()
        Returns:
        true if Morphia should store null values