DATADOC-30 updated documenation
This commit is contained in:
@@ -355,39 +355,51 @@ public class AppConfig {
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>MongoTemplate(Mongo mongo, String databaseName) - takes the
|
||||
default database name to operate against</para>
|
||||
<para><emphasis
|
||||
role="bold">MongoTemplate</emphasis><literal>(Mongo mongo, String
|
||||
databaseName)</literal> - takes the default database name to
|
||||
operate against</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>MongoTemplate(Mongo mongo, String databaseName, String
|
||||
defaultCollectionName) - adds the default collection name to
|
||||
operate against.</para>
|
||||
<para><emphasis
|
||||
role="bold">MongoTemplate</emphasis><literal>(Mongo mongo, String
|
||||
databaseName, String defaultCollectionName)</literal> - adds the
|
||||
default collection name to operate against.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>MongoTemplate(Mongo mongo, String databaseName, String
|
||||
defaultCollectionName, MongoConverter mongoConverter) - override
|
||||
with a provided MongoConverter. Default is
|
||||
SimpleMongoConverter</para>
|
||||
<para><emphasis
|
||||
role="bold">MongoTemplate</emphasis><literal>(Mongo mongo, String
|
||||
databaseName, String defaultCollectionName, MongoConverter
|
||||
mongoConverter)</literal> - override with a provided
|
||||
MongoConverter. Default is SimpleMongoConverter</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>MongoTemplate(Mongo mongo, String databaseName, String
|
||||
defaultCollectionName, MongoConverter mongoConverter, WriteConcern
|
||||
writeConcern, WriteResultChecking writeResultChecking) - Specify a
|
||||
default WriteConcern and also WriteResultChecking policy</para>
|
||||
<para><emphasis
|
||||
role="bold">MongoTemplate</emphasis><literal>(Mongo mongo, String
|
||||
databaseName, String defaultCollectionName, MongoConverter
|
||||
mongoConverter, WriteConcern writeConcern, WriteResultChecking
|
||||
writeResultChecking)</literal> - Specify a default WriteConcern
|
||||
and also WriteResultChecking policy</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>MongoTemplate(Mongo mongo, String databaseName, String
|
||||
defaultCollectionName, WriteConcern writeConcern,
|
||||
WriteResultChecking writeResultChecking)</para>
|
||||
<para><emphasis
|
||||
role="bold">MongoTemplate</emphasis><literal>(Mongo mongo, String
|
||||
databaseName, String defaultCollectionName, WriteConcern
|
||||
writeConcern, WriteResultChecking writeResultChecking)</literal>-
|
||||
Specify a default WriteConcern and also WriteResultChecking
|
||||
policy</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>MongoTemplate(Mongo mongo, String databaseName, WriteConcern
|
||||
writeConcern, WriteResultChecking writeResultChecking)</para>
|
||||
<para><emphasis
|
||||
role="bold">MongoTemplate</emphasis><literal>(Mongo mongo, String
|
||||
databaseName, WriteConcern writeConcern, WriteResultChecking
|
||||
writeResultChecking)</literal>- Specify a default WriteConcern and
|
||||
also WriteResultChecking policy</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
@@ -421,53 +433,60 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>Set<String> getCollectionNames() A set of collection
|
||||
names.</para>
|
||||
<para><literal>Set<String></literal> <emphasis
|
||||
role="bold">getCollectionNames</emphasis><literal>()</literal> A
|
||||
set of collection names.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>boolean collectionExists(java.lang.String collectionName)
|
||||
Check to see if a collection with a given name exists.</para>
|
||||
<para><literal>boolean</literal> <emphasis
|
||||
role="bold">collectionExists</emphasis><literal>(String
|
||||
collectionName)</literal> Check to see if a collection with a
|
||||
given name exists.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.DBCollection createCollection(String
|
||||
collectionName) Create an uncapped collection with the provided
|
||||
<para><literal>DBCollection</literal> <emphasis
|
||||
role="bold">createCollection</emphasis><literal>(String
|
||||
collectionName)</literal> Create an uncapped collection with the
|
||||
provided name.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>DBCollection</literal> <emphasis
|
||||
role="bold">createCollection</emphasis><literal>(String
|
||||
collectionName, CollectionOptions collectionOptions)</literal>
|
||||
Create a collect with the provided name and options.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">dropCollection</emphasis><literal>(String
|
||||
collectionName)</literal> Drop the collection with the given
|
||||
name.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.DBCollection createCollection(String
|
||||
collectionName, CollectionOptions collectionOptions) Create a
|
||||
collect with the provided name and options.</para>
|
||||
<para><literal>DBCollection</literal> <emphasis
|
||||
role="bold">getCollection</emphasis><literal>(String
|
||||
collectionName)</literal> Get a collection by name, creating it
|
||||
if it doesn't exist.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void dropCollection(java.lang.String collectionName) Drop
|
||||
the collection with the given name.</para>
|
||||
<para><literal>DBCollection</literal> <emphasis
|
||||
role="bold">getDefaultCollection</emphasis><literal>()</literal>
|
||||
The default collection used by this template.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.DBCollection getCollection(java.lang.String
|
||||
collectionName) Get a collection by name, creating it if it
|
||||
doesn't exist.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.DBCollection getDefaultCollection() The
|
||||
default collection used by this template.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>String getDefaultCollectionName() The default collection
|
||||
name used by this template.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.DBCollection getDefaultCollection() The
|
||||
default collection used by this template.</para>
|
||||
<para><literal>String</literal> <emphasis
|
||||
role="bold">getDefaultCollectionName</emphasis><literal>()</literal>
|
||||
The default collection name used by this template.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -475,41 +494,50 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>com.mongodb.CommandResult
|
||||
executeCommand(com.mongodb.DBObject command) Execute a MongoDB
|
||||
command.</para>
|
||||
<para><literal>CommandResult</literal> <emphasis
|
||||
role="bold">executeCommand</emphasis><literal>(DBObject
|
||||
command)</literal> Execute a MongoDB command.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.CommandResult executeCommand(String
|
||||
jsonCommand) Execute the a MongoDB command expressed as a JSON
|
||||
string.</para>
|
||||
<para><literal>CommandResult</literal> <emphasis
|
||||
role="bold">executeCommand</emphasis><literal>(String
|
||||
jsonCommand)</literal> Execute the a MongoDB command expressed
|
||||
as a JSON string.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T execute(CollectionCallback<T> action)
|
||||
Executes the given CollectionCallback on the default
|
||||
collection.</para>
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">execute</emphasis><literal>(CollectionCallback<T>
|
||||
action)</literal> Executes the given CollectionCallback on the
|
||||
default collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T execute(CollectionCallback<T> action,
|
||||
String collectionName) Executes the given CollectionCallback on
|
||||
the collection of the given name.</para>
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">execute</emphasis><literal>(String collectionName,
|
||||
CollectionCallback<T> action)</literal> Executes the given
|
||||
CollectionCallback on the collection of the given name.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T execute(DbCallback<T> action) Executes a
|
||||
DbCallback translating any exceptions as necessary.</para>
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">execute</emphasis><literal>(DbCallback<T>
|
||||
action)</literal> Executes a DbCallback translating any
|
||||
exceptions as necessary.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T executeInSession(DbCallback<T> action)
|
||||
Executes the given DbCallback within the same connection to the
|
||||
database so as to ensure consistency in a write heavy
|
||||
environment where you may read the data that you wrote.</para>
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">executeInSession</emphasis><literal>(DbCallback<T>
|
||||
action)</literal> Executes the given DbCallback within the same
|
||||
connection to the database so as to ensure consistency in a
|
||||
write heavy environment where you may read the data that you
|
||||
wrote.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -517,17 +545,22 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>void ensureIndex(IndexSpecification indexSpecification)
|
||||
Ensure that an index for the provided IndexSpecification exists
|
||||
for the default collection.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">ensureIndex</emphasis><literal>(IndexDefinition
|
||||
indexDefintion)</literal> Ensure that an index for the provided
|
||||
IndexDefinition exists for the default collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void ensureIndex(String collectionName, IndexSpecification
|
||||
indexSpecification) Ensure that an index for the provided
|
||||
IndexSpecification exists.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">ensureIndex</emphasis><literal>(String
|
||||
collectionName, IndexDefinition indexSpecification)</literal>
|
||||
Ensure that an index for the provided IndexDefinition
|
||||
exists.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -535,55 +568,69 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>void insert(java.lang.Object objectToSave) Insert the
|
||||
object into the default collection.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">insert</emphasis><literal>(Object
|
||||
objectToSave)</literal> Insert the object into the default
|
||||
collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void insert(java.lang.String collectionName,
|
||||
java.lang.Object objectToSave) Insert the object into the
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">insert</emphasis><literal>(String collectionName,
|
||||
Object objectToSave)</literal> Insert the object into the
|
||||
specified collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void insertList(java.util.List<? extends
|
||||
java.lang.Object> listToSave) Insert a list of objects into
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">insertList</emphasis><literal>(List<? extends
|
||||
Object> listToSave)</literal> Insert a list of objects into
|
||||
the default collection in a single batch write to the
|
||||
database.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void insertList(java.lang.String collectionName,
|
||||
java.util.List<? extends java.lang.Object> listToSave)
|
||||
Insert a list of objects into the specified collection in a
|
||||
single batch write to the database.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">insertList</emphasis><literal>(String
|
||||
collectionName, List<? extends Object>
|
||||
listToSave)</literal> Insert a list of objects into the
|
||||
specified collection in a single batch write to the
|
||||
database.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> void insert(T objectToSave, MongoWriter<T>
|
||||
writer) Insert the object into the default collection.</para>
|
||||
<para><literal><T> void</literal> <emphasis
|
||||
role="bold">insert</emphasis><literal>(T objectToSave,
|
||||
MongoWriter<T> writer)</literal> Insert the object into
|
||||
the default collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> void insert(String collectionName, T
|
||||
objectToSave, MongoWriter<T> writer) Insert the object
|
||||
into the specified collection.</para>
|
||||
<para><literal><T> void</literal> <emphasis
|
||||
role="bold">insert</emphasis><literal>(String collectionName, T
|
||||
objectToSave, MongoWriter<T> writer)</literal> Insert the
|
||||
object into the specified collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> void insertList(List<? extends T>
|
||||
listToSave, MongoWriter<T> writer) Insert a list of
|
||||
objects into the default collection using the provided
|
||||
<para><literal><T> void</literal> <emphasis
|
||||
role="bold">insertList</emphasis><literal>(List<? extends
|
||||
T> listToSave, MongoWriter<T> writer)</literal> Insert
|
||||
a list of objects into the default collection using the provided
|
||||
MongoWriter instance</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> void insertList(String collectionName, List<?
|
||||
extends T> listToSave, MongoWriter<T> writer) Insert a
|
||||
list of objects into the specified collection using the provided
|
||||
MongoWriter instance</para>
|
||||
<para><literal><T> void</literal> <emphasis
|
||||
role="bold">insertList</emphasis><literal>(String
|
||||
collectionName, List<? extends T> listToSave,
|
||||
MongoWriter<T> writer)</literal> Insert a list of objects
|
||||
into the specified collection using the provided MongoWriter
|
||||
instance</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -591,87 +638,106 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para><T> List<T> getCollection(Class<T>
|
||||
targetClass) Query for a list of objects of type T from the
|
||||
default collection.</para>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">getCollection</emphasis><literal>(Class<T>
|
||||
targetClass)</literal> Query for a list of objects of type T
|
||||
from the default collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> getCollection(String
|
||||
collectionName, Class<T> targetClass) Query for a list of
|
||||
objects of type T from the specified collection.</para>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">getCollection</emphasis><literal>(String
|
||||
collectionName, Class<T> targetClass)</literal> Query for
|
||||
a list of objects of type T from the specified
|
||||
collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> getCollection(String
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">getCollection</emphasis><literal>(String
|
||||
collectionName, Class<T> targetClass, MongoReader<T>
|
||||
reader) Query for a list of objects of type T from the specified
|
||||
collection, mapping the DBObject using the provided
|
||||
reader)</literal> Query for a list of objects of type T from the
|
||||
specified collection, mapping the DBObject using the provided
|
||||
MongoReader.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T findOne(Query query, Class<T>
|
||||
targetClass) Map the results of an ad-hoc query on the default
|
||||
MongoDB collection to a single instance of an object of the
|
||||
specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T findOne(Query query, Class<T>
|
||||
targetClass, MongoReader<T> reader) Map the results of an
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">findOne</emphasis><literal>(Query query,
|
||||
Class<T> targetClass)</literal> Map the results of an
|
||||
ad-hoc query on the default MongoDB collection to a single
|
||||
instance of an object of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T findOne(java.lang.String collectionName, Query
|
||||
query, Class<T> targetClass) Map the results of an ad-hoc
|
||||
query on the specified collection to a single instance of an
|
||||
object of the specified type.</para>
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">findOne</emphasis><literal>(Query query,
|
||||
Class<T> targetClass, MongoReader<T>
|
||||
reader)</literal> Map the results of an ad-hoc query on the
|
||||
default MongoDB collection to a single instance of an object of
|
||||
the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> T findOne(java.lang.String collectionName, Query
|
||||
query, Class<T> targetClass, MongoReader<T> reader)
|
||||
Map the results of an ad-hoc query on the specified collection
|
||||
to a single instance of an object of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> find(Query query, Class<T>
|
||||
targetClass) Map the results of an ad-hoc query on the default
|
||||
MongoDB collection to a List of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> find(Query query, Class<T>
|
||||
targetClass, MongoReader<T> reader) Map the results of an
|
||||
ad-hoc query on the default MongoDB collection to a List of the
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">findOne</emphasis><literal>(java.lang.String
|
||||
collectionName, Query query, Class<T>
|
||||
targetClass)</literal> Map the results of an ad-hoc query on the
|
||||
specified collection to a single instance of an object of the
|
||||
specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> find(String collectionName, Query
|
||||
query, Class<T> targetClass) Map the results of an ad-hoc
|
||||
query on the specified collection to a List of the specified
|
||||
<para><literal><T> T</literal> <emphasis
|
||||
role="bold">findOne</emphasis><literal>(java.lang.String
|
||||
collectionName, Query query, Class<T> targetClass,
|
||||
MongoReader<T> reader)</literal> Map the results of an
|
||||
ad-hoc query on the specified collection to a single instance of
|
||||
an object of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">find</emphasis><literal>(Query query, Class<T>
|
||||
targetClass)</literal> Map the results of an ad-hoc query on the
|
||||
default MongoDB collection to a List of the specified
|
||||
type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> find(String collectionName, Query
|
||||
query, Class<T> targetClass, CursorPreparer preparer) Map
|
||||
the results of an ad-hoc query on the specified collection to a
|
||||
List of the specified type.</para>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">find</emphasis><literal>(Query query, Class<T>
|
||||
targetClass, MongoReader<T> reader)</literal> Map the
|
||||
results of an ad-hoc query on the default MongoDB collection to
|
||||
a List of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> List<T> find(String collectionName, Query
|
||||
query, Class<T> targetClass, MongoReader<T> reader)
|
||||
Map the results of an ad-hoc query on the specified collection
|
||||
to a List of the specified type.</para>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">find</emphasis><literal>(String collectionName,
|
||||
Query query, Class<T> targetClass)</literal> Map the
|
||||
results of an ad-hoc query on the specified collection to a List
|
||||
of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">find</emphasis><literal>(String collectionName,
|
||||
Query query, Class<T> targetClass, CursorPreparer
|
||||
preparer)</literal> Map the results of an ad-hoc query on the
|
||||
specified collection to a List of the specified type.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal><T> List<T></literal> <emphasis
|
||||
role="bold">find</emphasis><literal>(String collectionName,
|
||||
Query query, Class<T> targetClass, MongoReader<T>
|
||||
reader)</literal> Map the results of an ad-hoc query on the
|
||||
specified collection to a List of the specified type.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -679,27 +745,36 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>void save(Object objectToSave) Save the object to the
|
||||
default collection.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">save</emphasis><literal>(Object
|
||||
objectToSave)</literal> Save the object to the default
|
||||
collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void save(String collectionName, Object objectToSave) Save
|
||||
the object to the specified collection.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">save</emphasis><literal>(String collectionName,
|
||||
Object objectToSave)</literal> Save the object to the specified
|
||||
collection.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> void save(T objectToSave, MongoWriter<T>
|
||||
writer) Save the object into the default collection using the
|
||||
provided writer.</para>
|
||||
<para><literal><T> void</literal> <emphasis
|
||||
role="bold">save</emphasis><literal>(T objectToSave,
|
||||
MongoWriter<T> writer)</literal> Save the object into the
|
||||
default collection using the provided writer.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><T> void save(String collectionName, T objectToSave,
|
||||
MongoWriter<T> writer) Save the object into the specified
|
||||
collection using the provided writer.</para>
|
||||
<para><literal><T> void</literal> <emphasis
|
||||
role="bold">save</emphasis><literal>(String collectionName, T
|
||||
objectToSave, MongoWriter<T> writer)</literal> Save the
|
||||
object into the specified collection using the provided
|
||||
writer.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -707,17 +782,22 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para>void remove(Query query) Remove all documents from the
|
||||
default collection that match the provided query document
|
||||
criteria.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">remove</emphasis><literal>(Query query)</literal>
|
||||
Remove all documents from the default collection that match the
|
||||
provided query document criteria.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>void remove(String collectionName, Query query) Remove all
|
||||
documents from the specified collection that match the provided
|
||||
query document criteria.</para>
|
||||
<para><literal>void</literal> <emphasis
|
||||
role="bold">remove</emphasis><literal>(String collectionName,
|
||||
Query query)</literal> Remove all documents from the specified
|
||||
collection that match the provided query document
|
||||
criteria.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -725,33 +805,41 @@ public class AppConfig {
|
||||
|
||||
<para><itemizedlist>
|
||||
<listitem>
|
||||
<para> com.mongodb.WriteResult updateFirst(Query query, Update
|
||||
update) Updates the first object that is found in the default
|
||||
collection that matches the query document with the provided
|
||||
updated document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.WriteResult updateFirst(String collectionName,
|
||||
Query query, Update update) Updates the first object that is
|
||||
found in the specified collection that matches the query
|
||||
document criteria with the provided updated document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.WriteResult updateMulti(Query query, Update
|
||||
update) Updates all objects that are found in the default
|
||||
collection that matches the query document criteria with the
|
||||
<para> <literal>WriteResult</literal> <emphasis
|
||||
role="bold">updateFirst</emphasis><literal>(Query query, Update
|
||||
update)</literal> Updates the first object that is found in the
|
||||
default collection that matches the query document with the
|
||||
provided updated document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>com.mongodb.WriteResult updateMulti(String collectionName,
|
||||
Query query, Update update) Updates all objects that are found
|
||||
in the specified collection that matches the query document
|
||||
criteria with the provided updated document.</para>
|
||||
<para><literal>WriteResult</literal> <emphasis
|
||||
role="bold">updateFirst</emphasis><literal>(String
|
||||
collectionName, Query query, Update update)</literal> Updates
|
||||
the first object that is found in the specified collection that
|
||||
matches the query document criteria with the provided updated
|
||||
document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>WriteResult</literal> <emphasis
|
||||
role="bold">updateMulti</emphasis><literal>(Query query, Update
|
||||
update)</literal> Updates all objects that are found in the
|
||||
default collection that matches the query document criteria with
|
||||
the provided updated document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>WriteResult</literal> <emphasis
|
||||
role="bold">updateMulti</emphasis><literal>(String
|
||||
collectionName, Query query, Update update)</literal> Updates
|
||||
all objects that are found in the specified collection that
|
||||
matches the query document criteria with the provided updated
|
||||
document.</para>
|
||||
</listitem>
|
||||
</itemizedlist></para>
|
||||
|
||||
<para></para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -760,7 +848,7 @@ public class AppConfig {
|
||||
|
||||
<para>It's time to look at some code examples showing how to use the
|
||||
<classname>MongoTemplate</classname>. First we look at creating our
|
||||
first colection.</para>
|
||||
first collection.</para>
|
||||
|
||||
<example>
|
||||
<title>Working with collections using the MongoTemplate</title>
|
||||
|
||||
Reference in New Issue
Block a user