public class DeleteOperation extends Object implements WriteOperation
Constructor and Description |
---|
DeleteOperation(DocumentAssignable query,
boolean singleDelete)
Creates a new DeleteOperation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object)
Determines if the passed object is of this same type as this object and
if so that its fields are equal.
|
Document |
getQuery()
Returns the query to find the documents to delete.
|
Document |
getRoutingDocument()
Returns the document that should be used to route the write operation.
|
WriteOperationType |
getType()
Returns the type of write.
|
int |
hashCode()
Computes a reasonable hash code.
|
boolean |
isSingleDelete()
Returns true if the operation should only delete at most one document.
|
String |
toString() |
public DeleteOperation(DocumentAssignable query, boolean singleDelete)
query
- The query to find the documents to delete.singleDelete
- If true then only a single document will be deleted. If
running in a sharded environment then this field must be false
or the query must contain the shard key.public boolean equals(Object object)
equals
in class Object
object
- The object to compare to.Object.equals(Object)
public Document getQuery()
public Document getRoutingDocument()
Overridden to return the query for the delete.
getRoutingDocument
in interface WriteOperation
public final WriteOperationType getType()
Overridden to return WriteOperationType.DELETE
.
getType
in interface WriteOperation
public int hashCode()
public boolean isSingleDelete()
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.