org.springframework.data.mongodb.core
Class MongoAction
java.lang.Object
org.springframework.data.mongodb.core.MongoAction
public class MongoAction
- extends Object
Represents an action taken against the collection. Used by WriteConcernResolver
to determine a custom
WriteConcern based on this information.
Properties that will always be not-null are collectionName and defaultWriteConcern. The EntityClass is null only for
the MongoActionOperaton.INSERT_LIST.
- INSERT, SAVE have null query
- REMOVE has null document
- INSERT_LIST has null entityClass, document, and query
- Author:
- Mark Pollack
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MongoAction
public MongoAction(WriteConcern defaultWriteConcern,
MongoActionOperation mongoActionOperation,
String collectionName,
Class<?> entityClass,
DBObject document,
DBObject query)
- Create an instance of a MongoAction
- Parameters:
defaultWriteConcern
- the default write concernmongoActionOperation
- action being taken against the collectioncollectionName
- the collection nameentityClass
- the POJO that is being operated againstdocument
- the converted DBObject from the POJO or Spring Update objectquery
- the converted DBOjbect from the Spring Query object
getCollectionName
public String getCollectionName()
getDefaultWriteConcern
public WriteConcern getDefaultWriteConcern()
getEntityClass
public Class<?> getEntityClass()
getMongoActionOperation
public MongoActionOperation getMongoActionOperation()
getQuery
public DBObject getQuery()
getDocument
public DBObject getDocument()
Copyright © 2012. All Rights Reserved.