Commit Graph

3076 Commits

Author SHA1 Message Date
Oliver Gierke
7126b11173 Formatting. 2011-09-01 18:15:09 +02:00
Phil Webb
112127d35f DATACMNS-69 - Updated cache key to bean name rather than class. 2011-09-01 14:47:12 +02:00
Oliver Gierke
1646f85a53 DATADOC-68 - Refactorings to support geo-near queries.
Removed dependency from Parameter to Parameters as it is obsolete. Let ClassUtils return component type for Iterables piped into getReturnedDomainClass(…).
2011-08-31 21:48:49 +02:00
Oliver Gierke
a32d80379b DATACMNS-69 - Added caching to RepositoryInterfaceAwareBeanPostProcessor.
Actual types resolved in getClassForPropertyValue(…) get cached now to avoid unnecessary attempt to load classes.
2011-08-31 21:22:47 +02:00
Oliver Gierke
c57d5246e3 DATACMNS-68 - Fixed potential NPE in AbstractPersistentProperty.
Fixed ClassTypeInformation returning correct component types for types implementing or extending a Collection or Map type.
2011-08-31 21:06:03 +02:00
Phillip Webb
0d83b27f62 DATACMNS-66 - Update shouldIgnoreCase to enum.
Change shouldIgnoreCase() to return an enum value allowing for exceptions to be thrown depending on when ignoreCase or allIgnoreCase is used.
2011-08-29 17:59:40 +02:00
Phillip Webb
f96dc0817a DATACMNS-66 - Polishing.
Removed Part.shouldAlwaysIgnoreCase() and don't constraint Part.shouldIgnoreCase() to String parts anymore.
2011-08-25 20:51:35 +02:00
Phil Webb
7ff8a43a75 DATACMNS-66 - Added support for IgnoreCase as query keyword.
The query parsing subsystem now supports using IgnoreCase when referencing String parameters, e.g.:

  findByUsernameIgnoreCase(String username);

Both 'IgnoreCase' and 'IgnoringCase' are supported. If you'd like to entirely ignore cases for all String property references add 'AllIgnoreCase' or 'AllIgnoringCase' to the query method.
2011-08-25 12:53:08 +02:00
Oliver Gierke
651a1f2db2 DATACMNS-67 - QueryMethod considers methods retuning Iterable collection queries. 2011-08-25 07:56:21 +02:00
Oliver Gierke
f13c53866c Polished UserCredentials value object. 2011-08-25 07:52:18 +02:00
Oliver Gierke
154794f91b DATACMNS-65 - Using ReentrantReadWriteLock to prevent race conditions in PersistentEntity creation.
We have to lock PersistentEntity creation as instances could be prematurely handed out and iteration over the properties might interfere new properties being added to the Set iterated over.
2011-08-23 20:12:54 +02:00
Oliver Gierke
e91e729098 DATACMNS-64 - QueryMethod now rejects paging methods without a Pageable argument.
Refactored ClassUtils.assertReturnType(…) to positively discover subtypes of the given types as well. Renamed the method accordingly.
2011-08-21 16:45:25 +02:00
Oliver Gierke
e21dd1d828 DATACMNS-63 - Added fromReturnTypeOf(…) to ClassTypeInformation. 2011-08-21 16:30:20 +02:00
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
Phil Webb
2f5c4cd3d7 DATAJPA-88 - Minor improvements to documentation. 2011-08-16 17:48:32 +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
4f90182607 updated changelog for 1.1.0.RELEASE 2011-07-21 11:59:42 -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
4a61908561 Updated changelog for 1.1.0.RC1 release. 2011-07-19 17:37:43 +02: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
6ca606ab5c Polished reference documentation. 2011-07-18 21:05:20 +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
dacc26cf75 Updated .gitignore.
Now ignoring .settings folder, .project, .classpath and files ending on .orig (usually originating from resolved merge conflicts).
2011-07-15 10:08:38 +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
Oliver Gierke
c470ac0c6b Fixed duplicate section id. 2011-06-23 10:56:59 +02:00
Oliver Gierke
980cadfc0c Fixed reference documentation section ids. 2011-06-23 10:29:07 +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