DATAMONGO-1811 - Update documentation of MongoOperations.executeCommand.

Update Javadoc and reference documentation.
This commit is contained in:
Christoph Strobl
2017-10-24 14:49:42 +02:00
parent 4ea6dd481d
commit 37df6efe5f
2 changed files with 13 additions and 12 deletions

View File

@@ -2419,13 +2419,14 @@ NOTE: Collection creation allows customization via `CollectionOptions` and suppo
[[mongo-template.commands]]
== Executing Commands
You can also get at the MongoDB driver's `DB.command( )` method using the `executeCommand(…)` methods on `MongoTemplate`. These will also perform exception translation into Spring's `DataAccessException` hierarchy.
You can also get at the MongoDB driver's `MongoDatabase.runCommand( )` method using the `executeCommand(…)` methods on `MongoTemplate`. These will also perform exception translation into Spring's `DataAccessException` hierarchy.
[[mongo-template.commands.execution]]
=== Methods for executing commands
* `CommandResult` *executeCommand* `(Document command)` Execute a MongoDB command.
* `CommandResult` *executeCommand* `(String jsonCommand)` Execute the a MongoDB command expressed as a JSON string.
* `Document` *executeCommand* `(Document command)` Execute a MongoDB command.
* `Document` *executeCommand* `(Document command, ReadPreference readPreference)` Execute a MongoDB command using the given nullable MongoDB `ReadPreference`.
* `Document` *executeCommand* `(String jsonCommand)` Execute the a MongoDB command expressed as a JSON string.
[[mongodb.mapping-usage.events]]
== Lifecycle Events