273 Commits

Author SHA1 Message Date
Spring Buildmaster
7d40124bd5 Release version 1.2.1.RELEASE 2012-02-07 11:02:15 -08:00
Oliver Gierke
bea702caac DATACMNS-130 - Prepare 1.2.1 release.
Polished pom.xml files to use repo.springsource.org repositories. Removed invalid XML element. Added pom information to deploy to Maven Central.
2012-02-07 19:57:12 +01:00
Oliver Gierke
c2ed3a2ad2 DATACMNS-125 - QueryExecutorMethodInterceptor now correctly rejects repository interfaces with query methods if no QueryLookupStrategy defined. 2012-01-24 10:25:57 +01:00
Oliver Gierke
1ede215160 DATACMNS-119 - Order now implements Serializable. 2012-01-11 13:43:28 +01:00
Oliver Gierke
e7c1e1d805 Prepared 1.2.x development branch. 2012-01-11 13:43:03 +01:00
Oliver Gierke
8c360af381 DATACMNS-118 - Prepare 1.3.0 development branch. 2011-12-22 20:24:42 +01:00
Oliver Gierke
5213eace28 DATACMNS-118 - Preparations for 1.2.0 release.
Updated changelog and version. Removed milestone repository and use Artifactory repository now.
2011-12-22 20:17:11 +01:00
Oliver Gierke
0053e335b5 DATACMNS-104 - Upgraded to Spring 3.0.7.
Removed GenericTypeResolver copy as all necessary local changes have been released with Spring 3.0.7.
2011-12-22 20:08:44 +01:00
Oliver Gierke
48d4c05a9d DATACMNS-114 - Improved detection of custom implementations for repositories.
Fixed edge case scenario where the lookup for repository implementation classes picked up multiple classes if they ended with the same suffix (e.g. FooRepoImpl, AnotherFooRepoImpl). We're now expecting the classname to be an exact match but still allow nested packages. Changed the parser to reject multiple found implementation classes strictly now to at least avoid undiscoverable errors in case an ambiguity is popping up.
2011-12-20 12:29:38 +01:00
Oliver Gierke
89410efb7a DATACMNS-112, DATACMNS-109 - Upgraded to Querydsl 2.3.0. 2011-12-19 18:03:08 +01:00
Dirk Mahler
eebc822dff DATACMNS-110 - Added support for CDI integration for repositories.
Added custom CDI extension to use repositories in a CDI environment. Base class picks up all Spring Data repository interfaces and allows working with qualifiers to bind beans to be created to qualifiers.
2011-12-19 16:29:46 +01:00
Oliver Gierke
0334a2dd78 DATACMNS-113 - Introduced annotations to resolve custom conversion disambiguities.
Introduced @ReadingConverter and @WritingConverter to allow to resolve disambiguates that might arise when implementing custom Converters.

Suppose we implemented a Converter<String, Class> and the store is able to handle both String and Class as native types. In this case there's no way to determine whether the converter shall actually be used to convert String properties into Class instances when writing or to create Class instances from Strings when reading. Thus the @ReadingConverter comes in handy in this case to tell the infrastructure to consider the converter for reading only.
2011-12-16 14:11:08 +01:00
Mark Pollack
a0c91672ae prepare for Spring Data Commons 1.2.0.BUILD-SNAPSHOT 2011-12-06 17:37:12 -05:00
Mark Pollack
a15186013f prepare for Spring Data Commons 1.2.0.RC1 2011-12-06 17:07:08 -05:00
Oliver Gierke
188e396268 DATACMNS-107 - Allow IsTrue/IsFalse as keywords for True/False. 2011-12-06 17:02:54 +01:00
Oliver Gierke
ca4d2f504a DATACMNS-108 - Fixed ClassCastException in RepositoryFactorySupport. 2011-12-05 18:58:49 +01:00
Oliver Gierke
b3c8cb5620 DATACMNS-88 - Map value types are now resolve correctly for generic types extending Map.
Extracted base ParentTypeAwareTypeInformation class as base class for TypeInformations that need to consider the parent's type variable map.
2011-12-05 16:56:29 +01:00
Oliver Gierke
498f40b69f DATACMNS-107 - Added support for True and False as query method keywords. 2011-12-05 12:52:52 +01:00
Oliver Gierke
f7b796dcee DATACMNS-94 - Added Regex and Exists keywords for query parser. 2011-12-05 12:52:21 +01:00
Oliver Gierke
e6431fccc7 DATACMNS-106 - Introduced QueryMethod.getReturnedObjectType(). 2011-12-02 23:31:07 +01:00
Oliver Gierke
4a8d7a6f7c DATACMNS-39 - Formatting. 2011-12-02 15:34:23 +01:00
Oliver Gierke
e195abc5c9 DATACMNS-39 - TypeDiscoverer handles WildcardTypes now.
We now resolve the first bound from wildcard types now.
2011-12-02 15:34:08 +01:00
Oliver Gierke
f8b37b8501 DATACMNS-91 - Clarify contract for CrudRepository.
Added JavaDoc to document expected exceptions for null parameters.
2011-12-02 13:31:02 +01:00
Oliver Gierke
0b04251bbe DATACMNS-92 - PersistentEntities are not held in cache if verify() fails.
Documented verify() to throw a MappingException in case verification fails. Let this exception flying cause the PersistentEntity already added to the cache be removed from it in turn.

Fixed execution of integration tests and tests in classes starting with Abstract* along the way. Upgraded to Mockito 1.8.5.
2011-12-02 12:54:51 +01:00
Oliver Gierke
a5a925e37a DATACMNS-77 - Introduced caching inside ClassTypeInformation.
ClassTypeInformation now holds a cache for Class<?> to TypeInformation<?> mappings. It also exposes constants for Object, Collection, Set, List and Map TypeInformations.
2011-12-02 11:29:11 +01:00
Oliver Gierke
a4ac30d52b DATACMNS-108 - BeanWrapper now handles exceptions.
Removed explicit declaration of throwing IllegalAccessException and InvocationTargetException.
2011-12-02 10:08:10 +01:00
Oliver Gierke
8286bffb89 DATACMNS-101 - Made AbstractMappingContext more flexible for extension.
The former getNestedTypeToAdd(…) method in AbstractMappingContext is now located in PersistentProperty to allow easier customization of the implementation. We also not only support returning one type from it but rather an Iterable of them to prepare handling of custom types implementing Collection interfaces.
2011-11-28 15:01:54 +01:00
Oliver Gierke
f0735392d9 DATACMNS-103 - Create hybrid Spring 3.0.6 / 3.1 build.
Introduced version range for Spring dependency of [3.0.6.RELEASE, 3.1.0.RC1]. This causes Maven to scan the metadata in the configured repositories to find the latest version up to Spring 3.1.0.RC1. For users having the Spring Milestone repo configured this will resolve against 3.1.0.RC1 then. All others will get the latest one from Maven Central which is 3.0.6. To let Bundlor still use 3.0.6 I've created a org.springframework.version.30 property and let template.mf use that.
2011-11-28 12:10:51 +01:00
Oliver Gierke
1fb6e70c2e DATACMNS-100 - Removed Number from the Set of simple types.
Removing Number from SimpleTypeHolder's default Set of types results in
Number sub-types not explicitly listed not being considered as simple
by default.
2011-11-24 15:15:01 +01:00
Oliver Gierke
966b9e1da9 Removed unused import. 2011-11-23 12:40:06 +01:00
Oliver Gierke
1468ba5735 DATACMNS-99 - SimpleTypeHolder considers complex Enums as simple now.
Fixed SimpleTypeHolder.isSimpleType(Class<?> type) for calls where the Class object handed in is derived from an Enum that implements an abstract method. These Class objects return false for a call to isEnum(). So an ….isAssignableFrom(…) check is safer.
2011-11-23 11:51:25 +01:00
Oliver Gierke
904578d034 DATACMNS-97 - Added PartTree.getParts(Type type).
Added method to allow iterating over Parts of a given type.
2011-11-21 19:00:36 +01:00
Oliver Gierke
9b3d2d0669 DATACMNS-98 - Fixed potential ClassCastException for domain type lookup for query methods.
Refactored the definition of what domain class is returned from a query method into a common AbstractRepositoryMetadata and moved ClassUtils.getReturnedDomainClass into RepositoryMetadata. Moved test cases accordingly. Added getReturnType(Method method) to TypeInformation.
2011-11-21 19:00:01 +01:00
Oliver Gierke
3a38161953 DATACMNS-91 - Clarify JavaDoc of CrudRepository.
Explicitly define the expected behavior for null parameters in CRUD methods to throw an IllegalArgumentException.
2011-10-24 14:47:08 -05:00
Jean-Pierre Bergamin
0762a34fab DATACMNS-93 - Add dynamic package import directive.
Added "DynamicImport-Package: *" to template.mf so that repository interfaces from other bundles can be read.
2011-10-24 14:45:42 -05:00
Thomas Risberg
d56e9a0dc0 prepared for 1.2.0 snapshot builds 2011-10-21 16:19:28 -04:00
Thomas Risberg
c3e04eefea prepared for Spring Data Commons 1.2.0.M2 release 2011-10-21 16:16:15 -04:00
Oliver Gierke
02e884ed9d DATACMNS-87 - Avoid creating PersistentEntity for leaf property in AbstractMappingContext.getPersistentPropertyPath(…). 2011-10-13 16:43:32 +02:00
Oliver Gierke
5829ad2eb7 DATACMNS-73 - Further refactorings.
Add license headers and made properties final where possible.
2011-10-12 18:31:49 +02:00
Thomas Risberg
60d0b9c428 DATACMNS-73 - Created dedicated cross-store package.
Adding back/moving missing classes
2011-10-12 10:54:20 -04:00
Oliver Gierke
d71e6c093c DATACMNS-73 - Created dedicated cross-store package.
Removed obsolete classes.
2011-10-12 14:39:53 +02:00
Thomas Risberg
281fd27cc0 DATACMNS-86 Removing transaction package and moving ChangeSetBeckedTransactionSynchronization class to persistence package 2011-10-12 05:43:32 -04:00
Oliver Gierke
f54ddf7cb1 Polishing. 2011-10-11 13:02:21 +02:00
Michael Hunger
89b2aa162a DATACMNS-85 - Extended PersistentPropertyPath with getLength() and getParentPath(). 2011-10-10 14:53:13 +02:00
Oliver Gierke
a73e2ed3e0 DATACMNS-85 - Extended PersistenPropertyPath.
PersistentPropertyPath got a few new methods to build String representations of it. Beyond that we introduced accessor methods for the base and leaf path as well as the ability to detect base paths and create path extensions based on a given base path.
2011-10-09 13:03:50 +02:00
Oliver Gierke
4e27cce691 DATACMNS-84 - Improved infrastructure to access PersistentProperty paths.
Refactored MappingContext.getPersistentPropertyPath(…) to return a PersistentPropertyPath instance which allows iterating over the properties returned for the Property delivered as well as creating dot paths from it.

Renamed Property to PropertyPath and moved it into mapping package.
2011-10-07 11:36:20 +02:00
Oliver Gierke
6258d05d58 DATACMNS-82 - Removed transaction manager bean configuration.
Always setting a transaction manager breaks repository factories that do not expose a transactionManager property. Thus it's now the responsibility of the concrete BeanDefinitionParser to parse transaction manager configuration.
2011-09-30 12:11:36 +02:00
Oliver Gierke
fb9fb5edde DATACMNS-83 - RepositoryInterfaceAwareBeanPostProcessor logs not being able to load a repository interface. 2011-09-30 10:16:22 +02:00
Oliver Gierke
d3c2cce6ca DATACMNS-82 - Default referenced transaction manager to transactionManager.
Setting a default transaction manager bean name increases performance of transaction interception as we can lookup the PlatformTransactionManager by name rather than by type.
2011-09-29 18:51:41 +02:00
Oliver Gierke
532e5b2ace DATACMNS-81 - Fixed potential NullPointerException.
ConcurrentHashMap does not allow null values to be set so we now store Void.class as custom null-value instead and default this value back to null in predictBeanType(…).
2011-09-29 18:45:31 +02:00