java.lang.Object
org.springframework.data.mongodb.core.MongoAction
Represents an action taken against the collection. Used by
WriteConcernResolver to determine a custom
WriteConcern based on this information.
- INSERT, SAVE have null query
- REMOVE has null document
- INSERT_LIST has null entityType, document, and query
- Author:
- Mark Pollack, Oliver Gierke, Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionMongoAction(com.mongodb.WriteConcern defaultWriteConcern, MongoActionOperation mongoActionOperation, String collectionName, Class<?> entityType, org.bson.Document document, org.bson.Document query) Create an instance of aMongoAction. -
Method Summary
-
Constructor Details
-
MongoAction
public MongoAction(@Nullable com.mongodb.WriteConcern defaultWriteConcern, MongoActionOperation mongoActionOperation, String collectionName, @Nullable Class<?> entityType, @Nullable org.bson.Document document, @Nullable org.bson.Document query) Create an instance of aMongoAction.- Parameters:
defaultWriteConcern- the default write concern. Can be null.mongoActionOperation- action being taken against the collection. Must not be null.collectionName- the collection name, must not be null or empty.entityType- the POJO that is being operated against. Can be null.document- the converted Document from the POJO or Spring Update object. Can be null.query- the converted Document from the Spring Query object. Can be null.
-
-
Method Details
-
getCollectionName
-
getDefaultWriteConcern
-
getEntityType
-
getMongoActionOperation
-
getQuery
-
getDocument
-