Commit Graph

1095 Commits

Author SHA1 Message Date
Oliver Gierke
f6c876b9bd DATACMNS-842 - Projections on repository methods support Slices now.
ResultProcessor now checks for Slice instead of Page as the projection applying method map(…) is available on Slice as well.
2016-04-09 14:09:40 +02:00
Oliver Gierke
3ff31e5f89 DATACMNS-840 - ReturnedType's need for custom construction no includes availability of input properties.
The indicator of whether custom construction is needed for a class based return type now includes whether input properties are available in the first place.
2016-04-08 18:50:57 +02:00
Oliver Gierke
5cfed9e003 DATACMNS-840 - ReturnedClass now aborts parameter name detection for types with multiple constructors.
In case a DTO type exposes multiple no-argument constructors we now leniently abort the parameter name detection and let downstream users decide what to do in this particular case.

The problematic case can't be outright rejected here already as there's valid scenarios for that, e.g. in JPA the type could be used for multiple query methods, using explict constructor expressions listing arguments explicitly and thereby select one of the multiple constructors.
2016-04-08 10:09:37 +02:00
Oliver Gierke
a842ed4e33 DATACMNS-837 - Updated changelog. 2016-04-06 23:14:22 +02:00
Oliver Gierke
16d826800f DATACMNS-833 - After release cleanups. 2016-04-06 16:37:02 +02:00
Oliver Gierke
3a23b53769 DATACMNS-833 - Prepare next development iteration. 2016-04-06 16:36:59 +02:00
Oliver Gierke
e9f7035ca4 DATACMNS-833 - Release version 1.12 GA (Hopper). 2016-04-06 16:35:58 +02:00
Oliver Gierke
f16f28f70b DATACMNS-833 - Prepare 1.12 GA (Hopper). 2016-04-06 16:34:45 +02:00
Oliver Gierke
1ce438661f DATACMNS-833 - Updated changelog. 2016-04-06 16:34:32 +02:00
Mark Paluch
a77626c3e9 DATACMNS-835 - Point to the appropriate Jira project. 2016-04-05 14:22:29 +02:00
Mark Paluch
a65536b396 DATACMNS-835 - Add pull request template. 2016-04-05 09:52:48 +02:00
Christoph Strobl
569cae298f DATACMNS-830 - Add documentation section on Querydsl.
Original Pull Request: #158
2016-03-31 19:53:32 +02:00
Mark Paluch
c760465134 DATACMNS-830, DATACMNS-726 - Document using Repositories with multiple Spring Data modules.
Original Pull Request: #158
2016-03-31 19:53:04 +02:00
Christoph Strobl
e0b9ea555a DATACMNS-830 - Polishing.
Original Pull Request: #158
2016-03-31 19:52:29 +02:00
Mark Paluch
b617eb01e6 DATACMNS-830 - Add common documentation part for projections.
Original Pull Request: #158
2016-03-31 19:51:54 +02:00
Oliver Gierke
eafc0854cc DATACMNS-823 - After release cleanups. 2016-03-18 11:16:07 +01:00
Oliver Gierke
17273d0ac0 DATACMNS-823 - Prepare next development iteration. 2016-03-18 11:15:51 +01:00
Oliver Gierke
0a3e443391 DATACMNS-823 - Release version 1.12 RC1 (Hopper). 2016-03-18 11:14:59 +01:00
Oliver Gierke
c2da774268 DATACMNS-823 - Prepare 1.12 RC1 (Hopper). 2016-03-18 11:06:57 +01:00
Oliver Gierke
0fdd596be5 DATACMNS-823 - Updated changelog. 2016-03-18 11:06:45 +01:00
Oliver Gierke
137d7cc544 DATACMNS-818 - Renamed Tuple to Pair.
Got rid off manual implementation code in favor of Lombok annotations.
2016-03-18 09:54:29 +01:00
Oliver Gierke
036f71837b DATACMNS-810 - Final tweaks to general Query by Example documentation.
Made the query-by-example.adoc a top level document. Clients including the documents have to tweak the indentation on the inclusion side then. Included query-by-example.adoc into index.adoc so that it can be double checked in test renderings easily.
2016-03-18 09:19:01 +01:00
Oliver Gierke
ef7315a48f DATACMNS-810 - Improvements to the Query by Example documentation.
Fixed a few left over references to ExampleSpec which is now ExampleMatcher. Removed references to previous model of typed and untyped matchers.
2016-03-17 21:39:06 +01:00
Oliver Gierke
26f725be0d DATACMNS-810 - Polishing.
Renamed ExampleSpecification to ExampleMatcher and introduced a matching() factory method, dropping the dedicated override mechanism for types for now. Updated documentation accordingly.

Used Lombok for constructor creation, field defaults, toString() as well as equals(…) and hashCode() implementations.

Tweaked imports in unit tests. Renamed methods to express expected behavior.

Original pull request: #153.
2016-03-17 16:22:55 +01:00
Mark Paluch
b0ce7009e8 DATACMNS-810 - Refactor Query by Example API.
Split Example and ExampleSpec to create reusable components. Refactor builder pattern to a fluent API that creates immutable instances. Split user and framework API, Example and ExampleSpec are user API, created ExampleSpecAccessor for modules to access example spec configuration. Create static methods in GenericPropertyMatchers to ease creation of matchers in a readable style. Convert PropertySpecifier to inner class  and move PropertySpecifiers to ExampleSpec.

Related tickets: DATAJPA-218, DATAMONGO-1245.
Original pull request: #153.
2016-03-17 16:17:39 +01:00
Christoph Strobl
4092f0716f DATACMNS-810 - Add core types for Query by Example support.
Added required types for Query by Example which should be used by the individual store implementations. 

Generally the Example type captures a sample object and allow various settings concerning the mapping into an actual query. So there’s configuration options for handling null values, string matching, property paths to ignore,

Related tickets: DATAJPA-218, DATAMONGO-1245.
Original pull request: #153.
2016-03-17 16:17:39 +01:00
Oliver Gierke
a8db5e3d23 DATACMNS-829 - Fixed handling of Map null values in ProxyProjectionFactory.
We now eagerly return null values in attempts to project Map values.
2016-03-15 15:46:56 +01:00
Oliver Gierke
f8ea9fb8ab DATACMNS-828 - Polishing.
Fixed JavaDoc in unit tests.
2016-03-15 15:05:03 +01:00
Oliver Gierke
c57bfec696 DATACMNS-828 - Fixed potential NullPointerException in ResultProcessor.
ResultProcessor.processResult(…) now explicitly handles null values to prevent IllegalArgumentExceptions being provoked in the ProjectionFactory which occurred if null values were handed down to it.
2016-03-15 15:04:28 +01:00
Oliver Gierke
9dc23ed555 DATACMNS-827 - Fixed Travis build setup after Spring 4.2 upgrade.
Disabled build profile for Spring 4.1, added one for the 4.3 snapshots.
2016-03-15 13:31:55 +01:00
Oliver Gierke
71fdf8646e DATACMNS-826 - Fixed JavaDoc for GeoModule. 2016-03-15 13:20:24 +01:00
Oliver Gierke
f0f9d5bc20 DATACMNS-825 - Polishing.
Tweaked annotation cache usage in BasicPersistentEntity.findAnnotation(…).

Original pull request: #156.
2016-03-15 13:20:20 +01:00
Christoph Strobl
a40e247c25 DATACMNS-825 - Allow usage of composed annotations using @AliasFor.
We now resolve composed annotation values using @AliasFor within AnnotationBasedPersistentProperty and BasicPersistentEntity. Nevertheless it is up to the individual store implementation to make use of this.

Original pull request: #156.
2016-03-13 16:30:03 +00:00
Oliver Gierke
ae96301ab0 DATACMNS-812 - Polishing.
Formatting and extension of copyright years.

Original pull request: #154.
2016-03-07 11:33:57 +01:00
Timothy Cheng
bc421f53c0 DATACMNS-812 - Fixed PageImpl.toString() to improve readability.
Add one to the getNumber() in PageImpl.toString() since it uses 0-based index.

Original pull request: #154.
2016-03-07 11:31:42 +01:00
Oliver Gierke
deb884dfb1 DATACMNS-821 - Improved type prediction for FactoryBean implementations.
Previously, we registered an InstantiationAwareBeanPostProcessor to predict the type to be created by RepositoryFactoryBeanSupport by inspecting a particular property value of the registered BeanDefinition.

This has now been elevated to a more generic mechanism that can get a FactoryBean type configured with a set of properties to inspect for a configured type. That new infrastructure now replaces the explicit configuration for RepositoryFactoryBeanSupport with one that's set up via configuration.
2016-02-26 19:21:01 +01:00
Oliver Gierke
2b2882635a DATACMNS-817 - Updated changelog. 2016-02-23 14:27:20 +01:00
Oliver Gierke
d3e6ad104c DATACMNS-820 - Polishing.
Fixed indentation to use tabs instead of spaces. Tweaked structure of if-clauses in PropertyAccessingMethodInterceptor to reduce nesting. Made helper method static. 

Restructured test cases slightly and used ExpectedException rule to verify exceptions. Moved newly introduced test methods more to the end of the file (new tests last).

Added author and copyright year extensions where necessary.

Original pull request: #155.
2016-02-20 20:33:14 +01:00
Mark Paluch
e868577def DATACMNS-820 - Allow setter invocations in projections backed by beans.
Invocations to setter methods are now passed to the backing bean.

Original pull request: #155.
2016-02-20 20:33:13 +01:00
Oliver Gierke
1a97627196 DATACMNS-811 - After release cleanups. 2016-02-12 15:43:56 +01:00
Oliver Gierke
bf29e6ec50 DATACMNS-811 - Prepare next development iteration. 2016-02-12 15:43:38 +01:00
Oliver Gierke
021bb8ffb2 DATACMNS-811 - Release version 1.12 M1 (Hopper). 2016-02-12 15:42:46 +01:00
Oliver Gierke
3667dcc81e DATACMNS-811 - Prepare 1.12 M1 (Hopper). 2016-02-12 15:36:18 +01:00
Oliver Gierke
126aac106c DATACMNS-811 - Updated changelog. 2016-02-12 15:36:04 +01:00
Oliver Gierke
e0d2907905 DATACMNS-815 - Made static type cache non-static in SimpleTypeInformationMapper.
We now use a non-static cache for TypeInformation instances in SimpleTypeInformationMapper to make sure Spring Boot's development tools can correctly reload classes. Removed the static singleton instance of SimpleTypeInformationMapper in favor instantiating it directly.
2016-02-09 14:22:06 +01:00
Oliver Gierke
c7ae64c5a1 DATACMNS-813 - Added code of conduct.
Moved to Asciidoctor for the CONTRIBUTING file.
2016-02-02 09:38:06 +01:00
Oliver Gierke
1c265847bf DATACMNS-811 - Declare Artifactory Maven plugin to be able to distribute build artifacts. 2016-01-28 14:38:55 +01:00
Oliver Gierke
85e569b4f6 DATACMNS-804 - ParametersParameterAccessor now correctly iterates over only the bindable values.
Corrected the way the BindableParametersIterator works by limiting the upper bound of the iteration to the number of actually bindable parameters.
2016-01-21 10:19:59 +01:00
Oliver Gierke
b17a797fe6 DATACMNS-802 - PagedResourceAssembler now allows customizing the PagedResource instance.
Introduced a template method to override the creation of a PagedResource to allow subclasses to create a more concrete instance than PagedResource itself.
2016-01-20 14:24:38 +01:00
Oliver Gierke
c916fcb1c1 DATACMNS-801 - Make sure PropertyReferenceException does not expose duplicate potential matches.
We now use a Set to collect potential matches from fields and accessors.

Polished assertions and JavaDoc in PropertyPath along the way.
2016-01-12 08:39:44 +01:00