Class MapperOptions.Builder

  • Enclosing class:
    MapperOptions

    public static final class MapperOptions.Builder
    extends java.lang.Object
    A builder class for setting mapping options
    • Method Detail

      • actLikeSerializer

        @Deprecated
        public MapperOptions.Builder actLikeSerializer​(boolean actLikeSerializer)
        Deprecated.
        this method does nothing
        Parameters:
        actLikeSerializer - unused
        Returns:
        this
      • ignoreFinals

        public MapperOptions.Builder ignoreFinals​(boolean ignoreFinals)
        Parameters:
        ignoreFinals - if true final fields are ignored
        Returns:
        this
      • storeNulls

        public MapperOptions.Builder storeNulls​(boolean storeNulls)
        Parameters:
        storeNulls - if true null values are stored in the database
        Returns:
        this
      • storeEmpties

        public MapperOptions.Builder storeEmpties​(boolean storeEmpties)
        Parameters:
        storeEmpties - if true empty maps and collection types are stored in the database
        Returns:
        this
      • useLowerCaseCollectionNames

        public MapperOptions.Builder useLowerCaseCollectionNames​(boolean useLowerCaseCollectionNames)
        Parameters:
        useLowerCaseCollectionNames - if true, generated collections names are lower cased
        Returns:
        this
      • cacheClassLookups

        public MapperOptions.Builder cacheClassLookups​(boolean cacheClassLookups)
        Parameters:
        cacheClassLookups - if true class lookups are cached
        Returns:
        this
      • mapSubPackages

        public MapperOptions.Builder mapSubPackages​(boolean mapSubPackages)
        Parameters:
        mapSubPackages - if true subpackages are mapped when given a particular package
        Returns:
        this
      • disableEmbeddedIndexes

        public MapperOptions.Builder disableEmbeddedIndexes​(boolean disableEmbeddedIndexes)
        Parameters:
        disableEmbeddedIndexes - if true scanning @Embedded fields for indexing is disabled
        Returns:
        this
      • objectFactory

        public MapperOptions.Builder objectFactory​(ObjectFactory objectFactory)
        Parameters:
        objectFactory - the object factory to use when creating instances
        Returns:
        this
      • embeddedMapper

        public MapperOptions.Builder embeddedMapper​(CustomMapper embeddedMapper)
        Parameters:
        embeddedMapper - the mapper to use for embedded entities
        Returns:
        this
      • referenceMapper

        public MapperOptions.Builder referenceMapper​(CustomMapper referenceMapper)
        Parameters:
        referenceMapper - the mapper to use for references
        Returns:
        this
      • dateForm

        @Deprecated
        public MapperOptions.Builder dateForm​(DateStorage dateStorage)
        Deprecated.
        This will be removed in 2.0. It is intended to bridge the gap when correcting the storage of data/time values in the database. DateStorage.UTC should be used and will be the default in 2.0. In 1.5 it is DateStorage.SYSTEM_DEFAULT for backwards compatibility.
        Parameters:
        dateStorage - the storage format to use for dates
        Returns:
        this
      • build

        public MapperOptions build()
        Returns:
        the new options instance