Introduced an @RepositoryProxy annotation that can be used as alternative to extending Repository. Added necessary RepositoryMetadata implementation to introspect the annotation rather than the generic types. Enabled bean definition parsers to pick up annotation based repositories as well.
This change allows creating repository proxies without exposing CRUD methods at the same time. This essentially enables query-method-only repository interfaces.
Added custom TransactionAttributeSource that favors interface transaction configuration over the implementation configuration. This allows us configuring repository implementations with @Transactional but allow overriding this configuration at the user's repository level as well.
We now assume scanning for all sub-interfaces of Repository by default now. Thus concrete modules can pretty much drop the implementation of this method in their concrete config implementations in case they support picking up user's repository interfaces that extend Repository only.
From a users perspective this drops the requirement to extend a persistence technology specific interface (MongoRepository, JpaRepository and the like).
Algorithm is now was follows:
1. If there's no explicit constructor use the default constructor.
2. If there's a single explicit constructor, use this one.
3. If there's multiple explicit constructors and one has been annotated with @PersistenceConstructor use the annotated one.
4. If there's multiple explicit constructors and none annotated use the no-arg one or throw an exception to resolve the ambiguity.
Test cases for that algorithm are located in PreferredConstructorDiscovererUnitTests. Refactored PreferredConstructor and Parameter classes a little to make them immutable value objects. Introduced ability to lookup parameter TypeInformation for constructors on TypeInformation interface.
Extended generics in mapping subsystem to allow defining a concrete subtype of PersistentProperty as well. Removed some generics related compiler warnings as well.
Unfortunately the beta version numbers of Querydsl are not OSGi compatible so that we have to maintain the version number in template.mf manually. Updated version of APT Maven plugin to 1.0.1.
Refactored BasicMappingContext into AbstractMappingContext that now only contains the general algorithm to build PersistentEntity and PersistentProperty instances. The algorithm delegates to two template methods that are responsible for instantiating concrete implementations of those classes.
Extracted an AnnotationBasedPersistentProperty that now contains all annotation references so that AbstractPersistentEntity does not take annotations into account in the first places. BasicPersistentEntity now does PreferredConstructor lookup as well.
Removed unnecessary methods from MappingCOntext and PersistentEntity interface. Added a verify() method to BasicPersistentEntity that AbstractMappingContext calls to verify validity of the entity. This will be used by the Mongo module for example to make sure @Document annotated entities have an @Id property.
Refactored getValueAnnotation() to getSpelExpression() to not imply we're using annotations in every case.
Added shortcut in TypeDiscoverer.createInfo(…) to prevent endless loop in case a type has a field of it's very same type.
TypeDiscoverer now returns the plain compound type for arrays now, which means you get String for String[], String[][] and so on. Opened up signature of AbstractMappingContext.setInitialEntitySet(…) to allow effortless programatic invocation.
Extracted basic information from RepositoryInformation into RepositoryMetadata to limit the amount of API being exposed to RepositoryFactorySupport implementations. getRepositoryBaseClass(…) can thus now take a RepositoryMetadata.
Method is not abstract anymore but rather returns null by default. Adapted QueryExecutionMethodInterceptor to handle the null case appropriately by simply skipping the query lookup. It also throws an exception if the repository has query methods defined nonetheless to prevent exceptions at runtime.