From 42b13175fefc7ee72d713cf3e2b1859714ac019d Mon Sep 17 00:00:00 2001 From: Thomas Risberg Date: Sat, 12 Feb 2011 16:59:35 -0500 Subject: [PATCH] DATADOC-30 updated documentation --- src/docbkx/reference/mongodb.xml | 49 ++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/src/docbkx/reference/mongodb.xml b/src/docbkx/reference/mongodb.xml index dfdf5cb1e..c93cefe27 100644 --- a/src/docbkx/reference/mongodb.xml +++ b/src/docbkx/reference/mongodb.xml @@ -25,25 +25,31 @@ + + Configuration Factory - - for configuring and handling communication with MongoDB via its Java driver + - for configuring and handling communication with MongoDB via its Java driver + + Template implemenattion - providing a generified, user friendly template classes for interacting with MongoDB. - explains the abstraction builds on top of the low-level MongoDB Java API to handle the storage and retrieval of documents plus mapping between documents and domain classes. + explains the abstraction builds on top of the low-level MongoDB Java API to handle the storage and retrieval of documents plus mapping between documents and domain classes. + + Support Classes - - that offer reusable components such as mapping support and exception translation. + - that offer reusable components such as mapping support and exception translation. @@ -131,7 +137,7 @@ public class AppConfig {
- Working with objects through + <title>Working with objects using the <classname>MongoTemplate</classname> Most users are likely to use MongoTemplate @@ -143,10 +149,41 @@ public class AppConfig { box, MongoTemplate uses a Java-based default converter but you can also write your own converter classes to be used for reading and storing domain objects. Once configured, the template is - thread-safe and can be reused across multiple instances. + thread-safe and can be reused across multiple instances. - Let's look at a couple of examples for how to interect with the + Let's look at a couple of examples for how to work with the MongoTemplate. + +
+ Working with collections + + ... +
+ +
+ Creating an index + + ... +
+ +
+ Saving and retreiving objects as documents in a + collection + + ... +
+ +
+ Querying documents in a collection + + ... +
+ +
+ Updating documents in a collection + + ... +