public class FindAndModify extends Object
MongoCollection.findAndModify(com.allanbank.mongodb.builder.FindAndModify)
 command. Objects of this class are created using the nested FindAndModify.Builder.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
FindAndModify.Builder
Helper for creating immutable  
FindAndModify commands. | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
FindAndModify(FindAndModify.Builder builder)
Create a new FindAndModify. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static FindAndModify.Builder | 
builder()
Creates a new builder for a  
FindAndModify. | 
Document | 
getFields()
Returns the subset of fields to retrieve from the matched document. 
 | 
Document | 
getQuery()
Returns the query to locate the document to update. 
 | 
Document | 
getSort()
Returns the sort to apply if multiple docs match, choose the first one as
 the object to manipulate. 
 | 
Document | 
getUpdate()
Returns the updates to be applied to the document. 
 | 
boolean | 
isRemove()
Returns true if the document should be removed. 
 | 
boolean | 
isReturnNew()
Returns true if the updated document should be returned instead of the
 document before the update. 
 | 
boolean | 
isUpsert()
Returns true to create the document if it doesn't exist. 
 | 
protected FindAndModify(FindAndModify.Builder builder)
builder - The builder to copy from.public static FindAndModify.Builder builder()
FindAndModify.FindAndModify.public Document getFields()
public Document getQuery()
public Document getSort()
public Document getUpdate()
public boolean isRemove()
public boolean isReturnNew()
public boolean isUpsert()
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.