Commit Graph

1363 Commits

Author SHA1 Message Date
Oliver Gierke
aadeebbb7d DATACMNS-1271 - Streamlined implementation of AnnotationBasedPersistentProperty to avoid NullPointerExceptions.
Java 6 compatible backport of 78d21327 and 7e7d4baa.
2018-03-02 11:08:34 +01:00
Mark Paluch
ce27abfff3 DATACMNS-1262 - Updated changelog. 2018-02-28 11:17:36 +01:00
Oliver Gierke
a09d6379e6 DATACMNS-1264 - MapDataBinder now rejects improper property expressions.
We now make sure that type expressions cannot be used in SpEL expressions handled by MapDataBinder. They're gonna be rejected by considering the property not writable. SpEL expression evaluation errors are now forwarded as NotWritablePropertyException to make sure the failure gets handled as if the property referred to doesn't exist.
2018-02-26 21:43:54 +01:00
Mark Paluch
ef88861852 DATACMNS-1250 - Updated changelog. 2018-02-19 20:30:04 +01:00
Christoph Strobl
0e3e0e9386 DATACMNS-1186 - Updated changelog. 2018-02-06 11:13:54 +01:00
Oliver Gierke
480294bb5c DATACMNS-1252 - Improved Vavr collection handling to convert between collection types.
If a query method now uses e.g. a Vavr Set as return type, we now also use a potential source List as input for the LinkedHashSet, even if that changes the characteristics (duplicate policy etc.) of the result. This is consistent with our general handling of collections as we're using a Spring ConversionService for collection mapping anyway.

In general the new conversion algorithm is driven by the expected target type first:

- i.v.c.Seq -> i.v.c.List
- i.v.c.Set -> i.v.c.LinkedHashSet
- i.v.c.Map -> i.v.c.LinkedHashMap

If none of the declared types is assignable we fall back to the previous algorithm choosing an implementation as close as possible to the original source value:

- j.u.List -> i.v.c.List
- j.u.Set  -> i.v.c.LinkedHashSet
- j.u.Map  -> i.v.c.LinkedHashMap

Applied the same fixes to the deprecated Javaslang support. Removed some obsolete full qualifications of types.
2018-02-03 21:44:05 +01:00
Oliver Gierke
cb549e6f58 DATACMNS-1243 - Polishing.
Imports and author tags.

Original pull request: #268.
2018-02-01 11:02:49 +01:00
Jens Schauder
63577569bd DATACMNS-1243 - Add converters from LocalDateTime to Instant and back.
This allows usage of Instant for AuditAware.

Original pull request: #268.
2018-02-01 11:02:43 +01:00
Mark Paluch
796ae8543d DATACMNS-1220 - Updated changelog. 2018-01-24 13:41:22 +01:00
Mark Paluch
e9eacfceca DATACMNS-1249 - Fix line endings to LF. 2018-01-24 12:25:17 +01:00
Mark Paluch
d43274edfd DATACMNS-1219 - After release cleanups. 2018-01-24 12:08:50 +01:00
Mark Paluch
81c1d129af DATACMNS-1219 - Prepare next development iteration. 2018-01-24 12:08:50 +01:00
Mark Paluch
8ddb7cefe1 DATACMNS-1219 - Release version 1.13.10 (Ingalls SR10). 2018-01-24 12:08:50 +01:00
Mark Paluch
2fe0d62250 DATACMNS-1219 - Prepare 1.13.10 (Ingalls SR10). 2018-01-24 12:08:50 +01:00
Mark Paluch
2156578f06 DATACMNS-1219 - Updated changelog. 2018-01-24 12:08:46 +01:00
Oliver Gierke
69cb5c6653 DATACMNS-1246 - Minor optimization in QueryExecutorMethodInterceptor.
We now prevent the superfluous creation of a MethodParameter and TypeDescriptor instance in repository method execution in case the value to be returned already is an instance of the expected method return type.
2018-01-18 17:27:57 +01:00
Marcel Overdijk
7c0ec77e40 DATACMNS-563 - PagedResourcesAssembler now correctly forwards one-index settings to PageMetadata.
Original pull request: #267.
2017-12-30 12:12:59 +01:00
Oliver Gierke
9a5cd29e3c DATACMNS-1238 - Optimize setting Environment on ClassPathScanningCandidateComponentProvider.
In CustomRepositoryImplementationDetector, we now immediately hand the Environment to the constructor of ClassPathScanningCandidateComponentProvider instead of setting it afterwards. This prevents a default StandardEnvironment from being created in the previously used constructor.
2017-12-30 11:39:05 +01:00
Oliver Gierke
2985ff31ac DATACMNS-1237 - Register additional ProxyingHandlerMethodArgumentResolver as first resolver.
We now deploy a custom BeanPostProcessor to customize RequestMappingHandlerAdapter instances by prepending a ProxyingHandlerMethodArgumentResolver (requiring a @ModelAttribute) to the list of resolved HandlerMethodArgumentResolvers to make sure the settings defined in the annotation are applied but the projecting way of data binding is still used.
2017-12-20 22:22:53 +01:00
Oliver Gierke
91954e1f0d DATACMNS-1229 - Upgrade to XmlBeam 1.4.14. 2017-12-01 15:21:13 +01:00
Oliver Gierke
8972d4b8bc DATACMNS-1227 - Polishing. 2017-12-01 13:50:47 +01:00
Oliver Gierke
0cbe0da3db DATACMNS-1227 - Add documentation section about JSONPath- and XPath-based web data binding. 2017-12-01 13:50:47 +01:00
Mark Paluch
050a818c71 DATACMNS-1202 - Updated changelog. 2017-11-27 16:43:42 +01:00
Mark Paluch
fc61460738 DATACMNS-1195 - After release cleanups. 2017-11-27 15:56:39 +01:00
Mark Paluch
81c6ccbe87 DATACMNS-1195 - Prepare next development iteration. 2017-11-27 15:56:37 +01:00
Mark Paluch
53116d64e3 DATACMNS-1195 - Release version 1.13.9 (Ingalls SR9). 2017-11-27 15:17:06 +01:00
Mark Paluch
d519028ccd DATACMNS-1195 - Prepare 1.13.9 (Ingalls SR9). 2017-11-27 15:16:09 +01:00
Mark Paluch
81153c1236 DATACMNS-1195 - Updated changelog. 2017-11-27 15:16:00 +01:00
Oliver Gierke
c7edaa7ee6 DATACMNS-1218 - Upgraded to Vavr 0.9.2. 2017-11-24 23:09:00 +01:00
Oliver Gierke
3765feb917 DATACMNS-1158 - ProjectionFactory is now configurable by module implementations.
Introduced RepositoryFactorySupport.getProjectionFactory(…) to create a ProjectionFactory to be used for repository instances created. The default implementation uses the SpelAwareProxyProjectionFactory.

The ProjectionInformation implementation is now a named class so it can be used for more specialized implementations.

Original pull request: #243.
Related issue: DATAJPA-1173.
2017-11-24 11:20:35 +01:00
Oliver Gierke
e79d70cb13 DATACMNS-1215 - Fixed repository lookup for proxy domain classes.
We now consistently use the user class for repository (metadata) lookup in Repositories.
2017-11-17 10:16:59 +01:00
Oliver Gierke
6199fed1c1 DATACMNS-1214 - Fixed AbstractMappingContext.getPersistentEntity(PersistentProperty) to now return null for non-entities.
Previously, a call to AbstractMappingContext.getPersistentEntity(PersistentProperty) would've added potentially leniently added the type of the given PersistentProperty, no matter whether it's actually considered to be an entity in the first place. We now defensively check for whether the given property is to be considered an entity (taking potentially registered converters into account) before the potentially entity-creating by-type lookup.
2017-11-16 16:34:31 +01:00
Oliver Gierke
b07d7a1064 DATACMNS-1185 - Updated changelog. 2017-10-27 16:36:43 +02:00
Oliver Gierke
5edcdefe58 DATACMNS-1180 - Polishing.
Avoid premature resolution of type in TypeDiscoverer.createInfo(…) and thereby simplify constructor in ParameterizedTypeInformation.
2017-10-26 23:35:28 +02:00
Oliver Gierke
ce8d923382 DATACMNS-1180 - Fixed accessor lookup for generic properties.
In AbstractPersistentProperty, we now resolve the potentially generic return and parameter types of getters and setters.
2017-10-26 23:35:22 +02:00
Mark Paluch
14a56dee00 DATACMNS-1201 - Support generated property accessors for types in default packages.
We now support generated property accessors for types that reside in the default package.

Original pull request: #256.
2017-10-25 09:36:43 +02:00
Oliver Gierke
d0d0d72c98 DATACMNS-1196 - Fixed generics lookup for nested generics in ParameterizedTypeInformation.
We now eagerly resolve a generics declaration chain, which we previously - erroneously - expected GenericTypeResolver to do for us. Simplified TypeVariableTypeInformation implementation. Renamed ParameterizedTypeUnitTests to ParameterizedTypeInformationUnitTests.
2017-10-12 18:19:15 +02:00
Oliver Gierke
91fd1a4caf DATACMNS-1155 - After release cleanups. 2017-10-11 19:00:14 +02:00
Oliver Gierke
000596f8d7 DATACMNS-1155 - Prepare next development iteration. 2017-10-11 19:00:09 +02:00
Oliver Gierke
73f4ff3dcf DATACMNS-1155 - Release version 1.13.8 (Ingalls SR8). 2017-10-11 16:42:42 +02:00
Oliver Gierke
a46757efb9 DATACMNS-1155 - Prepare 1.13.8 (Ingalls SR8). 2017-10-11 16:41:07 +02:00
Oliver Gierke
21cdbe8b58 DATACMNS-1155 - Updated changelog. 2017-10-11 16:40:54 +02:00
Oliver Gierke
b7a9b09b7c DATACMNS-901 - AbstractMappingContext publishes entity added events outside the write lock.
Previously, the publication of the event that indicated a PersistentEntity having been added to it took place before the write lock over the entities had been released. We now keep the lock smaller and publish the addition event *after* the lock has been released.
2017-10-10 16:35:44 +02:00
stonio
38d39a47e9 DATACMNS-1193 - Fixed typo in JavaDoc and reference documentation of PageableDefaults.
Original pull request: #218.
2017-10-10 11:51:14 +02:00
Mark Paluch
c634199b7c DATACMNS-1156 - Updated changelog. 2017-10-02 11:41:21 +02:00
Oliver Gierke
cd1efe45fd DATACMNS-1182 - Reinstantiate Java 6 compatibility of QueryExecutionConverters.
Replace reference to JDK 8's Stream through lenient reflection lookup.
2017-10-01 18:36:15 +02:00
Oliver Gierke
8c6c2da0ba DATACMNS-1172 - Polishing.
Tweaked newly introduced RepositoryConfiguration.getImplementationBasePackage() to not require a parameter but use internal information instead (the repository interface in DefaultRepositoryConfiguration).

Original pull request: #248.
2017-09-27 13:12:58 +02:00
Mark Paluch
318cf9b1b8 DATACMNS-1172 - Limit repository custom implementation scanning to repository interface packages.
Custom repository implementation scan uses the repository interface package and its subpackages and no longer scans all configured base packages. Scan for fragment implementations defaults to the fragment interface package. Using the interface package for scanning aligns the behavior with the documentation.

Declaring the implementation along with the interface in the same package is an established design pattern allowing to limit the scanning scope. A limited scope improves scanning performance as it can skip elements on the classpath, that do not provide that particular package.

Previously, we scanned for implementations using the configured base packages that were also used to discover repository interfaces. These base packages can be broader for applications that spread repository interfaces across multiple packages.

Original pull request: #248.
2017-09-27 13:12:55 +02:00
Jens Schauder
67adc4e935 DATACMNS-1177 - Polishing.
Removed redundant static keywords on inner enums.

Original pull request: #249.
2017-09-27 11:42:42 +02:00
Oliver Gierke
4de44b4ded DATACMNS-1177 - Polishing.
Formatting. JavaDoc.

Original pull request: #249.
2017-09-27 11:42:39 +02:00