Explicitly remove converter for Object -> String on instance creation which allows us to get rid of the ugly SimpleToStringSuppressingGenericConversionService. writeCompoundValue(…) now asks the ConversionService whether it can convert the value to be written into one of Mongos native primitive types and rather delegates to the service instead of recursively writing the value itself.
Removed possibility to use custom ConversionService and rather provide a setter to allow registering custom Converter and ConverterFactory instances. This way we can use a custom ConversionService our own that does not regard the ObjectToStringConverter registered by default. This way ConversionService.canConvert(…, String.class) will not return true by default.
Changed MongoPropertyDescriptor.isMappable(…) to check whether the owning type actually has a field with the property name. If not the property will not be regarded as mappable. This results in plain functional getters (that are not a bean property getter actually) to be skipped transparently.
Added necessary dependencies, repository and APT processor plugin. Added QueryDslPredicateExecutor and a QueryDsl specific sub-class of SimpleMongoRepository.
Adapted MongoRepositoryFactory to use new QueryDslRepository implementation when a repository interface extends QueryDslPredicateExecutor. Added AnnotationProcessor to create query classes from QueryDsl annotations.
Todo's left open:
- move common QueryDsl integration code into Spring Data commons (see TODOs in the sourcecode)
The MappingMongoConverter now uses TypeInformation to inspect field types and nested ones. Created overloaded versions of read(…) and write(…) to work with PersistentEntity directly so that nested calls to those methods can be distinguished from from top level ones.
Values of the registered custom types are serialized using the underlying ConversionService. This way we can plug in custom converters, e.g. for JodaTime and the like.
Adapted changes of Spring Data Commons. Implemented IndexEnsuringQueryCreationListener that creates an index for all the properties used in a query. Applies descending order by default but consideres potentially added OrderBy clauses in the query to define the order of the index attributes.