Commit Graph

987 Commits

Author SHA1 Message Date
Oliver Gierke
dbfbc4899c DATACMNS-786 - Fixed typo in section of repository populators in reference documentation. 2015-11-20 17:39:56 +01:00
Oliver Gierke
8b6c94f0bb DATACMNS-784 - Updated changelog. 2015-11-16 08:25:45 +01:00
Oliver Gierke
f7bc972c93 DATACMNS-783 - DefaultTypeMapper now specializes raw generic types.
If the type lookup from the store source returns a raw generic type (e.g. resolving the value of a generic property against a value of that generic type - i.e. not a more concrete type binding the generic information) in the context of a generic property, we previously did not apply the generics information of the contextual instance to that very raw type.

We now expose a TypeInformation.specialize(ClassTypeInformation) which applies the current generics context to the given raw type and basically creates a synthetic parameterized TypeInformation instance.

DefaultTypeMapper applies this specialization by default now with ClassTypeInformation simply returning the given type as is so that we don't create any resolution overhead in case no generics are involved in the first place.
2015-11-13 17:17:23 +01:00
Oliver Gierke
48b3ebf4b8 DATACMNS-782 - ProxyProjectionFactory now converts primitive attribute values.
The ProjectingMethodInterceptor now uses a default ConversionService instance to try to convert a potentially not matching result of the target invocation into the type the projection requires before the attempt to create nested projection.
2015-11-12 11:18:54 +01:00
Oliver Gierke
50d38eba5c DATACMNS-777 - Updated changelog. 2015-10-14 13:42:38 +02:00
Oliver Gierke
ee2c4c6420 DATACMNS-769 - Fixed assignability check for from QueryMethod.
The assignability check of method return types now explicitly detects wrapper types supported in QueryExceutionConverters and automatically unwraps those before the actual check.
2015-10-05 18:45:22 +02:00
Ricardo Espirito Santo
bd628a006b DATACMNS-771 - Fixed typo in BasicPersistentEntity.
Original pull request: #145.
2015-10-05 18:32:16 +02:00
Oliver Gierke
19ab5ee1f5 DATACMNS-753 - Fixed default handling of empty sort parameter.
We now correctly inspect the sort parameter values and also fall back to the default if a single, empty parameter value is given.

Related ticket: DATACMNS-408.
Related pull request: #138.
2015-09-09 17:57:18 +02:00
Ruben Dijkstra
a8aba16460 DATACMNS-753 - Added test case to see parsing of Sort is not considering defaults for empty parameter.
Related ticket: DATACMNS-408.
Original pull request: #138.
2015-09-09 17:57:18 +02:00
Oliver Gierke
954e6b0856 DATACMNS-762 - Polished section on dependencies in reference documentation.
Linked back to the release train names from the section on dependency management with Boot for clarity. Added additional line break to avoid the first line in the repositories.adoc being interpreted as text.
2015-09-03 18:14:56 +02:00
Oliver Gierke
835a5a305f DATACMNS-761 - Fixed page size detection for a PageableHandlerMethodArgumentResolver configured to one-indexed parameters. 2015-09-02 16:15:58 +02:00
Oliver Gierke
f696cdc1b5 DATACMNS-759 - Updated changelog. 2015-09-01 12:26:22 +02:00
Oliver Gierke
dc38da86d8 DATACMNS-755 - Fixed QSort property translation for plain paths.
If standard Querydsl StringPaths are used without any reference to a query class tree, we previously dropped the first segment of the path expression.

Moved to a completely different algorithm to determine the path by just using the Path's toString() representation and the root removed if necessary.
2015-08-18 13:54:41 +02:00
Martin Grigorov
f47f65279f DATACMNS-754 - Fixed code sample in repositories reference documentation.
PersonRepository example now shows Person persisted instead of User instances.

Original pull request: #140.
2015-08-17 18:14:16 +02:00
Oliver Gierke
bbfd6266ae DATACMNS-750 - Fixed part creation in query methods that have keywords in property paths.
If a keyword was contained in a complex property path (like In in SomeInfo), the property path was invalidly cut of in the middle. We now simply use the length of the keyword to extract the actual property from the candidate. This should be faster anyway as it doesn't require another lookup of the pattern in the source candidate.

Related pull request: #136.
2015-08-13 12:41:03 +02:00
Oliver Gierke
3014ee2f58 DATACMNS-749 - RepositoryFactorySupport now registers global ExposeInvocationInterceptor.
This frees RepositoryProxyPostProcessors from having to register the interceptor manually and thus prevents it from being registered multiple times.
2015-08-08 10:59:34 +02:00
Oliver Gierke
7b16798013 DATACMNS-746 - Improved JavaDoc of PersistentPropertyAccessor.
The JavaDoc of PersistentPropertyAccessor now explicitly hints to PersistentEntity.getPropertyAccessor(…) to make obvious how instances of it can be obtained.
2015-08-07 16:16:43 +02:00
Oliver Gierke
47dcca983e DATACMNS-742 - Updated changelog. 2015-08-04 14:37:58 +02:00
Oliver Gierke
fd8ddb989c DATACMNS-740 - After release cleanups. 2015-07-28 16:28:33 +02:00
Spring Buildmaster
4048efa4ab DATACMNS-740 - Prepare next development iteration. 2015-07-28 06:22:15 -07:00
Spring Buildmaster
5fc096d2d4 DATACMNS-740 - Release version 1.10.2 (Fowler SR2). 2015-07-28 06:22:13 -07:00
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
40cf4c6346 DATACMNS-728 - Added execution of build against Spring 4.2 for Travis. 2015-07-09 17:58:09 +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
924e24025a DATACMNS-725 - After release cleanups. 2015-06-30 14:20:10 +02:00
Spring Buildmaster
099ea33525 DATACMNS-725 - Prepare next development iteration. 2015-06-30 03:45:08 -07:00
Spring Buildmaster
79007c7ebc DATACMNS-725 - Release version 1.10.1 (Fowler SR1). 2015-06-30 03:45:05 -07: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