Commit Graph

204 Commits

Author SHA1 Message Date
Oliver Gierke
5cfd8bc3df DATACMNS-61 - Fixed Parameters lookup in QueryMethod. 2011-08-21 14:46:44 +02:00
Oliver Gierke
2b167566e1 DATACMNS-62 - Dropped QueryMethod.Type enum and made accessor methods for query type public. 2011-08-21 14:26:30 +02:00
Oliver Gierke
4074f2e387 DATACMNS-61 - Refactored QueryMethod, Parameters and Parameter to be more open for extension.
QueryMethod now provides a protected method to allow customization of the Parameters instance being used. Removed final modifier from Parameters and Parameter classes to allow extension. Refactored Parameter to be based on Spring's MethodParameter for more encapsulation. Added callback method to Parameters to allow customizing Parameter instance creation. Added protected method to ParametersParameterAccessor to get any parameter value by index.
2011-08-21 14:23:47 +02:00
Oliver Gierke
307993ac9b Fixed potential NullPointerExceptions for TypeDiscoverer.getComponentType() and getMapValueType(). 2011-08-19 22:44:13 +02:00
Oliver Gierke
c71f2684d3 Made properties of AbstractMappingContext final where possible. 2011-08-19 21:12:03 +02:00
Oliver Gierke
a330301b6a SimpleTypeHolder considers Object to be a simple type. 2011-08-19 21:11:24 +02:00
Oliver Gierke
40648c82a7 Formatting. 2011-08-16 17:47:12 +02:00
Oliver Gierke
1ee347cf40 DATACMNS-59 - AbstractQueryCreator now handles static and dynamic sorting combined.
Added and(…) method to Sort to combine two Sort instances and produce a resulting Sort.
2011-08-16 17:47:00 +02:00
Oliver Gierke
ba3cbe7244 DATACMNS-57 - TypeDiscoverer now discovers generic constructor parameters correctly.
Fixed formatting for unit test as well.
2011-07-28 17:46:57 +02:00
Oliver Gierke
30de1d55b7 DATACMNS-56 - Tweak to algorithm of PreferredConstructorDiscoverer to pick up single argument-taking constructor. 2011-07-25 23:38:18 +02:00
Oliver Gierke
178b046f35 Removed obsolete imports in template.mf. 2011-07-25 23:03:54 +02:00
Oliver Gierke
2c538dbb15 DATACMNS-56 - PreferredConstructorDiscoverer does not throw an exception in case no preferred constructor is found. 2011-07-25 23:02:27 +02:00
Oliver Gierke
596a03c04c DATACMNS-55 - TypeDiscoverer now handles types extending Collections and Maps as well. 2011-07-25 22:59:14 +02:00
trisberg
0232fdacbf prepared for 1.2.0 snapshot builds 2011-07-21 13:13:00 -04:00
trisberg
3c3012db0d prepared for Spring Data Commons 1.1.0.RELEASE 2011-07-21 11:46:48 -04:00
Thomas Risberg
1c323b4800 changed dependency on "querydsl-mongodb" with "querydsl-core" 2011-07-21 11:30:28 -04:00
Thomas Risberg
aa3c29c5a3 prepared for 1.1.0 snapshot builds 2011-07-19 11:50:52 -04:00
Thomas Risberg
1d52b05507 prepared for Spring Data Commons 1.1.0.RC1 release 2011-07-19 11:48:40 -04:00
Oliver Gierke
abfe323e75 Removed unused import. 2011-07-19 17:34:31 +02:00
Oliver Gierke
f8427258d3 DATACMNS-53 - Upgrade to Querydsl 2.2.0.
Updated Mysema APT plugin to 1.0.2. Added Mysema repository to parent pom to correctly find new versions.
2011-07-19 17:31:37 +02:00
Oliver Gierke
b225930a07 DATACMNS-53 - Updated Querydsl to 2.2.0. 2011-07-19 12:50:15 +02:00
Oliver Gierke
751ca2ae22 DATAJPA-71 - Tweaked AbstractQueryCreator to be more flexible.
AbstractQueryCreator is now more lenient. We're now allowing instantiation without a ParameterAccessor for implementations that don't want to do parameter binding during query creation. We additionally provide a createQuery(Sort) now to allow handing in a dynamic Sort parameter taken from a query method to apply sorting even in case we don't bind parameters directly.

Added a method to Parameters to discover whether we potentially sort dynamically which simply tests for a Sort or Pageable parameter in the method signature.
2011-07-19 08:58:39 +02:00
Oliver Gierke
edf982d159 Removed .classpath and .project files from repo.
Probably will cause need for re-importing into eclipse.
2011-07-15 10:11:12 +02:00
Oliver Gierke
6e79fcbde0 Polished JavaDoc. 2011-07-15 10:09:35 +02:00
Oliver Gierke
954c74b788 DATACMNS-52 - Redeclared methods in intermediate repository interfaces are now discovered correctly.
We deeply have to resolve the generic types before doing the type comparison. Tweaked DefaultRepositoryInformation and added test cases.
2011-07-13 20:27:12 +02:00
Oliver Gierke
d6ab8e37b3 Polished test dependencies.
Upgraded to Hamcrest 1.2.1. Removed obsolete Log4J transitive dependency exclusions as 1.2.16 does not include these dependencies anymore. Using Mockito and JUnit dependencies not containing Hamcrest types.
2011-07-13 20:22:00 +02:00
Oliver Gierke
5a6427fdcf DATACMNS-50 - Added ability to define PersistentProperty order for PersistentEntities.
BasicPersistentEntity now has a constructor taking a Comparator and holds PersistentProperty instances in a TreeSet if a COmparator is given at construction. Removed getPersistentPropertyNames() from PersistentProperty interface as it's not used anywhere.
2011-07-06 18:04:52 +02:00
Oliver Gierke
7b3e61e050 DATACMNS-49 - Added infrastructure to read queries from a Properties file.
Added NamedQueries abstraction to hide a map of names to manually defined queries. Added PropertiesBasedNamedQueries to hold the named queries in a Properties instance. Extended resolveQuery(…) method in QueryLookupStrategy to take a NamedQuery instance to allow query creation callback use the named queries.

Added optional 'named-queries-location' attribute to the repositories namespace the bean definition parser loads the properties from to populate a PropertiesBasedNamedQueries instance and pipe it into the repository factory. Store implementations have to default the name to lookup in their RepositoryConfiguraion class (see CommonRepositoryConfigInformation.getNamedQueriesLocation()).
2011-06-23 19:05:49 +02:00
Thomas Risberg
687a2ed0b5 prepared for 1.1.0 snapshot builds 2011-06-21 16:23:29 -04:00
Thomas Risberg
c3406a7ebe prepared for Spring Data Commons 1.1.0.M2 release 2011-06-21 16:19:58 -04:00
Oliver Gierke
dc50f489ba DATACMNS-48 - Renamed QueryExecuterMethodInterceptor to QueryExecutorMethodInterceptor. 2011-06-21 21:58:59 +02:00
Oliver Gierke
dcd4f0772c Exposing owner type for Property. 2011-06-17 19:41:37 +02:00
Oliver Gierke
6ddcad6998 Property instances can now be created from a dot notation as well.
Some JavaDoc polishing. Removed private method to lookup actual property type (read transparently resolving collection component and map value types) over TypeInformation.getActualType().
2011-06-17 19:41:37 +02:00
Oliver Gierke
3addb9c2f8 Added TypeInformation.getActualType().
The method transparently resolves the property type, collection component type or map value type depending on what the core type is.
2011-06-17 19:41:36 +02:00
Oliver Gierke
e86721fbdb Added MappingContext.getPersistentPropertyPath(…).
The method allows to get PersistentProperty instances for a given path expression.
2011-06-17 19:36:57 +02:00
Oliver Gierke
8e217bb4e9 Merge pull request #2 from ractive/master
DATACMNS-46 - Make org.joda.time an optional import.
2011-06-15 11:06:00 -07:00
Oliver Gierke
23dbfe27bb Added getType() method to Parameter value object. 2011-06-15 19:43:08 +02:00
Oliver Gierke
d2e46f6770 JavaDoc polishing. 2011-06-15 19:42:47 +02:00
Oliver Gierke
736b8adf08 Refactored package structure.
Resolved dependency cycles in repository and mapping packages. Introduced repository.core package as well as core.support where most of the type of former repository.support is in now. New repository.support only contains additional stuff built on top of core repository abstraction (e.g. Converters, PropertyEditors). Added some more unit tests to core mapping abstractions and removed not needed methods from its API.
2011-06-13 20:23:26 -07:00
Oliver Gierke
5650b068ed DATACMNS-31 - Added null check to SimpleTypeHolder.isSimpleType(…).
The MappingBeanHelper mentioned in the ticket was recently replaced by SimpleTypeHolder.
2011-06-10 15:03:08 -07:00
Oliver Gierke
7a13657eb5 DATACMNS-169 - Reworked simple type handling in mapping subsystem.
All simple type discovery is now done through a SimpletypeHolder instance that carries a few default types considered to be simple but is configurable to carry additional ones. The mapping subsystem uses an instance of that class to do simple type decisions and thus allows customizing what is to be considered a simple type by simply dependency injecting a value object.
2011-06-09 16:26:48 -07:00
Jean-Pierre Bergamin
cb01d85397 DATACMNS-46 - make org.joda.time an optional import 2011-06-09 09:18:45 +02:00
Oliver Gierke
351e37e4eb DATACMNS-45 - Improved property handling in TypeDiscoverer and Property.
TypeDiscoverer now looks up property type using a PropertyDescriptor if no field with the given name can be found. Property now handles _-prefixed properties as well.
2011-06-07 15:49:26 -07:00
Oliver Gierke
3453806569 DATACMNS-44 - Fixed BindableParameterIterator.hasNext(). 2011-06-07 12:43:41 -07:00
Oliver Gierke
d5300ed1bc DATACMNS-43 - Corrected exception message in PreferredConstructorDiscoverer to mention PersistenceConstructor. 2011-06-07 11:50:28 -07:00
Oliver Gierke
364a84ffb8 DATACMNS-42 - MappingBeanHelper now considers all Numbers to be simple types.
Fixed bug in isSimpleType(…) along the lines.
2011-06-06 14:44:28 -07:00
Oliver Gierke
12d5c0ddb9 Polished JavaDoc. 2011-06-06 11:07:21 -07:00
Thomas Risberg
dfca1c61a2 prepared for 1.1.0 snapshot builds 2011-06-02 08:58:14 -04:00
Thomas Risberg
dff80c6f3d prepared for Spring Data Commons 1.1.0.M1 release 2011-06-02 08:54:44 -04:00
Oliver Gierke
70da7b00f8 DATACMNS-41 - Refactored DefaultRepositoryInformation to take custom implementation class into account as well. 2011-06-01 00:29:52 +01:00