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. Properties that will always be not-null are collectionName and defaultWriteConcern. The EntityClass is null only for the MongoActionOperaton.INSERT_LIST.

Author:
Mark Pollack

Constructor Summary
MongoAction(WriteConcern defaultWriteConcern, MongoActionOperation mongoActionOperation, String collectionName, Class<?> entityClass, DBObject document, DBObject query)
          Create an instance of a MongoAction
 
Method Summary
 String getCollectionName()
           
 WriteConcern getDefaultWriteConcern()
           
 DBObject getDocument()
           
 Class<?> getEntityClass()
           
 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<?> entityClass,
                   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
entityClass - 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

public Class<?> getEntityClass()

getMongoActionOperation

public MongoActionOperation getMongoActionOperation()

getQuery

public DBObject getQuery()

getDocument

public DBObject getDocument()

Spring Data Document

Copyright © 2012. All Rights Reserved.