Commit Graph

108 Commits

Author SHA1 Message Date
Oliver Gierke
3f22104c7c DATACMNS-30 - Made implementations of Page, Pageable and Sort serializable. 2011-04-20 17:18:57 +02:00
J. Brisbin
9ff83e6542 DATADOC-98 - Fixes for multi-dimensional arrays and lists 2011-04-19 12:49:43 -05:00
Jon Brisbin
caa72bdfd1 DATADOC-98 - Deal with multi-dimensional arrays as property types. 2011-04-18 12:18:16 -05:00
Jon Brisbin
cbf9b6801e DATADOC-98 - Deal with multi-dimensional arrays as property types. 2011-04-18 09:48:03 -05:00
Oliver Gierke
680a74c8e1 DATAJPA-45 - ClassUtils.getReturnedDomainClass works for parameterized component types of Collections and Page. 2011-04-08 22:05:25 +02:00
Thomas Risberg
a0813b4c85 changing to use source 1.5; removed some @Override on interface methods; cleaned up unused imports 2011-04-08 10:41:11 -04:00
Michael Hunger
0358cac9a5 merged changes in AbstractConstructorEntityInstantiator 2011-04-08 12:53:40 +02:00
David Montag
35537aba8a Made failure message customizable. 2011-04-07 13:08:54 -07:00
Michael Hunger
986566f64e Merge branch 'master' of github.com:SpringSource/spring-data-commons 2011-04-07 13:16:07 +02:00
J. Brisbin
71f08efa53 Merge branch 'master' of github.com:SpringSource/spring-data-commons 2011-04-05 14:56:50 -05:00
J. Brisbin
fec5bae808 Added MappingContextAware interface and BeanPostProcessor for same 2011-04-05 14:56:30 -05:00
Oliver Gierke
33013f8712 DATAJPA-44 - Domain class lookup in QueryMethod falls back to the repository domain class for methods not returning a domain class. 2011-04-05 10:57:23 +02:00
Oliver Gierke
895f0a4025 DATACMNS-24 - Separated RepositoryMetadata from RepositoryInformation.
Extracted basic information from RepositoryInformation into RepositoryMetadata to limit the amount of API being exposed to RepositoryFactorySupport implementations. getRepositoryBaseClass(…) can thus now take a RepositoryMetadata.
2011-04-05 08:04:10 +02:00
Thomas Risberg
1220ff98d0 removed slf4j dependency 2011-04-04 17:46:46 -04:00
Michael Hunger
2cbb372de5 added constructor bypassing instantiation 2011-04-01 19:46:07 +02:00
J. Brisbin
c6ad0f99fe Merge branch 'master' of github.com:SpringSource/spring-data-commons 2011-04-01 11:29:14 -05:00
J. Brisbin
3f746ebf4f Added array primitives to simple types 2011-04-01 11:28:54 -05:00
Oliver Gierke
4b51c5fd1f DATACMNS-23 - Made PageImpl safe to take an empty collection.
Added hasContent() method to Page interface.
2011-04-01 08:34:39 +02:00
Oliver Gierke
c4d81a28f1 DATACMNS-25 - Refactored RepositoryFactorySupport.getQueryLookupStrategy(…)
Method is not abstract anymore but rather returns null by default. Adapted QueryExecutionMethodInterceptor to handle the null case appropriately by simply skipping the query lookup. It also throws an exception if the repository has query methods defined nonetheless to prevent exceptions at runtime.
2011-03-31 21:46:33 +02:00
Oliver Gierke
9931e885c0 Expose type of a query parser Property. 2011-03-31 18:24:03 +02:00
Oliver Gierke
6bb0923c14 DATACMNS-26 - Persistent constructor now detects non-public constructor. 2011-03-29 19:19:23 +02:00
Oliver Gierke
c05bedce17 Fixed bug in Property. 2011-03-28 20:32:12 +02:00
Thomas Risberg
23ff75ee6e needed access to entity when use with partial JPA/cross-store persistence 2011-03-28 13:55:01 -04:00
Oliver Gierke
b39c2cacc9 Refactored Property to use TypeInformation infrastructure.
Fixed bug in discovering invalid property names of nested properties.
2011-03-28 09:25:40 +02:00
Oliver Gierke
6d404527ed Added isCollectionLike() and isMap() to TypeInformation interface.
isCollectionLike() allows identifying element containers like Arrays, Collections or everything else implementing Iterable.
2011-03-28 09:24:39 +02:00
Michael Hunger
b52de879de extracted StateBackedCreator interface 2011-03-25 11:22:20 +01:00
Michael Hunger
8fa7aabdc0 added caching to AbstractConstructorEntityInstantiator 2011-03-24 22:37:09 +01:00
Oliver Gierke
e39f3724e2 Use BeanUtils to instantiate objects to not enforce them to be public. 2011-03-24 15:47:17 +01:00
Thomas Risberg
71ea5ddaed pruned unused cross-store prototype classes; changed package names 2011-03-23 11:26:29 -04:00
Oliver Gierke
6672a206c7 DATAJPA-19 - Moved extension classes into Spring Data Commons Core. 2011-03-23 10:05:33 +01:00
Oliver Gierke
a2dc608ab4 Forgot to push deleting MappingConfigurationBuilder and BasicMappingConfigurationBuilder. 2011-03-23 09:45:08 +01:00
Oliver Gierke
ecdda346b1 Extended AbstractRepositoryConfigDefinitionParser.postProcessBeanDefinition(…) to take BeanDefinitionRegistry as well. 2011-03-23 09:10:52 +01:00
Oliver Gierke
b514e35105 Removed some compiler warnings and unnecessary imports. 2011-03-23 07:46:08 +01:00
Oliver Gierke
b7c81e3a4e Cleanup of meta-model API.
Moved MappingConfigurationBuilder functionality into BasicMappingContext. Got rid of obsolete methods in MappingContext, PersistentEntity and PersistentProperty to minimize the API exposed.
2011-03-23 07:31:26 +01:00
Oliver Gierke
06463a0b58 Tweaks to BasicMappingContext.
Re-added a initialEntitySet property to BasicMappingContext and let trigger adding those to the context in afterPropertiesSet(). Moved createPersistentEntity and createPersistentProperty methods from MappingConfigurationBuilder into BasicMappingContext (could probably be done for all of those methods still in MCB).

Opened up getPersistentEntites() in MappingContext interface to return Collection<? extends PersistentEntity> to allow easy overriding in subclasses with more specific types.
2011-03-22 21:17:27 +01:00
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
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
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