Commit Graph

243 Commits

Author SHA1 Message Date
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
Thomas Risberg
9302ec49e3 updated changelog 2011-06-21 16:16:12 -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
c9eeee545a DATACMNS-27 - Added plugin repository to allow build on Maven 3. 2011-06-10 14:53:05 -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
Thomas Risberg
e7e51333a0 updated changelog 2011-06-02 08:45:01 -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
Oliver Gierke
399bc5e6bf Made DefaultRepositoryInformation public. 2011-05-31 22:34:59 +01:00
Oliver Gierke
0ea1921a96 Updated reference documentation regarding repository declaration.
Polished Javadoc of Repository to mention possibility of selectively exposing CRUD methods.
2011-05-24 12:33:18 +02:00
Oliver Gierke
dab13128f4 Introduced BeanWrapper helper object to reduce static access through MappingBeanHelper.
Creating bean instances, getting and setting properties on a bean was done by using static methods on MappingBeanHelper so far. This required certain Spring components (ConversionService) being held statically as well. Beyond that various Spring components had set these static values which might cause strange behavior if multiple instances of these Spring components are created. Thus we now have a BeanWrapper that takes the formerly statically held instances and uses those for bean creation and property access.

Moved SpEL awareness of a mapping into SpELAwareParameterValueProvider to hide it behind an ParameterValueProvider instance.
2011-05-24 12:31:59 +02:00
Oliver Gierke
be5d43900c Moved QueryDslPredicateExecutor into Spring Data Commons. 2011-05-23 12:21:01 +02:00
Oliver Gierke
637daac97b DATACMNS-40 - Renamed @RepositoryProxy to @RepositoryDefinition. 2011-05-23 11:50:11 +02:00
Oliver Gierke
1583aea2b7 DATADOC-145 - Removed obsolete methods from MappingBeanHelper.
Fixed inverted isAssignableFrom(…) check as well.
2011-05-22 14:44:05 +02:00
Thomas Risberg
cbf8218cc0 added UserCredentials class to support DATADOC-142 2011-05-20 12:40:10 -04:00
Oliver Gierke
7a110d593e DATACMNS-38 - Prevent StackOverflow on self referencing objects.
Various improvements and additional test cases for the TypeInformation abstraction. Introduced ParameterizedTypeInformation in-between class to take the parent into account when calculating equals(…) and hashCode(). We're also shortcutting TypeInformation creation if the parent's underlying type equals the one we shall create a new TypeInformation for.

Slightly modified the parsing algorithm when adding PersistentEntity objects. We now eagerly add them to the cache to prevent endless recursive adding.
2011-05-17 20:15:52 +01:00
Oliver Gierke
66c77820c4 DATACMNS-37 - Added unit tests for annotation based repository usage. 2011-05-17 20:15:38 +01:00
Oliver Gierke
1761255c2d DATACMNS-37 - Enabled annotation based repository declaration model.
Introduced an @RepositoryProxy annotation that can be used as alternative to extending Repository. Added necessary RepositoryMetadata implementation to introspect the annotation rather than the generic types. Enabled bean definition parsers to pick up annotation based repositories as well.
2011-05-14 08:37:38 +02:00