635 Commits

Author SHA1 Message Date
Spring Buildmaster
830135690f DATACMNS-463 - Prepare next development iteration. 2014-03-10 05:46:25 -07:00
Spring Buildmaster
9bd280e8da DATACMNS-463 - Release version 1.6.5.RELEASE. 2014-03-10 05:46:21 -07:00
Christoph Strobl
6ec6eb7269 DATACMNS-463 - Prepare release 1.6.5.RELEASE.
Updated readme, template, changelog and notice to reflect recent version and changes. Update reference to reflect spring.io urls.
2014-03-10 13:40:11 +01:00
Oliver Gierke
35c05c2777 DATACMNS-462 - AbstractPersistentProperty considers collections and maps entities now.
Removed the rejecting check for collections and maps and solely rely on the evaluation of the actual type for the ….isEntity() decision in AbstractPersistentProperty. This will cause collection and map properties also being inspected for persistent types as soon as the owner type gets added to the mapping context.
2014-03-06 08:44:59 +01:00
Michael Hunger
49f536ecb2 DATACMNS-447 - Soften too strict strickt-check in MappingContext.
Previously we directly threw a MappingException in MappingContext.getPersistentEntity(TypeInformation) when the MappingContext was in strict mode and we were given a TypeInformation for which we didn't have a PersistentEntity already.

We now first check whether we should actually create a PersistentEntity for the given TypeInformation if no PersistentEntity is available, before throwing a  MappingException - if we should not then we simply return null (e.g. for simple types like Integer or Double).

Original pull requests: #66, #71.
2014-03-05 11:36:41 +01:00
Oliver Gierke
61540f75dd DATACMNS-460 - Repository metadata now supports array return types for query methods.
Added array checks to AbstractRepositoryMetadata.getReturnedDomainClass() to detect array component types. QueryMethod now considers methods returning arrays to be collection query methods.
2014-03-05 08:25:37 +01:00
Oliver Gierke
2e2e53beb1 DATACMNS-442 - Improved documentation to mention @NoRepositoryBean. 2014-02-19 14:49:27 +01:00
Oliver Gierke
ba328d5791 DATACMNS-442 - Added test case to show that id resolution succeeds for intermediate repositories.
Adapted test case failing on Spring 4 due to eager RepositoryMetadata resolution.
2014-02-19 14:03:16 +01:00
Spring Buildmaster
9c40f883cf DATACMNS-438 - Prepare next development iteration. 2014-02-17 13:19:23 +01:00
Spring Buildmaster
18ebd43eb5 DATACMNS-438 - Release version 1.6.4.RELEASE. 2014-02-17 01:26:31 -08:00
Oliver Gierke
1e238d7c94 DATACMNS-438 - Prepare 1.6.4.RELEASE.
Updated pom.xml, change log etc.
2014-02-17 10:19:06 +01:00
Oliver Gierke
7ac97bfeae DATACMNS-440 - Fixed map value type resolving for Map value types.
Previously the map value type resolving algorithm checked the value type to be of type Map again to shortcut the resolution. We now weakened this to an assignment check and eagerly resolve the generic type if its bound on exactly that level already. If no concrete type argument can be found, we fall back to the general generics resolution mechanism.
2014-02-17 10:19:05 +01:00
Oliver Gierke
d5d51cd35f DATACMNS-439 - AnnotationRepositoryConfigSource now evaluates REGEX and ASPECTJ filters.
We now leniently detect AspectJ and regular expression filters in an @Filter annotation in @Enable…Repositories annotations.
2014-02-12 12:14:01 +01:00
Oliver Gierke
52ba70673b DATACMNS-432 - Fix regression in Repositories.
The changes in 899cf25 causes Repositories not finding any repository instances in case the lookup of beans by type for RepositoryFactoryInformation if the initialization causes as cyclic reference. Even worse, we might run into cases in which the attempt to access the beans by type causes transitive object creation which results in a successful lookup on a second attempt.

This is effectively caused by the catch-block in DefaultListableBeanFactory.getBeansOfType(…) which registers the suppressed exception as the method is used for lookup the beans for injection points with Lists and Maps.

We now explicitly look for bean names first and access the bean by name afterwards, which guarantees the exception to be thrown if it occurs. This will reveal the underlying issue and let user potentially deal with it. It's generally recommended to refer to Repositories in a very lazy fashion (using Provider<T>, ObjectFactory<T> or @Lazy on the injection point as of Spring 4) to avoid creating circular dependencies through by-type-lookups.
2014-02-12 10:26:05 +01:00
Oliver Gierke
15a0329979 DATACMNS-436 - Order.equals(…) / hashCode() / toString() now consider ignore case flag.
Extended equals(…), hashCode() and toString() methods t consider the ignore case flag held in an Order instance.
2014-02-06 18:16:50 +01:00
Oliver Gierke
8e14a79e94 DATACMNS-432 - Make Repositories effectively immutable.
We now eagerly populate the repository factory information in Repositories to provide a read only view on the discovered repository information. Previously lookup operations could also change some maps that held information about the until then discovered repository meta data which could lead to ConcurrentModifcationExceptions in multi-threaded environments. Since we don't allow any modification after construction this won't happen anymore.

We also cache the computed RepositoryMetadata in RepositoryFactoryBeanSupport.

Original pull request: #63.
2014-02-06 18:03:17 +01:00
Martin Baumgartner
bedbe926b9 DATACMNS-433 - Added Is prefix to Like keywords.
Like expressions are now also recognized if they're prefixed with Is. So both "IsLike" and "Like" are recognized as well as "NotLike" and "IsNotLike".
2014-02-06 17:08:33 +01:00
Oliver Gierke
659d64d63b DATACMNS-429 - Improved JavaDoc for PageRequest and Sort.
Added a few missing parameter documentations in terms of semantics and nullability.
2014-01-23 12:23:32 +01:00
Oliver Gierke
5f8516f505 DATACMNS-422 - Mitigate semantic changes in Spring 4.0's GenericTypeResolver.
In case of an unresolvable generic parameter in TypeDiscoverer's getTypeArgument(…) we check for a generic super type for the given bound and fall back to Object in case we find a parameterized type.
2014-01-19 15:26:23 +01:00
Oliver Gierke
debf5c736c DATACMNS-412 - Fixed potential classloader leak.
Turned the static cache of RepositoryInformations in RepositoryFactorySupport into a non-static one to avoid the instance from potentially surviving redeployments in web app scenarios.
2014-01-17 15:46:51 +01:00
Oliver Gierke
c414f05e23 DATACMNS-417 - Added contribution guidelines.
Linked to the actual contribution guidelines maintained in the Spring Data Build project.
2014-01-14 13:40:12 +01:00
Oliver Gierke
69a6960eec DATACMNS-407 - Fixed sort parameter building in HateoasAwareSortHandlerMethodArgumentResolver.
We're now replacing the sort parameter for the URI to be created instead of simply appending them to the source URI to prevent previously applied sort parameters to be taken forward.
2013-12-16 13:00:06 +01:00
Thomas Darimont
c4aedd6610 DATACMNS-410 - Fixed bug in ReflectionRepositoryInvoker#invokeFindOne.
We now delegate calls to invokeFindOne to the correct target repository.

Original pull request: #80.
2013-12-13 13:24:01 +01:00
Spring Buildmaster
47cf61bf28 DATACMNS-409 - Preparing next development iteration. 2013-12-11 08:16:53 -08:00
Spring Buildmaster
f5f60d7318 DATACMNS-409 - Release version 1.6.3.RELEASE. 2013-12-11 08:16:49 -08:00
Thomas Darimont
13729964b9 DATACMNS-409 - Prepare Release 1.6.3.
Updated changelog, notice and readme.
2013-12-11 13:38:13 +01:00
Oliver Gierke
c2af939cd3 DATACMNS-379 - Fixed AIOOBE in SortHandlerMethodArgumentResolver. 2013-12-05 14:47:38 +01:00
Oliver Gierke
d5de27146e DATACMNS-408 - Handle invalid pagination and sorting parameters gracefully.
The PageableHandlerMethodArgumentResolver and SortHandlerMethodArgumentResolver now transparently ignore invalid values provided for page number, size and sort. We fall back to ignore the invalid values (for sort) and fall back to the defaults where appropriate (page number and size).

Used and adapted test cases from pull request #48.
2013-12-05 11:14:36 +01:00
Thomas Darimont
4d974f1bf1 DATACMNS-366 - Test for SortHandlerMethodArgumentResolver and property lists.
Added test case to show SortHandlerMethodArgumentResolver can deal with property lists.

Original pull request: #45.
2013-12-05 11:11:47 +01:00
Oliver Gierke
93899f754e DATACMNS-377 - Prevent page sizes less than one.
PageRequest now actively prevents page sizes less than one. PageableHandlerMethodArgumentResolver falls back to default page size if it detects a page size less than one. It also rejects invalid default configuration using @PageableDefault.
2013-12-05 11:08:01 +01:00
Oliver Gierke
5b72373ddf DATACMNS-406 - Polishing.
Refactored code in RepositoryMetadata implementations to avoid compiler warnings. Some JavaDoc polishing.

Original pull request: #58.
2013-11-21 12:40:46 +01:00
Thomas Darimont
de90e58c4a DATACMNS-406 - Tighten contract for RepositoryMetadata implementations.
We now resolve the domain and id-types eagerly within the constructor of AbstractRepositoryMetadata implementations to prevent a RepositoryMetadata instance to be created in an invalid state. Pulled-up repositoryInterface property to AbstractRepositoryMetadata.

Original pull request: #58.
2013-11-21 12:40:25 +01:00
Oliver Gierke
88c2c0e0de DATACMNS-393 - Improved CRUD method detection in DefaultCrudMethods.
Slightly refined the detection algorithm to favor early returns and thus avoid unnecessary reflection lookups.

Original pull request: #55.
2013-11-12 15:12:29 +01:00
Thomas Darimont
59a39d0be8 DATACMNS-393 - Improved CRUD method detection in DefaultCrudMethods.
The detection of CRUD methods in DefaultCrudMethods is now carried out in a more robust and predictable fashion. The exact algorithm is described in the JavaDoc.

Original pull request: #55.
2013-11-12 15:12:16 +01:00
Oliver Gierke
c2b71a8b94 DATACMNS-389 - RepositoryFactorySupport now caches RepositoryInformation.
Instead of creating a new DefaultRepositoryInformation for each call to getRepositoryInformation(…) we now actively cache the created instances per repository type and custom implementation class.
2013-11-12 15:12:01 +01:00
Oliver Gierke
dc7a9a442e DATACMNS-390 - Create defensive copy for persistent entities in AbstractMappingContext.
To prevent ConcurrentModificationExceptions when iterating over PersistentEntities while further entity types are potentially added to the MappingContext we now return a immutable defensive copy of the current entity set.
2013-11-04 11:29:31 +01:00
Ben Hale
62d5edf722 DATACMNS-388 - Improve declaration of PagedResourceAssembler in JavaConfig.
Based on the discussion in SPR-11004 [0], the declaration of the PagedResourcesAssembler in HateoasAwareSpringDataWebConfiguration will not result in it being autowired using Spring 4.0 in certain circumstances.  This change loosens the declaration so that it can be autowired into declarations that have specific generics declarations.

Original pull request: #51.

[1]: https://jira.springsource.org/browse/SPR-11004
2013-10-27 16:49:30 +01:00
Oliver Gierke
0d2bf97d94 DATACMNS-387 - Improvements in null handling in PartTree area.
We're now rejecting invalid constructor arguments handed to ClassTypeInformation, Part, PartTree and PropertyPath. Beyond that we skip the creation of a Part for an empty path segment, so that you don't end up with an invalid Part instance for a findAllByOrderByFooAsc.
2013-10-27 16:32:41 +01:00
Spring Buildmaster
ad622d8164 DATACMNS-378 - Prepare next development iteration 2013-10-25 17:07:49 +02:00
Spring Buildmaster
df528ab306 DATACMNS-378 - Release version 1.6.2.RELEASE. 2013-10-25 05:32:49 -07:00
Oliver Gierke
f1709c3ab2 DATACMNS-378 - Prepare 1.6.2.RELEASE.
Updated changelog, notice and readme.
2013-10-25 14:04:27 +02:00
Oliver Gierke
7433b0e070 DATACMNS-385 - Fixed repository method matching for iterable entities.
When matching the save(Iterable<T>) method of CrudRepository for an entity implementing Iterable we accidentally determined CrudRepository.save(T) as target method if the entity type under consideration implements Iterable.

We now explicitly check for the parameter type not being Iterable when matching the domain type generics in matchesGenericType(…).
2013-10-23 18:51:28 +02:00
Thomas Darimont
9b6f0b7b25 DATACMNS-382 - Remove copy of AnnotationTypeFilter in RepositoryComponentProvider.
Removed the copied class to use the one from Spring Core now that the necessary tweak is available in Spring 3.1.x.

Original pull request: #49.
2013-10-17 18:14:22 +02:00
Thomas Darimont
368f190dc5 DATACMNS-374 - Improved error handling in case of a missing repository.
In Repositories.getCrudInvoker(…) we now throw an IllegalArgumentException if we cannot find an appropriate repository for the given domain class. Previously it just blew up with a NullPointerException without a clear error message.

Original pull request: #46.
2013-10-07 13:21:55 +02:00
Oliver Gierke
7924d91023 DATACMNS-376 - Repositories now inspects user class for factory lookups.
When looking up the RepositoryFactoryInformation for a domain type we now make sure we look up the user type to not accidentally try to do so for a persistence provider generated proxy class for the original type. This prevents us from not finding PersistentEntity instances, Repository- or EntityInformation accidentally.
2013-10-01 17:27:45 +02:00
Thomas Darimont
61373d8567 DATACMNS-368 - Add test for PartTree properties that contain keyword sequences.
Added appropriate test to PartTreeUnitTests to check whether the regular expression in PartTree doesn't accidentally finds keywords in property expressions.
2013-09-23 15:10:18 +02:00
Spring Buildmaster
cccaba35fc DATACMNS-367 - Prepare next development iteration. 2013-09-09 22:56:35 -07:00
Spring Buildmaster
735124476b DATACMNS-367 - Release version 1.6.1.RELEASE. 2013-09-09 22:56:32 -07:00
Oliver Gierke
759db6e1de DATACMNS-367 - Prepare 1.6.1.RELEASE. 2013-09-09 22:49:06 -07:00
Oliver Gierke
5c0f2ea157 DATACMNS-363 - Revert support for unicode characters in in query method names.
This reverts commit f7679d41b8 as it introduced every Or in query method names to be considered a keyword.
2013-09-09 22:41:35 -07:00