Commit Graph

876 Commits

Author SHA1 Message Date
Oliver Gierke
e70cfbfd57 DATACMNS-691 - Removed Travis build profile for Spring 4.0.next. 2015-05-11 15:39:01 +02:00
Oliver Gierke
26b3516623 DATACMNS-689 - Improved reference documentation on web pagination.
Re-added index and defaulting information to the section that documents the currents state of web pagination. Removed legacy pagination sections as they're not really documenting the very legacy support (that would not even work anymore).

Added explicit anchors where missing.
2015-05-07 10:44:42 +02:00
Oliver Gierke
a61bd1406b DATACMNS-687 - Added section on dependency management to reference docs.
Added a dedicated dependencies.adoc that outlines the usage of the Spring Data release train BOM as well as the way one would customize the release train to be used with Spring Boot.

Also, we now explicitly list the Spring Framework version the release requires.
2015-05-04 14:27:29 +02:00
Thomas Darimont
1924aaf7af DATACMNS-682 - Add details of how to customize repository scanning using JavaConfig.
Completed description for the packages-to-scan customization with JavaConfig.

Original pull request: #121.
2015-04-16 12:08:59 +02:00
Oliver Gierke
57fca31ac7 DATACMNS-679 - Updated Sonargraph architecture description. 2015-04-13 13:15:18 +02:00
Oliver Gierke
97b8d45eee DATACMNS-681 - Removed some compiler warnings.
Removed unused constants. Removed usage of deprecated method in RepositoryBeanDefinitionParser.
2015-04-13 13:10:54 +02:00
Oliver Gierke
d67c43803c DATACMNS-677 - AnnotationBasedPersistentProperty now caches absence of annotations on accessor-only properties.
AnnotationBasedPersistentProperty now also caches the absence of properties that are expressed through accessors only. Previously the absence of a field caused us to skip the registration of the absence in the cache.
2015-04-07 08:45:25 +02:00
Arlo Louis O'Keeffe
8bf02ac6c9 DATACMNS-674 - Fixed typo in reference documentation. 2015-04-01 15:26:58 +02:00
Oliver Gierke
bf9dfcb386 DATACMNS-652 - Updated changelog. 2015-03-06 07:57:59 +01:00
Oliver Gierke
7da5f5baea DATACMNS-649 - Fixed detail in reference docs on extending all repositories.
The custom factory created to extend all repositories with additional behavior needs to return the type of the custom repository base class from getRepositoryBaseClass(…) to make sure the infrastructure can use it to inspect the CRUD methods correctly. Previously the documentations showed an interface being returned.

Code formatting in the example and inline code highlighting.
2015-02-24 16:35:00 +01:00
Oliver Gierke
0e35fb8c73 DATACMNS-646 - Enable Spring 4.2 build profile for Travis. 2015-02-10 18:30:11 +01:00
Arlo Louis O'Keeffe
d9156ffb7b DATACMNS-645 - Fix typo in reference documentation.
Original pull request: #113.
2015-02-10 11:33:50 +01:00
Oliver Gierke
ff6d0dda9d DATACMNS-642 - Avoid setter lookup in BeanWrapper for if field access is used.
We now delay the lookup of the setter method until we discover we really  need to use property access.
2015-02-04 17:13:17 +01:00
Oliver Gierke
a17100568c DATACMNS-640 - Fixed potential NullPointerException in PageableHandlerMethodArgumentResolver.
We now double check the fallback Pageable for being null before trying to lookup the Sort to fall back.
2015-02-04 10:32:31 +01:00
Oliver Gierke
2f923e4419 DATACMNS-563 - Added explicit unit test for one-indexed parameters on PagedResourcesAssembler. 2015-01-30 14:46:27 +01:00
Oliver Gierke
fdbea4c130 DATACMNS-633 - After release cleanups. 2015-01-28 17:35:15 +01:00
Spring Buildmaster
1877047d09 DATACMNS-633 - Prepare next development iteration. 2015-01-28 02:50:25 -08:00
Spring Buildmaster
020b7fcd21 DATACMNS-633 - Release version 1.9.2.RELEASE (Evans SR2). 2015-01-28 02:50:22 -08:00
Oliver Gierke
348ca036be DATACMNS-633 - Prepare 1.9.2.RELEASE (Evans SR2). 2015-01-28 11:43:27 +01:00
Oliver Gierke
dc8276a265 DATACMNS-633 - Updated changelog. 2015-01-28 11:23:19 +01:00
Oliver Gierke
e0b985f536 DATACMNS-632 - Updated changelog. 2015-01-28 09:55:14 +01:00
Oliver Gierke
8febeb5335 DATACMNS-637 - Performance improvements.
MappingContextTypeInformationMapper now caches detected type aliases.

PreferredConstructor.isEnclosingClassParameter(…) now eagerly returns if the parameter itself is not an enclosing one and thus avoids a collection lookup and equals check. Moved equals check for the type to the very end of the equals check to increase the chances that other inequality guards kick in earlier.

AbstractMappingContext now leaves the non-null-check for getPersistentEntity(…) to the factory method of ClassTypeInformation.

We now pre-calculate the hash codes for TypeInformation implementations as far as possible as the instances are used as cache keys quite a lot. The same applies to AbstractPersistentProperty.

BasicPersistentEntity now uses an ArrayList we sort during the verify() phase to mimic the previous behavior wich was implemented using a TreeSet as ArrayLists are way more performant when iterating over all elements which doWithProperties(…) is doing which is used quite a lot.

BeanWrapper now avoids the getter lookup if field access is used.

SimpleTypeHolder now uses a CopyOnWriteArrySet to leniently add types detected to be simple to the set of simple types to avoid ongoing checks against the inheritance hierarchy.
2015-01-25 17:44:48 +01:00
Oliver Gierke
f9a0ce5258 DATACMNS-563 - Added unit tests to verify enabling one-indexed parameters are considered correctly when resolving Pageables. 2015-01-20 20:20:11 +01:00
Oliver Gierke
229d5648df DATACMNS-634 - Polishing.
Simplified type traversal in Repositories.getRepositoryFactoryInfoFor(…) and unit tests.

Original pull request: #110.
2015-01-20 17:54:54 +01:00
Thomas Eizinger
39556590c3 DATACMNS-634 - Repositories now als returns repositories for super types of a domain class.
In case the repository lookup for a given domain type fails we traverse the given types super-types and try to detect a repository for those.

Original pull request: #110.
2015-01-20 17:54:42 +01:00
Oliver Gierke
65f784b869 DATACMNS-621 - Polishing.
Simplified implementation of Path conversion. Inlined helper domain types to not to pollute the packages with types that are only used within that very one test class.

Original pull request: #111.
2015-01-20 16:33:11 +01:00
Christoph Strobl
3a4c1b026a DATACMNS-621 - QSort now treats nested paths correctly.
We now inspect intermediate path elements to build sort order accordingly.

Original pull request: #111.
2015-01-20 16:27:21 +01:00
Oliver Gierke
dfdae94f89 DATACMNS-608 - Updated changelog. 2015-01-20 07:07:11 +01:00
Oliver Gierke
5528a3bdd6 DAATCMNS-629 - Fixed sample in documentation section for limiting query results. 2015-01-08 09:04:58 +01:00
Oliver Gierke
37fbbd4361 DATACMNS-624 - Reactivated Spring 4.1 build profile for Travis. 2015-01-05 18:23:27 +01:00
Oliver Gierke
a4a6eb1384 DATACMNS-625 - Re-enabled querydsl-next profile for Travis.
Enabled the container based build infrastructure, too, to benefit from resource caching.
2014-12-30 19:46:44 +01:00
Oliver Gierke
f02babd3f8 DATACMNS-620 - Repositories now creates reflective RepositoryInvokers for repositories with redeclared CRUD methods.
If repository interfaces redeclare CRUD methods we need to use a ReflectionRepositoryInvoker rather than the CRUD one to make sure we pick up the customizations applied to the method declaration (e.g. caching or transaction annotations).

This is already fixed in master due to the move to the Spring Data REST RepositoryInvoker API.
2014-12-18 18:57:17 +01:00
Oliver Gierke
a179e4e7df DATACMNS-619 - DefaultCrudMethods now exposes accessible methods.
We now make sure that all methods detected are made accessible so that clients using them can reflectively invoke them without additional checks.
2014-12-18 18:53:10 +01:00
Oliver Gierke
846ab10b01 DATACMNS-616 - Fixed field value lookup for private fields in AnnotationDetectionFieldCallback.
We now make the field detected by the callback accessible so that the value lookup doesn't fail for private fields. Added a few more unit tests to verify behavior.
2014-12-17 17:37:01 +01:00
Oliver Gierke
3324b187dd DATACMNS-615 - PageImpl now rejects a total less than the amount of items given.
PageImpl now makes sure that the total given to the constructor is never less than then number of items given to make sure we do not mask broken count calculation by creating an actually invalid instance.

Related ticket: DATAMONGO-1120.
2014-12-16 12:41:44 +01:00
Oliver Gierke
1151ec88cd DATACMNS-611 - Improved cache lookups in RepositoryInterfaceAwareBeanPostProcessor.
Refactored predictBeanType(…) to only look up the predicted cached type once.

Related pull request: #108.
2014-12-08 17:55:14 +01:00
Oliver Gierke
13698073e2 DATACMNS-610 - Extracted QueryExecutionResultHandler from RepositoryFactorySupport.
To be able to verify the conversion of List based query execution results into Sets I extracted a QueryExecutionResultHandler that applies the already implemented handling for Optional types and eventually general prost processing in case the return type declared at the repository query method doesn't match the returned value.

Added additional unit tests for Optional handling.
2014-12-04 20:35:49 +01:00
Oliver Gierke
0cb1cca588 DATACMNS-609 - Improved bean definition registration for repository configuration.
The bean definitions that were registered for a repository configuration setup we registered once for every usage of the repository configuration element (annotation or XML). This caused multiple registrations of the very same bean definition which - as in case of the RepositoryInterfaceAwareBeanPostProcessor - apparently leads to performance problems in the container startup. Feedback for the latter claim is already asked for but we improved the registration setup nonetheless.

Introduced a registerIfNotAlreadyRegistered(…) method on RepositoryConfigurationExtensionSupport to allow easy registration of to-b-registered-once-and-only-once beans. We now hint towards the newly introduced method in registerWithSourceAndGeneratedBeanName(…).
2014-12-01 10:16:08 +01:00
Oliver Gierke
447aca6e9c DATACMNS-601 - Fixes for most of the SonarQube warnings. 2014-11-26 09:15:10 +01:00
Oliver Gierke
806214e332 DATACMNS-591 - RepositoryConfigurationDelegate now uses Environment and ResourceLoader everywhere.
We now also use the Environment and ResourceLoader for the component scan to detect whether multiple Spring Data modules are on the classpath.
2014-11-24 22:39:03 +01:00
Oliver Gierke
e14ba802a7 DATACMNS-594 - Fixed creation of type variable map to extend into detected bounds.
The initial setup of the type variable map now unfolds the detected types in the map to make sure we detect all type variables present in the current scope.

Added caching of component and map value TypeInformation instances to avoid repeated creation.
2014-11-14 16:35:17 +01:00
Oliver Gierke
e943fdeae4 DATACMNS-590 - Fixed calculation of nested generics in ParentTypeAwareTypeInformation.
So far, the lookup of the type variable map was preferring the type variable maps detected on parent types in nested structures. This caused the concrete type variables in nested types not being considered correctly which caused the type resolution to fall back to the generic bounds.

We now accumulate the type variable maps to avoid having to lookup a certain map in the nesting hierarchy. The core fix is in ParentTypeAwareTypeInformation's constructor and mergeMaps(…) respectively. Simplified the handling of type variable maps and made proper use of generics throughout the class hierarchy.
2014-11-12 14:31:26 +01:00
Oliver Gierke
fa44b9f807 DATACMNS-585 - After release cleanups. 2014-10-31 21:34:45 +01:00
Spring Buildmaster
3471a64f79 DATACMNS-585 - Prepare next development iteration. 2014-10-30 04:18:53 -07:00
Spring Buildmaster
b728ea297e DATACMNS-585 - Release version 1.9.1.RELEASE (Evans SR1). 2014-10-30 04:18:49 -07:00
Oliver Gierke
bae378de68 DATACMNS-585 - Prepare 1.9.1.RELEASE (Evans SR1). 2014-10-30 12:14:04 +01:00
Oliver Gierke
9b210d2c3e DATACMNS-585 - Updated changelog. 2014-10-30 12:13:47 +01:00
Thomas Darimont
386644190a DATACMNS-583 - DomainClassConverter returns input if given types are the same.
DomainClassConverter now returns input when the source type is identical to the target type. Previously we erroneously tried to convert the sourceType to the idType of the targetType's backing repository. As a side effect we also avoid performing some unnecessary converter hops.

Original pull request: #101.
2014-10-29 09:41:22 +01:00
Thomas Darimont
43793f9b3e DATACMNS-580 - Add section on limiting the query results to reference documentation.
Added section explaining the use of first / top keywords to the reference doc.

Original pull request: #99.
2014-10-21 12:31:44 +02:00
Thomas Darimont
36a6c451fa DATACMNS-577 - Improved JavaDoc on QueryDslPredicateExecutor.
Clarified return values if predicates don't match or return multiple results (for the findOne(…) method). Copied summary to the @return tag.

Original pull request: #96.
2014-10-08 06:47:58 +02:00