Spring Data Document

org.springframework.data.mongodb.core
Class MongoAction

java.lang.Object
  extended by 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.

Author:
Mark Pollack, Oliver Gierke

Constructor Summary
MongoAction(WriteConcern defaultWriteConcern, MongoActionOperation mongoActionOperation, String collectionName, Class<?> entityType, DBObject document, DBObject query)
          Create an instance of a MongoAction.
 
Method Summary
 String getCollectionName()
           
 WriteConcern getDefaultWriteConcern()
           
 DBObject getDocument()
           
 Class<?> getEntityClass()
          Deprecated. use getEntityType() instead.
 Class<?> getEntityType()
           
 MongoActionOperation getMongoActionOperation()
           
 DBObject getQuery()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoAction

public MongoAction(WriteConcern defaultWriteConcern,
                   MongoActionOperation mongoActionOperation,
                   String collectionName,
                   Class<?> entityType,
                   DBObject document,
                   DBObject query)
Create an instance of a MongoAction.

Parameters:
defaultWriteConcern - the default write concern.
mongoActionOperation - action being taken against the collection
collectionName - the collection name, must not be null or empty.
entityType - the POJO that is being operated against
document - the converted DBObject from the POJO or Spring Update object
query - the converted DBOjbect from the Spring Query object
Method Detail

getCollectionName

public String getCollectionName()

getDefaultWriteConcern

public WriteConcern getDefaultWriteConcern()

getEntityClass

@Deprecated
public Class<?> getEntityClass()
Deprecated. use getEntityType() instead.


getEntityType

public Class<?> getEntityType()

getMongoActionOperation

public MongoActionOperation getMongoActionOperation()

getQuery

public DBObject getQuery()

getDocument

public DBObject getDocument()

Spring Data Document

Copyright © 2013. All Rights Reserved.