Commit Graph

941 Commits

Author SHA1 Message Date
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
Greg Turnquist
3925912364 DATACMNS-696 - Enable Slack notifications for Travis build.
Original pull request: #123.
2015-05-15 12:25:38 +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
Oliver Gierke
efacb05bbf DATACMNS-694 - Removed <relativePath /> element from parent POM declaration. 2015-05-13 14:41: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
0be7545874 DATACMNS-691 - Removed Travis build profile for Spring 4.0.next. 2015-05-12 16:28:27 +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
bdc9d9be2b DATACMNS-679 - Updated Sonargraph architecture description. 2015-04-13 13:07:34 +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
65ced0811f DATACMNS-662 - After release cleanups. 2015-03-27 12:34:31 +01:00
Spring Buildmaster
54ffd76f30 DATACMNS-662 - Prepare next development iteration. 2015-03-27 12:34:04 +01:00
Spring Buildmaster
49981eb385 DATACMNS-662 - Release version 1.10.0.RELEASE. 2015-03-23 04:19:56 -07: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
ff25e3375d DATACMNS-652 - After release cleanups. 2015-03-05 19:47:25 +01:00
Spring Buildmaster
f5ad5b9571 DATACMNS-652 - Prepare next development iteration. 2015-03-05 08:23:40 -08:00
Spring Buildmaster
5eb6fe2d2f DATACMNS-652 - Release version 1.10.0.RC1. 2015-03-05 08:23:38 -08: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
Oliver Gierke
e2a7057af9 DATACMNS-652 - Removed JDK 8 reference from TypeDiscoverer.
Removed accidentally introduced reference to JDK 8's Executable as common super type of Constructor and Method.
2015-03-05 17:14:27 +01:00
Oliver Gierke
156cb4419a DATACMNS-652 - Upgraded to Spring HATEOAS 0.17.0.RELEASE. 2015-03-05 10:40:21 +01:00
Oliver Gierke
2d75cf2c43 DATACMNS-651 - Introduced a Range value type.
Primarily intended to be used with Distance instances, we introduce a Range value type. Distance now has factory methods to create Range instances between two distances. To support this, Distance now implements comparable based on the normalized value of it.

Tiny refactoring in TypeDiscoverer to avoid code duplication between the lookup of parameter type information for constructors and methods.
2015-03-04 17:34:32 +01:00
Oliver Gierke
186cb25605 DATACMNS-650 - Polishing.
Added stream to the list of supported query method prefixes. Allow Stream to be used as return type for paginating queries, too.

Renamed Java8StreamUtils to StreamUtils. Some additional JavaDoc.

Original pull request: #116.
2015-03-03 18:10:40 +01:00
Thomas Darimont
e92c235fdf DATACMNS-650 - Introduced CloseableIterator abstraction as a foundation for streaming of results.
A CloseableIterator abstracts the underlying result with support for releasing the associated resources via close() which can be transparently be used with try-with-resources in Java 7 since Closeable implements AutoCloseable from Java 7 on upwards. Added detector methods to QueryMethod to check whether the current method returns a Stream. 

Introduced ReflectionUtils.isJava8StreamType to safely detect whether the given type is assignable to a Java 8 Stream. Introduced CloseableIteratorDisposingRunnable that can be registered as a cleanup action on a Stream.

Original pull request: #116.
2015-03-03 16:08:00 +01:00
Oliver Gierke
64db95fb1e DATACMNS-649 - Fixed detail in reference docs on extending all repositories.
The custom factory created to extend all repositories with additional behavior needs to return the type of the custom repository base class from getRepositoryBaseClass(…) to make sure the infrastructure can use it to inspect the CRUD methods correctly. Previously the documentations showed an interface being returned.

Code formatting in the example and inline code highlighting.
2015-02-24 16:34:40 +01:00
Thomas Darimont
ec643d21cb DATACMNS-554 - Added QueryDslPredicateExecutor.findAll(Predicate, Sort).
We now support findAll on QueryDslPredicateExecutor that accepts a Querydsl Predicate and a Sort.

Original pull request: #115.
2015-02-24 09:40:16 +01:00
Oliver Gierke
950e0d3b7d DATACMNS-647 - Added test case for collection parameter invocation of query method through ReflectionRepositoryInvoker.
Added test cases to make sure that request parameters both in separate values (i.e. ?ids=1&ids=2) as well as comma separated ones (i.e. ?ids=1,2) are translated into a Collection correctly.

Related ticket: spring-hateoas/#280.
2015-02-10 20:12:47 +01:00
Oliver Gierke
32036d7fdb DATACMNS-646 - Enable Spring 4.2 build profile for Travis. 2015-02-10 16:57:25 +01:00
Arlo Louis O'Keeffe
f1057205c2 DATACMNS-645 - Fix typo in reference documentation.
Original pull request: #113.
2015-02-10 11:33:40 +01:00
Oliver Gierke
0c65c7bb67 DATACMNS-638, DATACMNS-643 - Support for JSR-310 and ThreeTen datetime types.
Extend AuditableBeanWrapper to allow access to the last modification date of a target object. Made AuditableBeanWrapperFactory an interface and renamed what’s been previously known under this name as DefaultAuditableBeanWrapperFactory.

The components previously relying on a MappingContext to lookup a PersistentEntity now use PersistentEntities to be able to back a collection of MappingContexts behind that and also avoid unmanaged types to be added to the MappingContext.

We now also register the JSR-310 and ThreeTen back-port converters with the ConversionService to be able to get and set auditing dates as these types.
2015-02-04 19:30:02 +01:00