Commit Graph

62 Commits

Author SHA1 Message Date
Oliver Gierke
e11efede4d DATACMNS-236, DATACMNS-117 - Added (Pageable|Sort)HanderMethodArgumentResolvers.
Added HandlerMethodArgumentResolver implementations for Pageable and Sort exposing a new default set of properties (page, size, sort) to resolve pagination and sorting information from the request. To mimic the legacy behavior we expose a (deprecated) LEGACY constant in PageableHandlerMethodArgumentResolver. Clients should move to the new properties structure ASAP. Added unit tests to verify old and new defaulting behavior.

Introduced new annotations @SortDefault (with @SortDefaults wrapper annotation) and @PageableDefault (superseding the legacy @PageableDefaults). The new annotations have more speaking attribute names and the HMAR implementations transparently alias the generic value attribute into a more semantic one (size).

The HMAR implementations implement Spring HATEOAS' UriComponentsContributor to be able to turn Pageable / Sort instances back into URIs created through the MethodLinkBuilderFactory API in Spring HATEOAS.

Extracted common API between legacy PageableArgumentResolver and PageableHandlerMethodArgumentResolver into common helper class.
Upgraded to Spring Hateoas 0.5.0.BUILD-SNAPSHOT.
2013-02-19 13:09:40 +01:00
Oliver Gierke
ed32d83ab3 DATACMNS-287 - Added missing package-info.java files. 2013-02-19 12:47:01 +01:00
Oliver Gierke
9fae10750e DATACMNS-286 - Extended Page/Pageable APIs.
Pageable and Page interfaces now expose API to easily access Pageables pointing to the previous and next Page instance if available.
2013-02-19 12:45:11 +01:00
Oliver Gierke
0aef8c60b7 DATACMNS-283 - MappingInstantiationException captures more context now.
If an exception occurs in ReflectionEntityInstantiator we now capture more context about the failed instantiation.
2013-02-15 18:34:56 +01:00
Oliver Gierke
e093aead13 DATACMNS-117 - Added PageableHandlerArgumentResolver.
Added PageableHandlerArgumentResolver to supersede the now deprecated PageableArgumentResolver. The latter still stays available for Spring 3.0.x based deployments. Updated reference documentation to mention the newly introduced type as well as possible configuration options.
2013-02-12 17:35:15 +01:00
Oliver Gierke
0bbf0aec99 DATACMNS-282 - Improved caching in AnnotationBasedPersistentProperty.
AnnotationBasedPersistentProperty now caches direct annotations on construction but still tries to lookup an annotation as meta-annotation if not found in cache on later requests. Extended try/catch block in AbstractMappingContext.addPersistentEntity(…) to invalidate cache on exceptions during property creation as well.
2013-02-11 15:56:14 +01:00
Oliver Gierke
1564704f0c DATACMNS-279 - Prepare release of version 1.5.0. 2013-02-07 13:53:47 +01:00
Oliver Gierke
80b6dd2217 DATACMNS-278 - Added Converter implementations for JodaTime types.
Upgraded to JodaTime 2.1 based on super pom property definition.
2013-02-06 17:49:24 +01:00
Oliver Gierke
3e40413ffe DATACMNS-275 - Introduced getObfuscatedPassword in UserCredentials. 2013-01-29 13:10:36 +01:00
Oliver Gierke
6b49eb4ca5 DATACMNS-276 - Added hashCode() to ParameterizedTypeInformation.
Implemented hashCode() to be as close as possible to the equals(…) implementation.
2013-01-29 13:07:44 +01:00
Oliver Gierke
f18055a4c9 DATACMNS-274 - Fixed package cycle in mapping subsystem.
Updated Sonargraph architecture description along the way.
2013-01-29 10:50:50 +01:00
Oliver Gierke
33a31a25e0 DATACMNS-271 - AnnotationBasedPersistentProperty now caches annotation lookups. 2013-01-28 14:28:12 +01:00
Oliver Gierke
3a72d56ee8 DATACMNS-266 - Fixed JavaDoc of Page and PageImpl.
Includes pull request #16.
2013-01-18 09:42:12 +01:00
Oliver Gierke
e9e8d4015d DATACMNS-265 - Fixed JavaDoc.
Essentially fixes pull request #22.
2013-01-18 09:33:21 +01:00
Oliver Gierke
afb5ec2ef9 DATACMNS-269 - Add support for mapping annotations on accessor methods.
Mapping annotations are now looked up in the following order: getter, setter, field. Made mapping annotations usable on methods as well.
2013-01-16 17:29:51 +01:00
Oliver Gierke
ac256f9921 DATACMNS-266 - Use new common Maven build infrastructure.
Simplified project setup to be a single module build again. Using Spring Data Build parent POM to simplify project setup. See https://github.com/SpringSource/spring-data-build#spring-data-build-infrastructure
2013-01-16 15:15:24 +01:00
Oliver Gierke
14815dca3a DATACMNS-192 - Updated changelog for 1.4.0.RELEASE. 2012-10-09 14:24:11 +02:00
Oliver Gierke
7cb77eb1db DATACMNS-217 - Updated changelog for 1.4.0.RC1. 2012-08-23 19:18:28 +02:00
Oliver Gierke
dc18fe2a12 DATACMNS-191 - Prepare changelog for 1.4.0.M1. 2012-07-23 18:36:02 +02:00
Oliver Gierke
5b1fe225b1 DATACMNS-204 - Prepare changelog for 1.3.2. 2012-07-23 17:46:18 +02:00
Oliver Gierke
ec87165c30 DATACMNS-149 - Updated changelog and pom.xml.
Fixed pom.xml to match requirements of Maven central.
2012-05-16 19:05:05 +02:00
Oliver Gierke
100d5b3953 DATACMNS-165 - Updated changelog for 1.3.0.RC2 release. 2012-05-02 20:57:14 +02:00
Oliver Gierke
5fe65bb28d DATACMNS-148 - Prepare 1.3.0.RC1 release.
Adapted changelog.
2012-04-16 09:23:40 +02:00
Oliver Gierke
9c112fa21a DATACMNS-131 - Prepare 1.3.0 M1 release.
Updated change log.
2012-02-03 12:09:26 +01:00
Oliver Gierke
5213eace28 DATACMNS-118 - Preparations for 1.2.0 release.
Updated changelog and version. Removed milestone repository and use Artifactory repository now.
2011-12-22 20:17:11 +01:00
Mark Pollack
ab4c6aa3bc update changelog 2011-12-06 16:59:58 -05:00
Thomas Risberg
c3e04eefea prepared for Spring Data Commons 1.2.0.M2 release 2011-10-21 16:16:15 -04:00
Thomas Risberg
2222e82f25 updated changelog for 1.2.0.M1 2011-09-01 20:09:14 -04:00
trisberg
4f90182607 updated changelog for 1.1.0.RELEASE 2011-07-21 11:59:42 -04:00
Oliver Gierke
4a61908561 Updated changelog for 1.1.0.RC1 release. 2011-07-19 17:37:43 +02:00
Thomas Risberg
9302ec49e3 updated changelog 2011-06-21 16:16:12 -04:00
Thomas Risberg
e7e51333a0 updated changelog 2011-06-02 08:45:01 -04:00
Oliver Gierke
369af0a12a Updated changelog. 2011-05-11 18:48:28 +02:00
Oliver Gierke
54ada02ae8 DATADOC-109 - Refactored mapping subsystem.
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.
2011-04-28 21:34:08 +02:00
Oliver Gierke
b6845e7310 DATACMNS-32 - Refactored Querydsl support code from JPA and Mongo module into core. 2011-04-20 20:38:20 +02:00
Mark Pollack
c2b8a1cf1a update changelog.txt to include information for M7, RC1 and 1.0.0 GA release 2011-04-20 11:47:59 -04:00
Oliver Gierke
3f22104c7c DATACMNS-30 - Made implementations of Page, Pageable and Sort serializable. 2011-04-20 17:18:57 +02:00
Thomas Risberg
06656ae062 preparing for 1.0.0.M6 2011-03-25 16:46:33 -04:00
Thomas Risberg
22243d05ce preparing for 1.0.0.M5 2011-03-23 19:44:27 -04:00
Oliver Gierke
b32e444749 Updated changelog. 2011-03-23 10:05:42 +01:00
Thomas Risberg
626d52e2c0 prepared for snapshot builds 2011-03-15 22:34:46 -04:00
Thomas Risberg
206e73d1ef preparing for M4 2011-03-15 22:28:27 -04:00
Oliver Gierke
83f8306656 DATACMNS-19 - Refactored return type for Repository.findAll(…) and according methods to return Iterable instead of List. 2011-03-11 18:58:48 +01:00
Oliver Gierke
d60f53e8f3 Added another change to changelog. 2011-03-11 18:32:39 +01:00
Oliver Gierke
7aeb6c3f5c Added recent changes to the changelog. 2011-03-11 18:27:49 +01:00
Oliver Gierke
cae2961275 DATACMNS-19 - Fixed PersistableEntityMetadata.
Added generics to PersistableEntityMetadata and let it being handed the actual domain class to return.
2011-03-02 09:03:25 +01:00
Oliver Gierke
20443bb4b6 DATACMNS-17 - Introduced metamodel for entities and repositories.
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.
2011-02-25 13:53:45 +01:00
Oliver Gierke
0721c7921c DATACMNS-16 - Added 'NotIn' keyword. 2011-02-23 10:23:09 +01:00
Oliver Gierke
aeee6935f5 DATACMNS-15 - Added support to discover Distinct keyword.
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
2011-02-21 19:07:22 +01:00
Thomas Risberg
f92aa4a2d8 preparing for M3 2011-02-09 16:44:15 -05:00