Package com.mongodb
Class WriteConcernResult
- java.lang.Object
-
- com.mongodb.WriteConcernResult
-
@Deprecated(since="2021-05-27") public abstract class WriteConcernResult extends Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.The result of a successful write operation. If the write was unacknowledged, thenwasAcknowledged
will return false and all other methods will throwMongoUnacknowledgedWriteException
.- Since:
- 3.0
- See Also:
WriteConcern.UNACKNOWLEDGED
-
-
Constructor Summary
Constructors Constructor Description WriteConcernResult()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static WriteConcernResult
acknowledged(int count, boolean isUpdateOfExisting, BsonValue upsertedId)
Deprecated.Create an acknowledged WriteConcernResultabstract int
getCount()
Deprecated.Returns the number of documents affected by the write operation.abstract BsonValue
getUpsertedId()
Deprecated.Returns the value of _id if this write resulted in an upsert.abstract boolean
isUpdateOfExisting()
Deprecated.Returns true if the write was an update of an existing document.static WriteConcernResult
unacknowledged()
Deprecated.Create an unacknowledged WriteConcernResultabstract boolean
wasAcknowledged()
Deprecated.Returns true if the write was acknowledged.
-
-
-
Method Detail
-
wasAcknowledged
public abstract boolean wasAcknowledged()
Deprecated.Returns true if the write was acknowledged.- Returns:
- true if the write was acknowledged
-
getCount
public abstract int getCount()
Deprecated.Returns the number of documents affected by the write operation.- Returns:
- the number of documents affected by the write operation
- Throws:
UnsupportedOperationException
- if the write was unacknowledged.
-
isUpdateOfExisting
public abstract boolean isUpdateOfExisting()
Deprecated.Returns true if the write was an update of an existing document.- Returns:
- true if the write was an update of an existing document
- Throws:
UnsupportedOperationException
- if the write was unacknowledged.
-
getUpsertedId
@Nullable public abstract BsonValue getUpsertedId()
Deprecated.Returns the value of _id if this write resulted in an upsert.- Returns:
- the value of _id if this write resulted in an upsert.
- Throws:
UnsupportedOperationException
- if the write was unacknowledged.
-
acknowledged
public static WriteConcernResult acknowledged(int count, boolean isUpdateOfExisting, @Nullable BsonValue upsertedId)
Deprecated.Create an acknowledged WriteConcernResult- Parameters:
count
- the count of matched documentsisUpdateOfExisting
- whether an existing document was updatedupsertedId
- if an upsert resulted in an inserted document, this is the _id of that document. This may be null- Returns:
- an acknowledged WriteConcernResult
-
unacknowledged
public static WriteConcernResult unacknowledged()
Deprecated.Create an unacknowledged WriteConcernResult- Returns:
- an unacknowledged WriteConcernResult
-
-