The added custom simple types will be considered in the decision whether to recursively add PersistentEntities. This does not feel quite right for now as for a complete setup we now have to register converters in the MappingMongoConverter *and* add the custom type to the list here. Open for discussion.
Fixed isAssignableFrom(…) usage in BasicPersistentProperty to correctly detect collections and maps. Let MappingBeanHelper treat enums as simple types as well.
Added TypeInformation interface and infrastructure to discover generic types given a basic type that binds generic types. Starting from that you can then traverse TypeInformations for fields by calling getProperty(…). A subsequent call to getType() will then return the resolved type.
Adapted the Basic mapping infrastructure to accomodate the TypeInformation interfaces where necessary. In most cases it was just about using TypeInformation instead of class as we have to keep track of the parent types that (in case of a generic field) determine the actual type of sub fields. BasicMappingContext is now using the TypeInformation instance created for PersistentEntity as key for the cache. This is necessary as generic types (e.g. Foo<T>) might be used inside different entities that type T to something different.
Created isMap() and isArray() on PersistentProperty to align to isCollection().
The PersistentProperty interface now has a isIdPropertyMethod(). Subclasses might alter it to support further id property detection mechanisms. Added missing import in BasicPersistentProperty.
Spring already contains functionality to to something with all fields of
a class including all fields from superclasses. Refactored the field
collecting code to use this.
Added DomainClassPropertyEditor and DomainClassConverter to automatically bind domain classes to Spring MVC controller methods. Same applies to PageableArgumentResolver. Polished up some generics.
Introduced RepositoryFactoryInformation interface being implemented by RepositoryFactorySupport that allows the extension components to get access to the raw factories, access EntityInformation of it and then find out about the repository interface to lookup the actual repository instance.
Added Milestone repository to aspects module to find AspectJ 1.6.11.M2. Reduced logging dependencies to test scope, altered two classes to use SLF4J instead of Commons logging. Use Log4J 1.2.16 as this does not require explicit excludes for mail, JMS and JMX anymore.
Introduced QueryCreationListener that allows plugging in functionality after a query was created.
Heavily refactored QueryMethod and RepositoryQuery subsystem. Splitted up simple EntityMetadata (domain class and potentially other stuff) from the more advanced methods like getId(Object) and isNew(…). QueryMethod now carries a type enum that allows switching over it to determine the execution. Beyond that QueryMethod now returns a EntityMetadata rather than a plain class.
RepositoryQuery in turn exposes the query method. PartTree allows iterating over all contained Parts as well now. Introduced AbstractEntityInformation that regards an entity as new if its id is null. Simplified handling of RepositoryProxyPostProcessors and aligned them to QueryCreationListener handling.
AbstractQueryCreator now uses the Sort object from the parameters if the PartTree not already contains a Sort object (which got there due to a OrderBy directive in the method name).
Unified IsNewAware and IdAware to EntityMetadata. Refactored base repository support to use this abstraction. Introduced RepositoryMetadata and DefaultRepositoryMetadata implementation to capture all the additional information that we need around a repository interface. Adapted factory API to use this abstraction. Opened up method parameter and return types to prepare enabling the usage of the infrastructure for interfaces that do not extend Repository interface.
Lazily initializing the IsNewAware on first access now as classes implementing the method might wanna delegate to a template method using a constructor parameter. If createIsNewStrategy(…) is called from our constructor already the subclasses additional constructor arguments are not available yet.
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.