Commit Graph

1719 Commits

Author SHA1 Message Date
Mark Pollack
b1f6ff9d89 Update documentation. Add support to configure MongoOptions in .xsd 2011-02-13 03:53:57 -02:00
Mark Pollack
704c84b644 Add JMX namespace parser 2011-02-13 00:47:46 -02:00
Mark Pollack
1519b81b1d Add JMX namespace parser 2011-02-13 00:47:35 -02:00
Thomas Risberg
42b13175fe DATADOC-30 updated documentation 2011-02-12 16:59:35 -05:00
Thomas Risberg
bccd302b50 added IndexSpecification to support creating GeospatialIndex 2011-02-12 16:23:12 -05:00
Thomas Risberg
c47c7deeeb added indexing features to MongoTemplate 2011-02-12 16:12:51 -05:00
Thomas Risberg
222b1507cd DATADOC-30 updated documenation 2011-02-12 10:51:43 -05:00
Mark Pollack
e9d3726531 Additional JMX Metrics 2011-02-11 14:48:45 -05:00
Mark Pollack
e910c2c300 Additional JMX Metrics 2011-02-11 14:46:59 -05:00
Thomas Risberg
adf8508d1d updated dependency on spring-data-commons to 1.0.0.M3 2011-02-11 12:00:48 -05:00
Mark Pollack
fae810fd31 update static snaphot location for docs 2011-02-10 15:56:12 -05:00
Oliver Gierke
93d22dbd61 Let repositories use the domain class' name to select collection.
We will now store each managed entity into a separate collection, so User class would be stored in the user collection, Account in account and so on.
2011-02-10 20:10:22 +01:00
Thomas Risberg
f192c4289b added new OrQuery class 2011-02-09 15:43:42 -05:00
Thomas Risberg
4f32ee1403 refactored the Query/Update "DSL" again 2011-02-09 15:40:53 -05:00
Thomas Risberg
fc4205488b renamed package from builder to query 2011-02-07 12:46:40 -05:00
Mark Pollack
96fd017123 jmx functionality 2011-02-07 12:12:33 -05:00
Thomas Risberg
3a47f192d7 update methods now return WriteResult; added configurable WriteResultChecking for update methods 2011-02-04 21:02:14 -05:00
Thomas Risberg
895776bea2 refactored MongoOperations to use UpdateDefinition/QueryDefinition throughout; added skip/limit/sort to CursorPreparer for queries; cleanup; refactored Query 2011-02-04 14:16:24 -05:00
Oliver Gierke
eafed37283 Re-refactored repository query execution after polishing of the core query builder API.
Pagination information is set on the query, but this still has to be brought to execution inside the template.
2011-02-03 21:44:47 +00:00
Thomas Risberg
7d948e28f3 added skip() 2011-02-03 16:19:56 -05:00
Thomas Risberg
d4ebb9a01c added skip also 2011-02-03 16:15:21 -05:00
Thomas Risberg
9e5eb96150 first part of MongoTemplate/Query refactoring 2011-02-03 16:02:11 -05:00
Oliver Gierke
f9e50916e1 Refactored repository implementation to use QuerySpec API.
Use QuerySpec instead of QueryBuilder now. Refactored query method query building to populate CriteriaSpec and work with root QuerySpec object until the API is polished. Some test should break right now as we have to get the skip and sorting stuff into the API.
2011-02-03 18:46:01 +00:00
Thomas Risberg
4ed5ff7dc8 created Sort as separate construct 2011-02-03 11:57:45 -05:00
Oliver Gierke
3ecad1cfd2 DATADOC-30 - Improvements to reference documentation.
Included core repository documentation from Spring Data Commons. Polished documents and restructured them a little.
2011-02-03 15:04:20 +00:00
Thomas Risberg
e2146bf997 renamed query methods to find; changed query methods taking JSON to accept the new Query object instead; added support for fields specification; removed write concern methods for collection and DB; 2011-02-02 17:54:52 -05:00
Thomas Risberg
d5b1b06a79 updated to Spring 3.0.5 2011-02-02 13:49:20 -05:00
Thomas Risberg
b362d559cb added QuerySpec and associated support classes; refactored UpdateSpec to implement Update interface 2011-02-02 12:51:01 -05:00
Thomas Risberg
0b2a3fae1d renamed UpdateBuilder to UpdateSpec and moved to builder package 2011-02-02 12:11:41 -05:00
Thomas Risberg
325e356bb8 DATADOC-14 added WriteConcern for MongoTemplate to be used for write operations when specified and also methods to set WriteConcern for DB and Collections 2011-01-26 13:06:52 -05:00
Oliver Gierke
29e770a9f7 DATACMNS-12 - Adapted namespace XSD to latest changes Spring Data Commons.
Added necessary attribute groups.
2011-01-26 17:53:53 +02:00
Thomas Risberg
2cd7b74264 added getter/setter for ExceptionTranslator 2011-01-25 12:04:55 -05:00
Thomas Risberg
a1c6c8d671 added ExceptionTranslator inreface to factory bean for convenience during configuration and to be consistent with JPA configs 2011-01-25 12:03:24 -05:00
Thomas Risberg
1daf3059ba fixed bug for handling the case of non-generated keys on inserts 2011-01-25 12:01:38 -05:00
Thomas Risberg
96badc7a9e made the utils class public again 2011-01-17 10:35:27 -05:00
Mark Pollack
d86175fcd3 DATADOC-21 - Create namespace to configure Mongo root object 2011-01-07 17:32:53 -05:00
Oliver Gierke
9cb0b69aa1 Adapted newly introduced Property model.
Added integration tests for traversing nested properties. Added query logging at debug level.
2011-01-07 22:30:11 +01:00
Oliver Gierke
9152ca89da Added support for non-primitive-value-referencing queries.
Query methods can now query for related objects of an entity. Test cases are centered around a Person having an Address. The query is something like:

List<Person> findByAddress(Address address);

We correctly marshal the parameter into a DBObject using the MongoConverter on argument binding.

Exposed the configured MongoConverter at MongoTemplate so that the repository infrastructure gets access to it. Let repository classes work with the template again instead of plain MongoOperations. Removed find(…) method from MongoOperations and -Template. Extended SimpleMongoConverter so that it can unmarshal collections as well.
2011-01-07 16:44:49 +01:00
Oliver Gierke
5796611b8f Simplified MongoPropertyDescriptor.isOfIdType(). 2011-01-05 20:19:43 +01:00
Oliver Gierke
cb6bed43ab Improvements to repositories.
- MongoRepositoryFactory now validates id type for supported types
- use MongoOperations.find(…) in SimpleMongoRepository.findById(…)
- added integration test for findById(…)
- added integration test for MongoTemplate
2011-01-05 20:01:40 +01:00
Oliver Gierke
8abd7df7ef Improvements to SimpleMongoConverter and MongoTemplate.
- improved signature of MongoReader to return an object of the type handed to it
- added convertObjectId(ObjectId id, Class targetType) to MongoConverter to delegate id conversion to the converter as well
- changed return values of some internal methods from Object to ObjectId where generally nothing else can come out of
- refactored populateIdIfNecessary(…) in MongoTemplate to use MongoConverter to convert the ObjectId created by the insert or save operation
- use field access where possible to avoid the need for setters
- introduced value objects MongoBeanWrapper and MongoPropertyDescriptor to simplify the code
- unpopulated id fields will get populated on marshaling
- support String, ObjectId and BigInteger as id types
- added find(…) method to MongoTemplate that looks up objects by type and id
2011-01-05 19:57:07 +01:00
Oliver Gierke
b49f285de5 Improvements to JavaDoc of MongoReader interface.
- clarified restrictions to the implementation
2011-01-04 19:49:54 +01:00
Oliver Gierke
67cb890644 Renamed DBHolder to DbHolder and reduced its scope to package visibility. 2011-01-04 19:49:54 +01:00
Oliver Gierke
fe68229fbd Renamed DBCallback to DbCallback. 2011-01-04 19:49:50 +01:00
Oliver Gierke
fb442d34e1 Updated copyright notice to reach into 2011 as well. 2011-01-04 19:42:36 +01:00
Oliver Gierke
affbe71f93 DATADOC-4 - Improved MongoTemplate exception handling
- moved exception translation from MongoDbUtils to MongoExceptionTranslator
- don't let MongoFactoryBean implement PersistenceExceptionTranslator
- heavily refactored MongoTemplate to let higher level methods use callbacks to centralize exception handling in the callback executing methods
- changed return type of MongoOperations.getCollectionNames to Set<String> as returning a List implies same order, that we can't guarantee actually
- polished JavaDoc of MongoOperations
- added assertions to methods
- changed methods taking a List<Object> to take a List<? extends Object> instead
- added abstract unit test for MongoOperations to define tests regarding expected exception behavior
- let MongoTemplateUnitTests extend MongoOperationsUnitTests
2011-01-04 19:42:00 +01:00
Oliver Gierke
47dde8ab4d Minor FindBugs polishing.
- removed obsolete property in MongoTemplate
- removed obsolete Exception declaration in MongoOoptionsFactoryBean
- use HashMap instead of LinkedHashMap as property in UpdateBuilder
- renamed local variable in MongoEntityinformation not to shadow a field
- reduced visibility of MongoSynchronization and fixed generics
- reduced visibility of MongoDbUtils and make it an abstract non-instantiateable class
- eliminate nested if-clause in MongoDbUtils
- removed obsolete class FluentDbObject
- added serialVersionUID to CannotGetMongoDbConnectionException
- created static inner enum for ObjectId-to-String converter
- added generics to Portfolio test entity
- polished SimpleMongoConverterTests and MvcAnalyticsTest
- removed some unnecessary imports and modifiers
2011-01-04 12:34:15 +01:00
Oliver Gierke
b88ce28709 Polished MongoTemplate
- default converter to SimpleMongoConverter in constructor already
- made potential final members final
- use error message template instead of repeating the same String over and over again
- removed _-prefix from id variables
- extracted "_id" to ID constant
- fixed inevitable NullPointerExceptions in updateFirst(…), updateMulti(…) and remove(…)
- remove special handling of non available username and password in getDb() as MongoDbUtils.getDB already handles them correctly
- removed throws Exception form afterPropertiesSet() as it does not throw any checked exception
- use String as type for passwords at MongoTemplate API and only turn it into the underlying char[] when handing it to MongoDbUtils
- added assertions for mandatory constructor arguments
2011-01-04 11:17:02 +01:00
Oliver Gierke
70059760bb DATADOC-30 - Fixed typo in InvalidDocumentStoreApiUsageException. 2011-01-02 14:22:55 +01:00
Oliver Gierke
f61a306f80 Corrected generics in MongoRepository. 2011-01-02 14:19:22 +01:00