Commit Graph

458 Commits

Author SHA1 Message Date
Oliver Gierke
9d7b8ba5c6 DATACMNS-740 - Prepare 1.10.2.RELEASE (Fowler SR2). 2015-07-28 14:52:47 +02:00
Oliver Gierke
fc28369c66 DATACMNS-740 - Updated changelog. 2015-07-28 14:52:26 +02:00
Oliver Gierke
f2ab861686 DATACMNS-736 - Polishing.
Tweaked unit test to check for the correct wording. Polished DistanceFormatterUnitTests to actually run in a Maven build.

Original pull request: #134.
2015-07-21 16:52:26 +02:00
David Syer
a6e3f8ba12 DATACMNS-736 - Fixed validation error message in PointFormatter.
PointFormatter error message now states it's expecting comma separated values. Previously it erroneously reported expecting a semicolon.

Original pull request: #134.
2015-07-21 16:52:23 +02:00
Oliver Gierke
4eac82209b DATACMNS-733 - Made all references to DefaultParameterNameDiscoverer non-static.
To prevent classes from being garbage collected due to Class<?> references within DefaultParameterNameDiscoverer we no keep all ParameterNameDiscoverer instances in a non-static field.
2015-07-20 08:29:15 +02:00
Oliver Gierke
164e64bb15 DATACMNS-715 - Introduced support for JTA 2.1 @Transactional.
Refreshed the copy of AnnotationTransactionAttributeSource to pull in the JTA 2.1 support introduced in the Spring Framework class. Opened up a ticket [0] to improve Spring Framework to eventually be able to ditch the copies to prevent such scenarios in the future (the missing feature introduced that is).
2015-07-17 09:44:13 +02:00
Oliver Gierke
a9b9c72629 DATACMNS-723 - Updated changelog. 2015-07-01 09:54:05 +02:00
Oliver Gierke
cc6b298af6 DATACMNS-724 - Updated changelog. 2015-07-01 09:53:48 +02:00
Oliver Gierke
16cf0e9688 DATACMNS-725 - Prepare 1.10.1.RELEASE (Fowler SR1). 2015-06-30 12:31:52 +02:00
Oliver Gierke
1487be4efa DATACMNS-725 - Updated changelog. 2015-06-30 12:31:28 +02:00
Oliver Gierke
32d0c7fdb7 DATACMNS-706 - Updated changelog. 2015-06-30 12:01:08 +02:00
Oliver Gierke
fe3a682613 DATACMNS-713 - Disabled total adaption in PageImpl for empty pages.
The newly introduced adaption of the total in PageImpl must only be applied if the page accessed is not empty.
2015-06-30 11:08:22 +02:00
Oliver Gierke
d641f978bf DATACMNS-722 - ProxyProjectionFactory now deals with arrays.
We now handle primitive and non-primitive arrays in ProxyProjectionFactory. WE basically skip element projections for the former and correctly implement exactly that for the latter.
2015-06-25 14:05:34 +02:00
Oliver Gierke
88523b8da3 DATACMNS-720 - Improved disabling of default transactions.
When default transactions get disabled, we now still configure a TransactionInterceptor to make sure explicitly defined transactions are still applied. Previously the interceptor was not registered at all if default transactions were configured to be turned off and thus even explicitly declared transaction configuration was not considered.

Related tickets: DATACMNS-656.
2015-06-22 17:06:57 +02:00
Oliver Gierke
cbc9abccc5 DATACMNS-719 - Version now parses strings with non-numeric suffixes correctly.
Extended Version value object to correctly dump a non-numeric last segment of a version string to parse. Incorrect source version strings now raise an IllegalArgumentException better explaining the cause.

Related tickets: DATACMNS-496.
2015-06-22 11:33:46 +02:00
Oliver Gierke
b6990bbef6 DATACMNS-718 - Class loader improvements in ProxyProjectionFactory.
ProxyProjectionFactory now implements ResourceLoaderAware to be able to use the class loader used by the framework. SpringDataWebConfiguration now forwards the Application context as ResourceLoader through ProxyingHandlerMethodArgumentResolver into the target factory.
2015-06-19 13:06:04 +02:00
Oliver Gierke
5fe93b3980 DATACMNS-717 - AnnotatedTypeScanner now uses Environment and ResourceLoader configured.
We now implement EnvironmentAware and ResourceLoaderAware to respect the current environment setup when scanning for types. We use the ResourceLoader's ClassLoader if configured but indicate to fall back to the default one if none configured.
2015-06-18 17:45:01 +02:00
Thomas Darimont
5de42f25cc DATACMNS-716 - Allow collection executions with wrapper types as return values.
We now support collection executions in query derivation in combination with wrapper types like (Future, Optional) that wrap a collection, e.g. Future<List<User>>. Previously we used the "raw" return type which tricked our detection for Collection / Page / Slice executions.

Original pull request: #130.
2015-06-17 17:44:54 +02:00
Oliver Gierke
278aefc756 DATACMNS-715 - Repository factory now adds TransactionProxy interface if available.
We now leniently add the TransactionProxy marker interface to the repository proxy to opt-out of any further transaction handling potentially applied through @EnableTransactionManagement or its XML equivalent.

The interface will be introduced in Spring 4.1.7 / 4.2 RC2 so we're reflectively adding it if present. Might be something we can think of making less indirect for Fowler once 4.1.7 has been released.
2015-06-17 15:45:44 +02:00
Oliver Gierke
ae3b6f32a3 DATACMNS-710 - Polishing.
Some additional JavaDoc, deprecations, copyright headers.

Original pull request: #128.
2015-06-15 22:18:00 +02:00
Phillip Webb
cd566f357f DATACMNS-710 - Replace ObjectInstantiatorClassGenerator
Deprecate ObjectInstantiatorClassGenerator and provide a replacement
ClassGeneratingEntityInstantiator which doesn't retain a reference to
the context class loader.

Original pull request: #128.
2015-06-15 22:17:46 +02:00
Oliver Gierke
92b5a85cde DATACMNS-648 - Parameters now holds a non-static ParameterNameDiscoverer.
Turned the previously static ParameterNameDiscoverer into an instance variable to make sure the instance can be GCed correctly.
2015-06-15 18:09:36 +02:00
Oliver Gierke
a9ab9b708b DATACMNS-713 - PageImpl now adapts total if necessary.
On a last page the total handed into a PageImpl constructor might not necessarily fit the content as there's the change of an insertion or deletion between the calculated count and the retrieval of the content. We now leniently mitigate those differences if the page created is the last page of the result.

Related tickets: DATAJPA-728, DATACMNS-615.
2015-06-15 14:23:54 +02:00
Oliver Gierke
317452c876 DATACMNS-710 - ObjectInstantiatorClassGenerator now uses default class loader.
We're now using ClassUtils.getDefaultClassloader() to make sure we adhere to any class loading tricks the framework might impose for domain type instantiation.
2015-06-11 20:06:30 +02:00
阮杰锋
a9a2ac3779 DATACMNS-707 - Fixed typo in JavaDoc of CrudRepository
Changed from ( to { in JavaDoc of file CrudRepository.

Original pull request: #127.
2015-06-09 11:33:49 +02:00
Oliver Gierke
c48214c530 DATACMNS-569 - Fixed reference documentation on using underscores in property path expressions. 2015-06-04 12:03:42 +02:00
Oliver Gierke
dbd6a0a5f0 DATACMNS-697 - TypeDiscoverer now considers field-local generics information.
In case we create a ParameterizedTypeInformation for a property we now also analyze the field-local generics information and add the discovered type mappings to the type variable map.
2015-05-16 18:56:23 +02:00
Oliver Gierke
067312a2ef DATACMNS-695 - Fixed potential NullPointerException in AbstractMappingContext.getPersistentPropertyPath(…).
When traversing nested property paths, AbstractMappingContext.getPersistentPropertyPath(…) previously used the raw actual property type. If the property path contains a reference to a generically typed property, this causes the deeper paths not being resolved correctly.

We now explicitly use the TypeInformation of the property to retain generics information while traversing the path.
2015-05-13 18:34:06 +02:00
Oliver Gierke
0da2a4c12f DATACMNS-692 - Fixed web parameter range handling for Pageables.
In case the PageableHandlerMethodArgumentResolver was configured to use one-indexed parameters, it wasn't defaulting the lower bounds for the page number. This caused indexes out of the allowed bound submitted causing an invalid index handed tor PageRequest. We now apply better range shifting before the bounds are applied.
2015-05-13 18:01:00 +02:00
Tomasz Wysocki
085238b44b DATACMNS-693 - AbstractMappingContext now uses Spring's BeanUtils to lookup PropertyDescriptors.
Instead of manually using Introspector.getBeanInfo(…) we now use Spring's BeanUtils.getPropertyDescriptors(…) to benefit from some caching of descriptor instances as well as advanced support for fluent setters, default methods etc.

Original pull request: #122.
2015-05-13 13:23:08 +02:00
Oliver Gierke
d0928181c6 DATACMNS-689 - Improved reference documentation on web pagination.
Re-added index and defaulting information to the section that documents the currents state of web pagination. Removed legacy pagination sections as they're not really documenting the very legacy support (that would not even work anymore).

Added explicit anchors where missing.
2015-05-07 10:44:37 +02:00
Oliver Gierke
2ead9bcc60 DATACMNS-687 - Added section on dependency management to reference docs.
Added a dedicated dependencies.adoc that outlines the usage of the Spring Data release train BOM as well as the way one would customize the release train to be used with Spring Boot.

Also, we now explicitly list the Spring Framework version the release requires.
2015-05-04 14:23:58 +02:00
Thomas Darimont
19b843073e DATACMNS-682 - Add details of how to customize repository scanning using JavaConfig.
Completed description for the packages-to-scan customization with JavaConfig.

Original pull request: #121.
2015-04-16 12:08:54 +02:00
Oliver Gierke
38dbfbf3fb DATACMNS-683 - Tweaked the matching algorithm for DomainClassConverter.
DomainClassConverter as well as its internal ToEntity- and ToIdConverter implementations now actively refrain from matching if the source type is assignable to the target one to prevent unnecessary conversion attempts if the source value already actually is assignable to the target type.

Related ticket: DATACMNS-583.
2015-04-13 17:41:16 +02:00
Oliver Gierke
ab8210850b DATACMNS-681 - Removed some compiler warnings.
Removed unused constants.
2015-04-13 13:06:54 +02:00
Oliver Gierke
f16f2d8156 DATACMNS-677 - AnnotationBasedPersistentProperty now caches absence of annotations on accessor-only properties.
AnnotationBasedPersistentProperty now also caches the absence of properties that are expressed through accessors only. Previously the absence of a field caused us to skip the registration of the absence in the cache.
2015-04-07 08:44:48 +02:00
Arlo Louis O'Keeffe
7f46580343 DATACMNS-674 - Fixed typo in reference documentation. 2015-04-01 15:25:50 +02:00
Oliver Gierke
cd69ceb1a4 DATACMNS-663 - Fixed typo in BytecodeGeneratingEntityInstantiator. 2015-03-27 12:53:46 +01:00
Oliver Gierke
2cba292686 DATACMNS-662 - Prepare 1.10.0.RELEASE (Fowler GA). 2015-03-23 12:08:20 +01:00
Oliver Gierke
be4245061b DATACMNS-662 - Updated changelog. 2015-03-23 12:03:52 +01:00
Thomas Darimont
6f7d8489bf DATACMNS-654 - Polishing.
Added missing documentation for geospatial return types.
Fixed typo in GeoResult JavaDoc.
2015-03-23 11:13:36 +01:00
Oliver Gierke
51b155c0a8 DATACMNS-654 - Polishing.
Removed obsolete line-breaks in repositories documentation. Replace TWR worth with less ambiguous try-with-resources. Slight rewording. A few more details and fixed use of monospace font in return type reference.

Original pull request: #119.
2015-03-21 18:27:17 +01:00
Thomas Darimont
3a02d6f14e DATACMNS-654 - Documented usage of Java 8 Streams in repositories.
Added section to repository documentation on how to use streams. Added an overview table for the generally supported return types for query methods.

Original pull request: #119.
2015-03-21 18:09:18 +01:00
Oliver Gierke
5487395397 DATACMNS-661 - Polishing.
Removed the ability to configure a custom SpElExpressionParser for now as it's not really part of the performance optimization. Polished assertions in SpelEvaluatingMethodInterceptor.

Original pull request: #118.
2015-03-19 18:57:20 +01:00
Thomas Darimont
0cf395c1b1 DATACMNS-661 - Improvements in SpelAwareProxyProjectionFactory.
We now allow a SpelExpressionParser to be configured on the SpelAwareProxyProjectionFactory. This parser is then passed on to SpelEvaluatingMethodInterceptor. We also now eagerly pre-parse any SpEL expression in @Value annotations on methods of the projection interface. This avoids repeated evaluations during the actual method invocations.

Original pull request: #118.
2015-03-19 18:57:19 +01:00
Oliver Gierke
537fc430a9 DATACMNS-660 - Web configuration support now picks up configuration annotated with @SpringDataWebConfigurationMixing.
Introduced @SpringDataWebConfigurationMixing that can be used on configuration classes that are supposed to contribute components to the Application context when @EnableSpringDataWebSupport is used.

SpringDataWebConfigurationImportSelector scans the org.springframework.data package for classes annotated with that annotation and adds them to the classes to be considered config classes.
2015-03-17 17:08:31 +01:00
Oliver Gierke
d7adfbd859 DATACMNS-656 - Make application of default transactions configurable on TrasnactionalRepositoryFactoryBeanSupport.
TrasnactionalRepositoryFactoryBeanSupport now exposes a setEnableDefaultTransactions(…) which, if disabled, causes the TransactionalRepositoryProxyPostProcessor not to be registered and thus no default transactions to be applied.

Related tickets: DATAJPA-685.
2015-03-10 19:18:28 +01:00
Oliver Gierke
57180568c5 DATACMNS-655 - Invoking default methods on projection proxies now works.
Extracted DefaultMethodInvokingMethodInterceptor from RepositoryFactorySupport and register it within ProxyProjectionFactory if the code is running on Java 8.

Original pull request: #117.
2015-03-10 11:47:12 +01:00
Oliver Gierke
b0cc811381 DATACMNS-652 - Prepare 1.10.0.RC1 (Fowler RC1). 2015-03-05 17:14:28 +01:00
Oliver Gierke
f40e44e515 DATACMNS-652 - Updated changelog. 2015-03-05 17:14:27 +01:00