Package dev.morphia

Class InsertOptions


  • @Deprecated(since="2.0",
                forRemoval=true)
    public class InsertOptions
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    Options related to insertion of documents into MongoDB. The setter methods return this so that a chaining style can be used.
    Since:
    1.3
    • Constructor Summary

      Constructors 
      Constructor Description
      InsertOptions()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      InsertOptions bypassDocumentValidation​(Boolean bypassDocumentValidation)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets whether to bypass document validation.
      Boolean getBypassDocumentValidation()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets whether to bypass document validation, or null if unspecified.
      com.mongodb.WriteConcern getWriteConcern()
      Deprecated, for removal: This API element is subject to removal in a future version.
      The write concern to use for the insertion.
      boolean isOrdered()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets whether the documents should be inserted in the order provided, stopping on the first failed insertion.
      InsertOptions ordered​(boolean ordered)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets whether the server should insert the documents in the order provided.
      InsertOptions writeConcern​(com.mongodb.WriteConcern writeConcern)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the write concern to use for the insert.
    • Constructor Detail

      • InsertOptions

        public InsertOptions()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • writeConcern

        public InsertOptions writeConcern​(com.mongodb.WriteConcern writeConcern)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Set the write concern to use for the insert.
        Parameters:
        writeConcern - the write concern
        Returns:
        this
      • getWriteConcern

        public com.mongodb.WriteConcern getWriteConcern()
        Deprecated, for removal: This API element is subject to removal in a future version.
        The write concern to use for the insertion. By default the write concern configured for the MongoCollection instance will be used.
        Returns:
        the write concern, or null if the default will be used.
      • getBypassDocumentValidation

        public Boolean getBypassDocumentValidation()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Gets whether to bypass document validation, or null if unspecified. The default is null.
        Returns:
        whether to bypass document validation, or null if unspecified.
        Since server release
        3.2
      • bypassDocumentValidation

        public InsertOptions bypassDocumentValidation​(Boolean bypassDocumentValidation)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Sets whether to bypass document validation.
        Parameters:
        bypassDocumentValidation - whether to bypass document validation, or null if unspecified
        Returns:
        this
        Since server release
        3.2
      • ordered

        public InsertOptions ordered​(boolean ordered)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Sets whether the server should insert the documents in the order provided.
        Parameters:
        ordered - true if documents should be inserted in order
        Returns:
        this
      • isOrdered

        public boolean isOrdered()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Gets whether the documents should be inserted in the order provided, stopping on the first failed insertion. The default is true. If false, the server will attempt to insert all the documents regardless of an failures.
        Returns:
        whether the the documents should be inserted in order