Spring Data MongoDB - Reference Documentation

Authors

Mark Pollack, Thomas Risberg, Oliver Gierke, Costin Leau, Jon Brisbin, Thomas Darimont, Christoph Strobl

1.5.2.RELEASE

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.


Table of Contents

Preface
I. Introduction
1. Requirements
2. Additional Help Resources
2.1. Support
2.1.1. Community Forum
2.1.2. Professional Support
2.2. Following Development
II. Reference Documentation
3. MongoDB support
3.1. Getting Started
3.2. Examples Repository
3.3. Connecting to MongoDB with Spring
3.3.1. Registering a Mongo instance using Java based metadata
3.3.2. Registering a Mongo instance using XML based metadata
3.3.3. The MongoDbFactory interface
3.3.4. Registering a MongoDbFactory instance using Java based metadata
3.3.5. Registering a MongoDbFactory instance using XML based metadata
3.4. General auditing configuration
3.5. Introduction to MongoTemplate
3.5. . Instantiating MongoTemplate
WriteResultChecking Policy
WriteConcern
WriteConcernResolver
3.6. Saving, Updating, and Removing Documents
3.6.1. How the '_id' field is handled in the mapping layer
3.6.2. Type mapping
3.6.3. Methods for saving and inserting documents
Which collection will my documents be saved into?
Inserting or saving individual objects
Inserting several objects in a batch
3.6.4. Updating documents in a collection
Methods for executing updates for documents
Methods for the Update class
3.6.5. Upserting documents in a collection
3.6.6. Finding and Upserting documents in a collection
3.6.7. Methods for removing documents
3.7. Querying Documents
3.7.1. Querying documents in a collection
Methods for the Criteria class
Methods for the Query class
3.7.2. Methods for querying for documents
3.7.3. GeoSpatial Queries
Geo near queries
3.8. Map-Reduce Operations
3.8.1. Example Usage
3.9. Group Operations
3.9.1. Example Usage
3.10. Aggregation Framework Support
3.10.1. Basic Concepts
3.10.2. Supported Aggregation Operations
3.10.3. Projection Expressions
Spring Expression Support in Projection Expressions
3.10.4. Aggregation Framework Examples
3.11. Overriding default mapping with custom converters
3.11.1. Saving using a registered Spring Converter
3.11.2. Reading using a Spring Converter
3.11.3. Registering Spring Converters with the MongoConverter
3.11.4. Converter disambiguation
3.12. Index and Collection management
3.12.1. Methods for creating an Index
3.12.2. Accessing index information
3.12.3. Methods for working with a Collection
3.13. Executing Commands
3.13.1. Methods for executing commands
3.14. Lifecycle Events
3.15. Exception Translation
3.16. Execution callbacks
3.17. GridFS support
4. MongoDB repositories
4.1. Introduction
4.2. Usage
4.3. Query methods
4.3.1. Repository delete queries
4.3.2. Geo-spatial repository queries
4.3.3. MongoDB JSON based query methods and field restriction
4.3.4. Type-safe Query methods
4.4. Miscellaneous
4.4.1. CDI Integration
5. Mapping
5.1. Convention based Mapping
5.1.1. How the '_id' field is handled in the mapping layer
5.2. Mapping Configuration
5.3. Metadata based Mapping
5.3.1. Mapping annotation overview
5.3.2. Customized Object Construction
5.3.3. Compound Indexes
5.3.4. Using DBRefs
5.3.5. Mapping Framework Events
5.3.6. Overriding Mapping with explicit Converters
6. Cross Store support
6.1. Cross Store Configuration
6.2. Writing the Cross Store Application
7. Logging support
7.1. MongoDB Log4j Configuration
8. JMX support
8.1. MongoDB JMX Configuration
III. Appendix