Class 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.
    • INSERT, SAVE have null query
    • REMOVE has null document
    • INSERT_LIST has null entityType, document, and query
    Mark Pollack, Oliver Gierke, Christoph Strobl
    • Constructor Detail

      • MongoAction

        public MongoAction(@Nullable
                           com.mongodb.WriteConcern defaultWriteConcern,
                           MongoActionOperation mongoActionOperation,
                           String collectionName,
                           Class<?> entityType,
                           org.bson.Document document,
                           org.bson.Document query)
        Create an instance of a MongoAction.
        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 Detail

      • getCollectionName

        public String getCollectionName()
      • getDefaultWriteConcern

        public com.mongodb.WriteConcern getDefaultWriteConcern()
      • getQuery

        public org.bson.Document getQuery()
      • getDocument

        public org.bson.Document getDocument()