Query method names now support Distinct in method name prefixes. Beyond that I laxed the prefix constraints a little so that it can potentially contain anything before a 'By' separator:
- findByLastname -> simply query
- findUsersByLastname -> simple query
- findUsersDistinctByFirstname -> distinct query
- findDistinctUsersByFirstname -> distinct query
- findDistinctByLastname -> distinct query
Extracted ParameterAccessor interface that uses a simple Iterator<Object> to traverse over bindable parameters. Renamed SimpleParameterAccessor to ParametersParameterAccessor to better reflect its specialty (improved JavaDoc according to this as well).
Moved registration of PersistenceExceptionTranslationPostProcessor into JPA module as registering it for all repositories creates an unnecessary burden to repository implementations that to not need external exception translation but rather do it themselves already.
As we will deal with data stores not supporting transactions we should not activate transactions by default. For persistence technologies providing transaction support there's TransactionalRepositoryFactoryBeanSupport now, which pretty much contains the functionality that formerly resided in RFBS.
Note this required changes in the namespace as well. Concrete persistence technology specific namespaces now have to choose between repository-attributes or transactional-repository-attributes attribute group whereas the latter contains the transaction-manager-ref attribute.
The newly introduced Property class allows to find nested property paths by splitting up the raw property name along its camel case parts and trying to find a valid property for the actual type we resolve the property in. Once one is found it will use the rest of the string and try to build nested properties from it.
As factory implementations might have to inspect the actual repository interface to select a concrete repository implementation, we have to hand the interface to the methods returning the class and returning the actual object.
Minor tweaks to Parameter and Parameters to remove some JPA implications (1-based position indexes). Introduced PartTree abstraction that results from query parsing and allows simple API to traverse the query parts. Added AbstractQueryCreator to implement general traversing logic on PartTree and provide typed callback hooks for persistence technology specific creation of a criteria query.
Simplified creation of RepositoryQuery instances by changing the QueryLookupStrategy interface method to take a plain Method instead of a QueryMethod. This way we get rid of an indirection where subclasses have to implement two methods (one creating a QueryMethod, one returning the QueryLookupStrategy). Thus a QueryLookupStrategy is responsible for creating RepositoryQueries from a Method and using a QueryMethod is an implementation detail of QueryLookupStrategy implementations actually.
Extracted common functionality from project Hades to build a common infrastructure for generic repository implementations independent of the underlying persistence mechanism. Fixes DATACMNS-2, DATACMNS-3, DATACMNS-4, DATACMNS-5, DATACMNS-6, DATACMNS-8, DATACMNS-9.