Package com.mongodb.client.model
Class DBCollectionUpdateOptions
- java.lang.Object
-
- com.mongodb.client.model.DBCollectionUpdateOptions
-
@Deprecated(since="2021-05-27") public class DBCollectionUpdateOptions extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.The options to apply when updating documents in the DBCollection- Since:
- 3.4
-
-
Constructor Summary
Constructors Constructor Description DBCollectionUpdateOptions()
Deprecated.Construct a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DBCollectionUpdateOptions
arrayFilters(java.util.List<? extends DBObject> arrayFilters)
Deprecated.Sets the array filters optionDBCollectionUpdateOptions
bypassDocumentValidation(java.lang.Boolean bypassDocumentValidation)
Deprecated.Sets the bypass document level validation flag.DBCollectionUpdateOptions
collation(Collation collation)
Deprecated.Sets the collationDBCollectionUpdateOptions
encoder(DBEncoder encoder)
Deprecated.Sets the encoderjava.util.List<? extends DBObject>
getArrayFilters()
Deprecated.Returns the array filters optionjava.lang.Boolean
getBypassDocumentValidation()
Deprecated.Gets the the bypass document level validation flagCollation
getCollation()
Deprecated.Returns the collation optionsDBEncoder
getEncoder()
Deprecated.Returns the encoderWriteConcern
getWriteConcern()
Deprecated.The write concern to use for the insertion.boolean
isMulti()
Deprecated.Gets whether all documents matching the query filter will be removed.boolean
isUpsert()
Deprecated.Returns true if a new document should be inserted if there are no matches to the query filter.DBCollectionUpdateOptions
multi(boolean multi)
Deprecated.Sets whether all documents matching the query filter will be removed.DBCollectionUpdateOptions
upsert(boolean isUpsert)
Deprecated.Set to true if a new document should be inserted if there are no matches to the query filter.DBCollectionUpdateOptions
writeConcern(WriteConcern writeConcern)
Deprecated.Sets the write concern
-
-
-
Method Detail
-
isUpsert
public boolean isUpsert()
Deprecated.Returns true if a new document should be inserted if there are no matches to the query filter. The default is false.- Returns:
- true if a new document should be inserted if there are no matches to the query filter
-
upsert
public DBCollectionUpdateOptions upsert(boolean isUpsert)
Deprecated.Set to true if a new document should be inserted if there are no matches to the query filter.- Parameters:
isUpsert
- true if a new document should be inserted if there are no matches to the query filter- Returns:
- this
-
getBypassDocumentValidation
@Nullable public java.lang.Boolean getBypassDocumentValidation()
Deprecated.Gets the the bypass document level validation flag- Returns:
- the bypass document level validation flag
-
bypassDocumentValidation
public DBCollectionUpdateOptions bypassDocumentValidation(@Nullable java.lang.Boolean bypassDocumentValidation)
Deprecated.Sets the bypass document level validation flag.- Parameters:
bypassDocumentValidation
- If true, allows the write to opt-out of document level validation.- Returns:
- this
-
multi
public DBCollectionUpdateOptions multi(boolean multi)
Deprecated.Sets whether all documents matching the query filter will be removed.- Parameters:
multi
- true if all documents matching the query filter will be removed- Returns:
- this
-
isMulti
public boolean isMulti()
Deprecated.Gets whether all documents matching the query filter will be removed. The default is true.- Returns:
- whether all documents matching the query filter will be removed
-
getCollation
@Nullable public Collation getCollation()
Deprecated.Returns the collation options- Returns:
- the collation options
-
collation
public DBCollectionUpdateOptions collation(@Nullable Collation collation)
Deprecated.Sets the collation- Parameters:
collation
- the collation- Returns:
- this
-
arrayFilters
public DBCollectionUpdateOptions arrayFilters(@Nullable java.util.List<? extends DBObject> arrayFilters)
Deprecated.Sets the array filters option- Parameters:
arrayFilters
- the array filters, which may be null- Returns:
- this
- Since:
- 3.6
-
getArrayFilters
@Nullable public java.util.List<? extends DBObject> getArrayFilters()
Deprecated.Returns the array filters option- Returns:
- the array filters, which may be null
- Since:
- 3.6
-
getWriteConcern
@Nullable public WriteConcern getWriteConcern()
Deprecated.The write concern to use for the insertion. By default the write concern configured for the DBCollection instance will be used.- Returns:
- the write concern, or null if the default will be used.
-
writeConcern
public DBCollectionUpdateOptions writeConcern(@Nullable WriteConcern writeConcern)
Deprecated.Sets the write concern- Parameters:
writeConcern
- the write concern- Returns:
- this
-
getEncoder
@Nullable public DBEncoder getEncoder()
Deprecated.Returns the encoder- Returns:
- the encoder
-
encoder
public DBCollectionUpdateOptions encoder(@Nullable DBEncoder encoder)
Deprecated.Sets the encoder- Parameters:
encoder
- the encoder- Returns:
- this
-
-