Example usage for Java org.springframework.data.mongodb.core MongoOperations fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | collectionExists(Class Check to see if a collection with a name indicated by the entity class exists. |
boolean | collectionExists(String collectionName) Check to see if a collection with a given name exists. |
MongoCollection | createCollection(Class Create an uncapped collection with a name based on the provided entity class. |
MongoCollection | createCollection(String collectionName) Create an uncapped collection with the provided name. |
List | find(Query query, Class Map the results of an ad-hoc query on the collection for the entity class to a List of the specified type. |
List | find(Query query, Class Map the results of an ad-hoc query on the specified collection to a List of the specified type. |
List | findAll(Class Query for a list of objects of type T from the collection used by the entity class. |
List | findAll(Class Query for a list of objects of type T from the specified collection. |
T | findById(Object id, Class Returns the document with the given id from the given collection mapped onto the given target class. |
T | findOne(Query query, Class Map the results of an ad-hoc query on the collection for the entity class to a single instance of an object of the specified type. |
MongoCollection | getCollection(String collectionName) Get a MongoCollection by its name. |
MongoConverter | getConverter() Returns the underlying MongoConverter . |
IndexOperations | indexOps(String collectionName) Returns the operations that can be performed on indexes |
IndexOperations | indexOps(Class> entityClass) Returns the operations that can be performed on indexes |
T | save(T objectToSave) Save the object to the collection for the entity type of the object to save. |
T | save(T objectToSave, String collectionName) Save the object to the specified collection. |
UpdateResult | updateFirst(Query query, Update update, Class> entityClass) Updates the first object that is found in the collection of the entity class that matches the query document with the provided update document. |
UpdateResult | updateFirst(Query query, Update update, String collectionName) Updates the first object that is found in the specified collection that matches the query document criteria with the provided updated document. |
UpdateResult | upsert(Query query, Update update, Class> entityClass) Performs an upsert. |
UpdateResult | upsert(Query query, Update update, String collectionName) Performs an upsert. |