Commit Graph

31 Commits

Author SHA1 Message Date
Oliver Gierke
1d3af0c128 DATACMNS-937 - Support for JavaSlang's Option type as nullable wrapper.
Repository methods can now return JavaSlang's Option as alternative to JDK 8's Optional or Guavas Optional.
2016-11-19 12:49:21 +01:00
Oliver Gierke
37c895c04a DATACMNS-886 - Fix version ranges for Spring Framework in template.mf. 2016-07-25 19:28:54 +02:00
Oliver Gierke
e79c19d277 DATACMNS-885 - Added XML support for incoming projections based on XMLBeam.
Added an XML flavor of the support added in previous commits based on XML Beam [0].

[0] http://www.xmlbeam.org.
2016-07-25 18:23:53 +02:00
Oliver Gierke
eec2b43fd0 DATACMNS-885 - Support for binding JSON payloads to projection interfaces.
Projection types annotated with @ProjectedPayload can now be used as parameters for @RequestBody annotated Spring MVC controller method parameters.

Accessor methods will be translated into JSON path property expressions which can be customized by using the @JsonPath annotation. The methods are allowed to return simple types, nested projection interfaces or complex classes which will will be mapped using a Jackson ObjectMapper.
2016-07-25 17:26:32 +02:00
Oliver Gierke
306795468d DATACMNS-795 - Added support for Scala's Option type on repositories.
Just like with Google's or Java 8's optional we now support Scala's Option type as wrapper fro return values on repositories.
2015-12-16 19:54:27 +01:00
Oliver Gierke
dbe79f89a9 DATACMNS-89 - Infrastructure for projections on repository queries.
QueryMethods now expose a ResourceProcessor which is exposes information about the final to be created object types which can either be DTOs containing a persistence constructor (see @PersistenceConstructor) or projection interfaces. The former are analyzed for constructor properties so that store implementations can use that information to create projected queries that return exactly the fields required for that DTO.

Projection interfaces are inspected, their properties are considered input properties and the same projection queries can be issued against the data store. If a projection contains dynamically calculated properties (i.e. it uses SpEL expressions via @Value) the original entities have to be queried and can be projected during post processing.

ProjectionFactory now exposes a more advanced ProjectionInformation that has additional meta information about the projection type. ProxyProjectionFactory now refers to the BeanClassLoader instead of the ResourceLoader.

RepositoryFactory(Bean)Support now also implement BeanFactoryAware to forward the BeanFactory to the SpelAwareProxyProjectionFactory which in turn now gets handed into the QueryLookupStrategy as well as the QueryMethod.

Parameter now knows about a dynamic projection type, which is a query method parameter of type Class bound to a generic method parameter and will be used to determine the projection to be used on a per call basis.

Original pull request: #150.
2015-12-14 19:31:33 +01:00
Oliver Gierke
b400bacc0a DATACMNS-788 - template.mf now uses placeholder for Slf4j. 2015-11-23 13:27:48 +01:00
Oliver Gierke
c013c71e7a DATACMNS-670 - Upgraded to Querydsl 4.
Switched to new Querydsl 4 artifacts and adapted to changed package names and API changes.

Cleaned up some JavaDoc and APIs in QuerydslBindingsFactory and QuerydslBinderCustomizer.
2015-11-17 11:07:05 +01:00
Oliver Gierke
be812e28cd DATACMNS-759 - Switched to Spring HATEOAS version property provided by the build parent. 2015-09-01 09:25:59 +02:00
Oliver Gierke
adbd363e2d DATACMNS-628 - Added converters for JSR-310 backport library.
We now include Spring Converters for the ThreeTen backport project [0].

[0] http://www.threeten.org/threetenbp
2015-01-04 21:43:26 +01:00
Oliver Gierke
cb884eb0cd DATACMNS-525 - Removed EhCache implementation.
Original pull request: #25.
2014-11-26 17:09:10 +01:00
Oliver Gierke
499182f4c9 DATACMNS-525 - Removed Hazelcast implementation.
Original pull request: #95.
2014-11-26 17:09:10 +01:00
Christoph Strobl
e2358f3bf8 DATACMNS-525 - Introduce infrastructure for KeyValue repositories.
Added basic infrastructure for repositories on top of key-value data stores. For more details see the original pull request.

Original pull request: #95.
2014-11-26 16:43:15 +01:00
Thomas Darimont
1b9cdc941f DATACMNS-578 - Speed up instance creation by generating factory classes with ASM.
Introduced BytecodeGeneratingEntityInstantiator which dynamically generates classes to speed up the dynamic instantiation of objects. Since we cannot support every use case with byte code generation we gracefully fallback to the ReflectiveEntityInstantiator.

BytecodeGeneratingEntityInstantiator has support for unboxing of constructor parameters and more robust handling for cases where we cannot generate a custom ObjectInstantiator.

Original pull request: #98.
2014-10-21 12:18:01 +02:00
Oliver Gierke
cc9dafbd02 DATACMNS-500 - Removed Jackson 1 dependency. 2014-05-01 20:21:33 +02:00
Oliver Gierke
02a3c08ee1 DATACMNS-489 - Support for Future<T> as return value wrapper for repository methods.
Added a converter to process a NullableWrapper into a Future by producing an AsyncResult. This is to support repository methods annotated with @Async and returning a Future<T>. With Spring's asynchronous method invocation support activated this will cause the repository method being executed asynchronously.

Note, that this currently only works on Spring 4 as Spring 3.2.8 async support is not discovering the introduction on the repository proxy and thus fails to discover the @Async annotation on the repository method. This will be resolved in Spring 3.2.9, see the related tickets.

Related tickets: DATACMNS-483, SPR-11725, DATACMNS-499.
2014-05-01 14:33:26 +02:00
Oliver Gierke
c141fb771d DATACMNS-483 - Support for wrapper types as return types for repository methods.
The repository method invocation mechanism now post-processes the result of the actual method invocation in case it's not type-compatible with the return type of the invoked method and invokes a conversion if applicable. This allows us to register custom converters for well-known wrapper types. We currently support Optional from both Google Guava and JDK 8.

Implementation notice

We use some JDK 8 type stubs from the Spring Data Build project to be able to compile using JDKs < 8. This is necessary as we need to remain compatible with Spring 3.2.x for the Dijkstra release train and our test executions still run into some issues with it a Java 8 runtime (mostly ASM related). These issues were reported in [0, 1] and we'll probably get off the hack for Dijkstra GA by upgrading to Spring 3.2.9.

[0] https://jira.spring.io/browse/SPR-11719
[1] https://jira.spring.io/browse/SPR-11718
2014-04-22 14:20:54 +02:00
Oliver Gierke
176be042c9 DATACMNS-475 - Added Jackson 2 module to (de)serialize new geo types.
Newly introduced GeoModule contains mixins for Distance, Point, Circle, Box and Polygon.
2014-03-21 13:36:15 +01:00
Oliver Gierke
c422f798a3 DATACMNS-465 - Polished template.mf. 2014-03-07 08:04:08 +01:00
Thomas Darimont
71169ca160 DATACMNS-445 - Documentation overhaul.
Updated links and vendor-information in readme. Updated author information. Fixed some typos, added ids to sections updated examples and descriptions. Added and referenced description of repository populator namespace element.

Original pull request: #65.
2014-02-21 13:39:22 +01:00
Oliver Gierke
26c4f2dd87 DATACMNS-430 - Using Jackson version property from build parent.
Removed custom dependency from Spring 4 profile as it's already included in the parent pom.
2014-01-22 17:52:53 +01:00
Oliver Gierke
1624fec11a DATACMNS-386 - Upgraded to Spring Framework 3.2.4.
Upgraded to Spring Data Build 1.3.0.BUILD-SNAPSHOT to benefit from upgrade to Spring 3.2.4.
2013-10-25 19:31:35 +02:00
Oliver Gierke
bd65718f30 DATACMNS-325 - Open up Slfj4 OSGi dependency to 1.6.0 to let STS work with it. 2013-05-31 13:48:58 +02:00
Oliver Gierke
e0dda2a4f0 DATACMNS-333 - Added Jackson 2 support to repository populators.
Added necessary infrastructure to use Jackson 2 with repository populators. Expose a jackson2-populator XML element in the namespace to setup a Jackson2 based repository populator.
2013-05-29 17:51:39 +02:00
Oliver Gierke
a93c2bff94 DATACMNS-330, DATACMNS-331 - Advanced web integration.
Added PagedResourcesAssembler to easily convert Page instances into a PagedResource instance and automatically build the required previous/next links based on the PageableHandlerMethodArgumentResolver present in the MVC configuration. The assembler can either be injected into a Spring MVC controller or a controller method. The latter will then assume the controller methods URI to be used as pagination link base.

Added @EnableSpringDataWebSupport to automatically register HandlerMethodArgumentResolvers for Pageable and Sort as well as a DomainClassConverter that will allow the usage of domain types being managed by Spring Data repositories in controller method signatures. In case Spring HATEOAS is present on the classpath, we'll also register a PagedResourcesAssembler for injection as well as the appropriate HandlerMethodArgumentResolver for injection into controller methods.

Adapted Sonargraph configuration accordingly. Upgraded to Spring HATEOAS 0.6.0.BUILD-SNAPSHOT.
2013-05-15 16:03:46 +02:00
Oliver Gierke
71a251c4e1 DATACMNS-325 - Open up lower boundary of Slf4j to 1.6.4 in MANIFEST.MF.
This change was introduced to ease the upgrade of STS to recent Spring Data Commons versions, originally introduced to enable Spring 4 compatibility (see DATACMNS-324).
2013-05-03 12:16:12 +02:00
Oliver Gierke
99cfe93160 DATACMNS-324 - Opened up template.mf version ranges for Spring 4.
The generated OSGi manifest now declares version ranges that allow usage of Spring 4.
2013-05-03 10:06:24 +02:00
Oliver Gierke
7df1cb7deb DATACMNS-285 - Polished template.mf.
Use Bundlor property replacement in favor of hard coded versions to automatically pick up more dependency upgrades automatically.
2013-02-19 12:44:18 +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
Thomas Risberg
0f7984a331 Switched to use new project layout; updated build; moved files around 2010-10-07 12:14:39 -04:00
Thomas Risberg
20c64e2469 added OSGi metadata to build 2010-08-13 14:05:10 -04:00