Commit Graph

822 Commits

Author SHA1 Message Date
Oliver Gierke
17c41522a7 DATACMNS-572 - Prepare 1.9.0.RELEASE (Evans GA).
Upgraded to Spring HATEOAS 0.16.0.RELEASE.
2014-09-05 10:48:48 +02:00
Oliver Gierke
880405c391 DATACMNS-572 - Updated changelog. 2014-09-05 09:23:25 +02:00
Oliver Gierke
ca0a3de685 DATACMNS-568 - Updated changelog. 2014-09-05 07:29:01 +02:00
Oliver Gierke
f3d8256a80 DATACMNS-570, DATACMNS-571 - Removed JDK 7 profile for Travis build. 2014-09-01 13:57:51 +02:00
Oliver Gierke
2c7f7e8e04 DATACMNS-571 - Remove custom build infrastructure for Optional.
We now require a JDK to build Spring Data Commons as using the custom Optional type from the Spring Data Build project as it causes the tests to break as Spring 4.1 snapshots load the Optional type to check for it's ability on the classpath which the JVM rejects.
2014-09-01 13:43:11 +02:00
Mark Paluch
6cc9e33359 DATACMNS-565 - Improved detection of custom implementations for CDI repositories.
The detection of the custom implementation has now been moved into the Bean base class to avoid calls to BeanManager.getBeans(…) (which are necessary to pick up the configuration class defining postfixes and the like) happen to early in the CDI container lifecycle.

Related ticket: DATACMNS-557.
2014-09-01 12:46:12 +02:00
Oliver Gierke
8bfa0bd9e0 DATACMNS-570 - Updated build profiles for Travis.
We now use the profiles existing in Spring Data Build for Spring 4.0.x and 4.1.x.
2014-09-01 12:23:18 +02:00
Thomas Darimont
9fc57ea3bf DATACMNS-566 - Allow sorting by QueryDsl operator expressions.
Previously we only allowed to sort by QueryDsl path expressions. With this change we now also support ordering by operator expressions, e.g. yearMonth() on a date property.

Original pull request: #94.
2014-08-26 13:56:17 +02:00
Oliver Gierke
edfd341d64 DATACMNS-567 - Fixed some glitches in the Asciidoctor files.
Added missing closing backtick in auditing.adoc. Added copyright line to index.adoc and switched to relative level offsets. Use two blank lines at the end of each file consistently. Extracted preface document and added project metadata.
2014-08-22 15:21:05 +02:00
Oliver Gierke
c9dd679cd1 DATACMNS-562 - AbstractPersistentProperty doesn't consider maps and collections entities anymore.
The type detection for entity candidates of PersistentProperty instances now consistently handles collection types even if they're used als collection or map values.
2014-08-19 17:53:51 +02:00
Oliver Gierke
77a67021e5 DATACMNS-561 - After release cleanups. 2014-08-13 16:29:31 +02:00
Spring Buildmaster
4c64eddeb7 DATACMNS-561 - Prepare next development iteration. 2014-08-13 06:19:32 -07:00
Spring Buildmaster
d8e9808dd4 DATACMNS-561 - Release version 1.9.0.RC1 (Evans RC1). 2014-08-13 06:19:28 -07:00
Oliver Gierke
2386f48233 DATACMNS-561 - Prepare 1.9.0.RC1 (Evans RC1). 2014-08-13 15:13:06 +02:00
Oliver Gierke
ceeb768d19 DATACMNS-561 - Updated changelog. 2014-08-13 15:04:57 +02:00
Oliver Gierke
49071659c0 DATACMNS-549 - Updated changelog. 2014-08-13 10:44:11 +02:00
Oliver Gierke
62ddd29bad DATACMNS-551 - Fixed some broken links in the reference documentation. 2014-08-12 12:03:54 +02:00
Oliver Gierke
3c38218940 DATACMNS-552 - Naming conventions for custom repository implementations are now more obvious.
Added a note to hint to the Impl postfix to be important and refer to the paragraphs following for more details on that,
2014-08-10 14:46:09 +02:00
Oliver Gierke
5d0f581068 DATACMNS-548 - Reference documentation now mentions Slice return type in special parameter handling. 2014-08-10 13:31:36 +02:00
Oliver Gierke
5352701374 DATACMNS-556 - Make annotation validation in AnnotationBasedPersistentProperty more lenient.
Annotations used on both fields and accessors are now only rejected if they're Spring Data annotations (i.e. from the org.springframework.data namespace) and the configurations of these annotations differ.
2014-08-10 13:15:39 +02:00
Oliver Gierke
3660676338 DATACMNS-558 - Some code cleanups according to the Sonar report. 2014-08-10 12:51:28 +02:00
Oliver Gierke
756c951112 DATACMNS-557 - Polishing.
Renamed CdiRepositoryConfigurationSource to CdiRepositoryConfiguration. Turned anonymous inner default implementation into dedicated enum to avoid repeated instantiation.

Changed the CdiRepositoryBean to rather take a Bean instance of the custom implementation instead of the resolved object to make sure both instances (the custom implementation and the repository proxy) are instantiated at the same time.

Fixed imports. Some early returns to avoid unnecessary nesting.

Adapted architecture description to allow CDI module accessing the configuration module.

Related pull request: #92.
2014-08-07 12:33:29 +02:00
Mark Paluch
1f0260e48d DATACMNS-557 - Added support for custom implementations to CDI infrastructure.
The CDI extension now discovers a custom implementation class similarly to the detection when using Spring Data in a Spring container. Extracted the custom implementation detection for re-use. The CDI extension discovers the potentially available bean and hands it to the CdiRepositoryBean for further usage.

Implementations should implement the extended variant of the create(…) method we introduce with this commit to be able to forward the resolved custom implementation bean.

Original pull request: #92.
2014-08-07 12:05:09 +02:00
Oliver Gierke
62e66ab305 DATACMNS-551 - Move to Asciidoctor for reference documentation. 2014-08-06 21:20:08 +02:00
Oliver Gierke
85157b6644 DATACMNS-526 - Added type matching to strict repository scanning.
Repository interfaces are now also considered strict matches if they are assignable to one of the types returned by getIdentifyingTypes().
2014-07-31 12:54:08 +02:00
Oliver Gierke
81af5ee730 DATACMNS-526 - Improved configuration behavior in multi-store scenarios.
We now apply a stricter repository interface selection if we detect multiple Spring Data modules to be in the classpath to avoid the repository scanning accidentally overriding each others definitions or even picking up interfaces they weren't intended to manage.

The detection is based on a type scan in dedicated base package where subtypes of RepositoryFactorySupport usually reside. If more than one type is found, we activate strict scanning.

The strict check is actually implemented in RepositoryConfigurationExtensionSupport to be accessible for store implementations. By default we try to load the repository candidate interface and inspect the managed domain types for a collection of annotations (see RepositoryConfigurationExtensionSupport.getIdentifyingAnnotations()). Implementors still have the chance to customize the behavior by overriding isStrictRepositoryCandidate(…).

We also introduced a getModuleName() to be able to create better logging output in terms of repository registration. Moved registration of RepositoryConfigurationExtension as Spring bean into the base types for XML and annotation configuration support to make sure they only kick in if explicit configuration is used.
2014-07-28 19:56:40 +02:00
Oliver Gierke
3bcf6f3f27 DATACMNS-547 - @TypeAlias is now @Persistent.
For @TypeAlias annotated types being picked up using entity scanning, the annotation is now @Persistent.

Related tickets: DATAMONGO-992.
2014-07-24 14:13:10 +02:00
Oliver Gierke
ba70380555 DATACMNS-546 - PropertyPath has better exception messages now.
PropertyPath now exposes the complete property named the resolution failed for in case it can't resolve a source String. It will expose the part of the Path from the deepest successful resolution result.

Changed the resolution algorithm to use a List instead of a Stack and a fresh instance of the former so that the nested recursion steps keep track of the correct resolution depths.
2014-07-21 18:11:12 +02:00
Oliver Gierke
5bc89af4e7 DATACMNS-544 - Indicate repository configuration has been active.
RepositoryConfigurationDelegate now registers the store-specific RepositoryConfigurationExtension as lazy-init BeanDefinition so that other parties can detect that definition.
2014-07-18 20:02:49 +02:00
Oliver Gierke
5aa5b9e1aa DATACMNS-543 - Avoid duplicate repository bean registration in XML namespace.
We're now firing the component registration event manually in RepositoryBeanDefinitionParser as ParserContext.registerBeanComponent(…) registers the given BeanComponentDefinition with the registry. As we do that manually before this previously resulted in the BeanDefinition overriding the very same one and container warnings in turn.
2014-07-18 12:21:35 +02:00
Thomas Darimont
ea1d7742c9 DATACMNS-538 - Updated section on pagination in reference documentation.
Reworked section that contained outdated parameter names and examples.

Original pull request: #91.
2014-07-17 21:49:32 +02:00
Oliver Gierke
ed0f7c51f8 DATACMNS-469 - Removed deprecations. 2014-07-16 11:53:20 +02:00
Oliver Gierke
789f620af1 DATACMNS-539 - DefaultCrudMethods now detects delete(T t) methods.
The CRUD method detection now also discovers delete methods taking the domain type as argument.

Related ticket: DATAREST-319.
2014-07-15 10:37:29 +02:00
Oliver Gierke
750f33a587 DATACMNS-536 - After release cleanups. 2014-07-10 20:40:43 +02:00
Spring Buildmaster
260eda8f9d DATACMNS-536 - Prepare next development iteration. 2014-07-10 09:03:44 -07:00
Spring Buildmaster
a93f299e2e DATACMNS-536 - Release version 1.9.0.M1. 2014-07-10 09:03:41 -07:00
Oliver Gierke
4fbe53c1b1 DATACMNS-536 - Prepare 1.9.0.M1 (Evans M1). 2014-07-10 17:17:48 +02:00
Oliver Gierke
b0e12c2504 DATACMNS-536 - Updated changelog. 2014-07-10 17:14:15 +02:00
Oliver Gierke
ec59cc433f DATACMNS-527 - Updated changelog. 2014-07-10 17:01:03 +02:00
Oliver Gierke
b497fa58b3 DATACMNS-536 - Upgrade to Spring HATEOAS 0.15.0.RELEASE. 2014-07-10 13:33:14 +02:00
Oliver Gierke
94436dd609 DATACMNS-533 - Implemented handling of root objects.
Refactored the implementation of the dynamic lookup of properties and functions on EvaluationContextExtensions. All the reflective lookup logic has moved into an EvaluationContextExtensionAdapter.

We now also distinguish between the meta-information that can be looked up once and cached (so that we avoid reflection overhead for subsequent context creations).

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:21:12 +02:00
Thomas Darimont
1e489bbd6d DATACMNS-533 - Added test cases for root object integration in SpEL extension API.
Changed SPI to expose a Function type rather than plain methods as well as an arbitrary root object.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:20:59 +02:00
Oliver Gierke
39f028bb6c DATACMNS-533 - Polishing of special parameter handling.
Collapsed variable gathering methods into one, make sure we expose all values (also null ones). Renamed unit test for ExtensionAwareEvaluationContextProvider according to the class name. Some further cleanups in the test case.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:20:49 +02:00
Thomas Darimont
31848f87eb DATACMNS-533 - Expose special parameters in SpEL expressions.
We now expose special parameters like Pageable and Sort to be used in SpEL expressions if they don't collide with existing named parameters.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:20:33 +02:00
Thomas Darimont
d23e7baa2c DATACMNS-533 - Support scoping for functions provided by EvaluationContextExtension.
Added test case for scoped functions.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:20:22 +02:00
Thomas Darimont
1ff4961cbc DATACMNS-533 - Discover declared properties on EvaluationContextExtension.
We new automatically register public static fields declared on classes extending EvaluationContextExtensionSupport as properties to be used within SpEL expressions.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:20:11 +02:00
Thomas Darimont
9ab9467386 DATACMNS-533 - Discover declared functions on EvaluationContextExtension.
We new automatically register public static methods declared on classes extending EvaluationContextExtensionSupport as functions to be used within SpEL expressions.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:19:58 +02:00
Oliver Gierke
d303f6ac37 DATACMNS-533 - Infrastructure support for SpEL expressions in manually defined queries.
Extracted SPI build for DATAJPA-564 into Spring Data Commons. Simplified the configuration setup code and removed the ability to define a custom EvaluationContextProvider for now. We directly declare a bean definition which automatically picks up EvaluationContextExtensions.

RepositoryFactory(Bean)Support is now aware of the EvaluationContextProvider to hand it to the template method that creates the QueryLookupStrategy. Deprecated the previously existing template method in favor of an extended one.

Removed variable declarations from the extension interface for now as usually properties serve the same purposes as variables which makes the latter superfluous for now. Applied some JavaDoc and API signature polish. Added unit tests for ExtensionAwareEvaluationContextProvider.

Related pull request: spring-projects/spring-data-jpa#101
Related ticket: DATAJPA-564
2014-07-10 12:19:48 +02:00
Brad Nussbaum
e588a40bcf DATACMNS-536 - Polish APT plugin configuration.
Original pull request: #87.
2014-07-09 22:07:03 +02:00
Christoph Strobl
3477583514 DATACMNS-527 - Remove links to forum.spring.io.
Linked to spring-data tag on StackOverflow.

Original pull request: #90.
2014-07-09 20:45:01 +02:00