Package com.mongodb.operation
Class InsertOperation
- java.lang.Object
 - 
- com.mongodb.operation.BaseWriteOperation
 - 
- com.mongodb.operation.InsertOperation
 
 
 
- 
- All Implemented Interfaces:
 AsyncWriteOperation<WriteConcernResult>,WriteOperation<WriteConcernResult>
@Deprecated public class InsertOperation extends BaseWriteOperation
Deprecated.An operation that inserts one or more documents into a collection.- Since:
 - 3.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description InsertOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, boolean retryWrites, List<InsertRequest> insertRequests)Deprecated.Construct an instance.InsertOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, List<InsertRequest> insertRequests)Deprecated. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<InsertRequest>getInsertRequests()Deprecated.Gets the list of insert requests.protected WriteRequest.TypegetType()Deprecated.protected List<? extends WriteRequest>getWriteRequests()Deprecated.- 
Methods inherited from class com.mongodb.operation.BaseWriteOperation
bypassDocumentValidation, execute, executeAsync, getBypassDocumentValidation, getNamespace, getWriteConcern, isOrdered 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
InsertOperation
@Deprecated public InsertOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, List<InsertRequest> insertRequests)
Deprecated.Construct an instance.- Parameters:
 namespace- the database and collection namespace for the operation.ordered- whether the inserts are ordered.writeConcern- the write concern for the operation.insertRequests- the list of inserts.
 
- 
InsertOperation
public InsertOperation(MongoNamespace namespace, boolean ordered, WriteConcern writeConcern, boolean retryWrites, List<InsertRequest> insertRequests)
Deprecated.Construct an instance.- Parameters:
 namespace- the database and collection namespace for the operation.ordered- whether the inserts are ordered.writeConcern- the write concern for the operation.retryWrites- if writes should be retried if they fail due to a network error.insertRequests- the list of inserts.- Since:
 - 3.6
 
 
 - 
 
- 
Method Detail
- 
getInsertRequests
public List<InsertRequest> getInsertRequests()
Deprecated.Gets the list of insert requests.- Returns:
 - the list of insert requests.
 
 
- 
getType
protected WriteRequest.Type getType()
Deprecated.- Specified by:
 getTypein classBaseWriteOperation
 
- 
getWriteRequests
protected List<? extends WriteRequest> getWriteRequests()
Deprecated.- Specified by:
 getWriteRequestsin classBaseWriteOperation
 
 - 
 
 -