Package com.mongodb.client.model
Class ReplaceOneModel<T>
- java.lang.Object
-
- com.mongodb.client.model.WriteModel<T>
-
- com.mongodb.client.model.ReplaceOneModel<T>
-
- Type Parameters:
T
- the type of document to replace. This can be of any type for which aCodec
is registered
@Deprecated(since="2021-05-27") public final class ReplaceOneModel<T> extends WriteModel<T>
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A model describing the replacement of at most one document that matches the query filter.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ReplaceOneModel(Bson filter, T replacement)
Deprecated.Construct a new instance.ReplaceOneModel(Bson filter, T replacement, ReplaceOptions options)
Deprecated.Construct a new instance.ReplaceOneModel(Bson filter, T replacement, UpdateOptions options)
Deprecated.useReplaceOneModel(Bson, Object, ReplaceOptions)
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Bson
getFilter()
Deprecated.Gets the query filter.UpdateOptions
getOptions()
Deprecated.usegetReplaceOptions()
insteadT
getReplacement()
Deprecated.Gets the document which will replace the document matching the query filter.ReplaceOptions
getReplaceOptions()
Deprecated.Gets the ReplaceOptions to apply.java.lang.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
ReplaceOneModel
public ReplaceOneModel(Bson filter, T replacement)
Deprecated.Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.replacement
- the replacement document
-
ReplaceOneModel
@Deprecated public ReplaceOneModel(Bson filter, T replacement, UpdateOptions options)
Deprecated.useReplaceOneModel(Bson, Object, ReplaceOptions)
insteadConstruct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.replacement
- the replacement documentoptions
- the options to apply
-
ReplaceOneModel
public ReplaceOneModel(Bson filter, T replacement, ReplaceOptions options)
Deprecated.Construct a new instance.- Parameters:
filter
- a document describing the query filter, which may not be null.replacement
- the replacement documentoptions
- the options to apply- Since:
- 3.7
-
-
Method Detail
-
getFilter
public Bson getFilter()
Deprecated.Gets the query filter.- Returns:
- the query filter
-
getReplacement
public T getReplacement()
Deprecated.Gets the document which will replace the document matching the query filter.- Returns:
- the replacement document
-
getOptions
@Deprecated public UpdateOptions getOptions()
Deprecated.usegetReplaceOptions()
insteadGets the options to apply.- Returns:
- the update options
-
getReplaceOptions
public ReplaceOptions getReplaceOptions()
Deprecated.Gets the ReplaceOptions to apply.- Returns:
- the replace options
- Since:
- 3.7
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-