Commit Graph

124 Commits

Author SHA1 Message Date
Jon Brisbin
f6818dd13f Fix for edge case where constructor parameter names aren't available causing the mapping framework to barf. 2011-03-22 14:08:48 -05:00
Oliver Gierke
33efa23492 DATACMNS-22 - Added Spring release repository as plugin repository.
Needed to lookup AWS build extension.
2011-03-20 19:24:08 +01:00
Jon Brisbin
c51d5b5441 Added TypeInformation to the MappingContextEvent 2011-03-18 09:36:51 -05:00
Burt Beckwith
cfcb4cecd0 removed @Override on interface methods that will cause problems in Java 5 2011-03-17 23:26:14 -04:00
Oliver Gierke
561cdbe4dc Cleanups in ClassTypeInformation as well as BasicMappingContext.
Removed obsolete constructor arguments in ClassTypeInformation. SKip static fields in BasicMappingContext.addPersistentEntity(…).
2011-03-17 22:56:06 +01:00
Oliver Gierke
f00bfb82bd Fix to correctly determine component type for non-generic arrays. 2011-03-17 10:06:18 +01:00
Oliver Gierke
688ae81b27 Fixed failing test. 2011-03-17 09:50:05 +01:00
Oliver Gierke
a93880a60e Added customSimpleTypes to BasicMappingContext.
The added custom simple types will be considered in the decision whether to recursively add PersistentEntities. This does not feel quite right for now as for a complete setup we now have to register converters in the MappingMongoConverter *and* add the custom type to the list here. Open for discussion.
2011-03-17 09:45:59 +01:00
Oliver Gierke
ab59c57577 Tweaked getComponentType() and added getMapValueType() to PersistentProperty.
Changed implementation of getComponentType() to use the TypeInformation instance backing the BasicPersistentProperty.
2011-03-17 09:44:35 +01:00
Oliver Gierke
a07a2cc760 Added isEntity() method to PersistentProperty. 2011-03-17 09:44:35 +01:00
Oliver Gierke
7a2f25190a Extended TypeInformation classes to support generic arrays as well.
Additionally added support for resolving component types (for collections and map keys) as well as map value types.
2011-03-17 09:44:35 +01:00
Oliver Gierke
8ab42a266c Some tweaks to handling collections and enums.
Fixed isAssignableFrom(…) usage in BasicPersistentProperty to correctly detect collections and maps. Let MappingBeanHelper treat enums as simple types as well.
2011-03-17 09:44:34 +01:00
Jon Brisbin
bc6e9d8f54 Added the ability to use the Spring 3.0 ApplicationEvent mechanism for event handling internally within the mapping framework. 2011-03-16 15:37:49 -05:00
Thomas Risberg
626d52e2c0 prepared for snapshot builds 2011-03-15 22:34:46 -04:00
Thomas Risberg
206e73d1ef preparing for M4 2011-03-15 22:28:27 -04:00
Thomas Risberg
8640511347 preparing for M4 2011-03-15 22:24:58 -04:00
Oliver Gierke
ad56cae06e Extended basic mapping framework to support working with generics.
Added TypeInformation interface and infrastructure to discover generic types given a basic type that binds generic types. Starting from that you can then traverse TypeInformations for fields by calling getProperty(…). A subsequent call to getType() will then return the resolved type.

Adapted the Basic mapping infrastructure to accomodate the TypeInformation interfaces where necessary. In most cases it was just about using TypeInformation instead of class as we have to keep track of the parent types that (in case of a generic field) determine the actual type of sub fields. BasicMappingContext is now using the TypeInformation instance created for PersistentEntity as key for the cache. This is necessary as generic types (e.g. Foo<T>) might be used inside different entities that type T to something different.

Created isMap() and isArray() on PersistentProperty to align to isCollection().
2011-03-15 17:28:30 +01:00
Jon Brisbin
69d007c2b8 Mostly fixing IDE warnings and complainings about type safety issues 2011-03-14 16:58:08 -05:00
Jon Brisbin
1f9af56158 More tweaks to complex/simple type detection, add makeAccessible() call to BasicMappingContext 2011-03-14 10:53:31 -05:00
Jon Brisbin
e287cd23d6 Tweaked the way complex/simple types are discovered. 2011-03-14 09:06:56 -05:00
Oliver Gierke
ecb12f70a2 Moved special id-property handling into PersistentProperty interface.
The PersistentProperty interface now has a isIdPropertyMethod(). Subclasses might alter it to support further id property detection mechanisms. Added missing import in BasicPersistentProperty.
2011-03-13 09:06:50 +01:00
Oliver Gierke
5a879ffd92 Use Spring's ReflectionUtils.doWithFields(…) to simplify code.
Spring already contains functionality to to something with all fields of
a class including all fields from superclasses. Refactored the field
collecting code to use this.
2011-03-13 09:06:26 +01:00
Oliver Gierke
dec48921ce Removed Mongo specific id field name handling from common BasicMappingConfigurationBuilder. 2011-03-13 09:06:25 +01:00
Oliver Gierke
f8efa1af5e Added generic parameter to declaration of BasicPersistentProperty. 2011-03-13 08:55:34 +01:00
J. Brisbin
ca4de87a8b Fixes for superclass bug 2011-03-12 20:06:47 -06:00
J. Brisbin
e254dedd96 Tweaks to BasicMappingContext to remove a circular reference 2011-03-11 16:06:09 -06:00
Jon Brisbin
158ee85d93 Added mapping support to commons core. Will be used by other spring-data projects for multi-store mapping. 2011-03-11 14:15:00 -06:00
Oliver Gierke
83f8306656 DATACMNS-19 - Refactored return type for Repository.findAll(…) and according methods to return Iterable instead of List. 2011-03-11 18:58:48 +01:00
Oliver Gierke
d60f53e8f3 Added another change to changelog. 2011-03-11 18:32:39 +01:00
Oliver Gierke
7aeb6c3f5c Added recent changes to the changelog. 2011-03-11 18:27:49 +01:00
Oliver Gierke
e00ca67a12 DATACMNS-20 - Renamed Repository.findById(…) to findOne(…).
Added some @SuppressWarnings where necessary.
2011-03-11 18:15:45 +01:00
Oliver Gierke
80359c4d07 DATAJPA-19 - Added Hades extensions module.
Added DomainClassPropertyEditor and DomainClassConverter to automatically bind domain classes to Spring MVC controller methods. Same applies to PageableArgumentResolver. Polished up some generics.

Introduced RepositoryFactoryInformation interface being implemented by RepositoryFactorySupport that allows the extension components to get access to the raw factories, access EntityInformation of it and then find out about the repository interface to lookup the actual repository instance.
2011-03-11 16:11:39 +01:00
Oliver Gierke
dd6e56d013 DATACMNS-14 - Fixed various issues in the poms.
Added Milestone repository to aspects module to find AspectJ 1.6.11.M2. Reduced logging dependencies to test scope, altered two classes to use SLF4J instead of Commons logging. Use Log4J 1.2.16 as this does not require explicit excludes for mail, JMS and JMX anymore.
2011-03-10 18:22:43 +01:00
Michael Hunger
ff2f593dd6 moved indexed 2011-03-09 23:01:07 +00:00
Michael Hunger
c5bd1a98f7 Merge branch 'master' of github.com:SpringSource/spring-data-commons 2011-03-09 23:00:19 +00:00
Michael Hunger
e10969963a fixed pom AJ dependency 2011-03-09 23:00:14 +00:00
Thomas Risberg
c8465d8d03 DATADOC-48 adding cross-store code to support Mongo->JPA relationships 2011-03-08 23:33:14 -05:00
Oliver Gierke
e157f380bb DATADOC-34 - Infrastructure for callbacks on RepositoryQuery creation.
Introduced QueryCreationListener that allows plugging in functionality after a query was created.

Heavily refactored QueryMethod and RepositoryQuery subsystem. Splitted up simple EntityMetadata (domain class and potentially other stuff) from the more advanced methods like getId(Object) and isNew(…). QueryMethod now carries a type enum that allows switching over it to determine the execution. Beyond that QueryMethod now returns a EntityMetadata rather than a plain class. 

RepositoryQuery in turn exposes the query method. PartTree allows iterating over all contained Parts as well now. Introduced AbstractEntityInformation that regards an entity as new if its id is null. Simplified handling of RepositoryProxyPostProcessors and aligned them to QueryCreationListener handling.
2011-03-04 10:07:49 +01:00
Michael Hunger
fab26f538f Merge branch 'master' of github.com:SpringSource/spring-data-commons 2011-03-04 02:14:37 +01:00
Michael Hunger
67c2c58b42 set both target and source to 1.6 in the pom 2011-03-04 02:14:19 +01:00
Thomas Risberg
af99e4e825 moved DocBook to pre-site 2011-03-02 10:07:58 -05:00
Thomas Risberg
841c78acb6 DATADOC-48 moving over cross-store code from previous prototype 2011-03-02 09:55:54 -05:00
Oliver Gierke
3a6113c5e8 Added toString methods to make debugging easier. 2011-03-02 11:14:50 +01:00
Oliver Gierke
cae2961275 DATACMNS-19 - Fixed PersistableEntityMetadata.
Added generics to PersistableEntityMetadata and let it being handed the actual domain class to return.
2011-03-02 09:03:25 +01:00
Oliver Gierke
695f4ca9c0 Fixed sorting not being applied if provided via method parameter.
AbstractQueryCreator now uses the Sort object from the parameters if the PartTree not already contains a Sort object (which got there due to a OrderBy directive in the method name).
2011-03-01 20:44:28 +01:00
Oliver Gierke
ff844d7cbc Changed getReturnedDomainClass to only resolve generic type for Collections and Pages. 2011-03-01 20:44:28 +01:00
Oliver Gierke
1b98d32a4f Extended resolveQuery of QueryLookupStrategy to take domain class as well. 2011-03-01 20:44:28 +01:00
Oliver Gierke
b0a04b16c6 Added getBindableValue(int index) to ParameterAccessor.
Adapted ParametersParameterAccessor accordingly.
2011-03-01 20:44:28 +01:00
Michael Hunger
c738effd39 fixed bug with stateholder holding onto the temporary state for too long 2011-03-01 13:43:32 +01:00
Michael Hunger
9ffefbcd50 updated aspectj to 1.6.11.M2 2011-03-01 13:40:42 +01:00