Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: stephansun/spring-data-commons
base: master
...
head fork: spring-projects/spring-data-commons
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Jun 21, 2012
@olivergierke olivergierke DATACMNS-58 - Added support for repository populators.
Added RepositoryPopulator abstraction and implementations based on Spring OXM Unmarshallers as well as Jackson. This allows arbitrary repositories being populated with data pulled from XML / JSON, no matter what store they are actually backed. The populator will eventually populate the repositories held in a Repositories instance. It can be used like this:

Repositories repositories = new Repositories(applicationContext);
ResourceReader reader = new JacksonResourceReader();

ResourceReaderRepositoryPopulator populator = new ResourceReaderRepositoryPopulator(reader);
populator.setResourceLocation("classpath*:data.json");
populator.populate(repositories);

The ResourceReader defines what technology shall be used to read the data from the file into objects. The ResourceReaderRepositoryPopulator uses the reader and can either get a set of Resource instances configured or is able to lookup resources using a location string. The actual Repositories instance captures all CrudRepository instances contained inside an ApplicationContext.

The populators can also be used from within XML configuration though the repository namespace elements shown below:

<repository:jackson-populator location="classpath:org/springframework/data/repository/init/data.json" />
		
<repository:unmarshaller-populator location="classpath:org/springframework/data/repository/init/data.xml" unmarshaller-ref="unmarshaller" />

Updated reference documentation accordingly.
d441d95
Commits on Jun 22, 2012
@olivergierke olivergierke DATACMNS-185 - Expose AbstractMappingContext initialization.
Added initialize() method to AbstractMpapingContext to ease manual initialization.
f540306
@olivergierke olivergierke DATACMNS-186 - Improved the way id properties are detected.
The id properties are now discovered by the BasicPersistentEntity during the call to addPersistentProperty(…). Beyond that the method rejects the id property if one was already set.
ebf8fdc
Commits on Jul 09, 2012
@olivergierke olivergierke DATACMNS-188 - Removed obsolete method from AbstractMappingContext. d9f293b
Commits on Jul 11, 2012
@olivergierke olivergierke DATACMNS-189 - Fixed typo in reference documentation. 4a51ce2
Commits on Jul 16, 2012
@olivergierke olivergierke DATACMNS-193 - Introduced isQueryMethod(…) on RepositoryInformation. 4d326fa
@olivergierke olivergierke DATACMNS-187 - Added getRevisionDate() to Revision.
Revision now exposes the revision date of the underlying metadata.
464c3f0
@olivergierke olivergierke DATACMNS-47 - Add support for JavaConfig based repository configuration.
Completely rewrote namespace bean definition parsing to be extendable more easily. Separated XML concerns from annotation based configuration. The central point to extend the namespace parsing for a certain module is now hidden behind the RepositoryConfigurationExtension interface (have a look at the RepositoryConfigurationExtensionSupport base class as well).
96795f2
Commits on Jul 18, 2012
@olivergierke olivergierke DATACMNS-201 - Fixed critical FindBugs warnings. d7df08f
@olivergierke olivergierke DATACMNS-202 - Move helper classes for BeanDefinitionParses into Comm…
…ons.
cf71070
Commits on Jul 23, 2012
@olivergierke olivergierke DATACMNS-164 - Added support for XML/JSON marshaling of Page, Pageabl…
…e and Sort.

Added XmlTypeAdapter implementations that convert the PageImpl, PageRequest and Sort value objects into a JAXB marshalable object.
c64f014
@olivergierke olivergierke DATACMNS-203 - Re-enabled accidentally disabled unit tests. f476100
@olivergierke olivergierke DATACMNS-204 - Prepare changelog for 1.3.2. 5b1fe22
@olivergierke olivergierke DATACMNS-191 - Prepare changelog for 1.4.0.M1. dc18fe2
@spring-buildmaster spring-buildmaster DATACMNS-191 - Release version 1.4.0.M1. 94d042a
@spring-buildmaster spring-buildmaster DATACMNS-191 - Prepare next development iteration. d66d166
Commits on Jul 24, 2012
@olivergierke olivergierke DATACMNS-205 - Fix broken reference documentation.
The section on the repository exporters contained a code sample using language="javascript". As the highlighting in the docbkx plugin doesn't support javascript as language it will break the build of other reference documents including this one. Removed the language attribute for this sample entirely.
628ddc6
@olivergierke olivergierke DATACMNS-206 - Improved working with getters and setters for Persiste…
…ntProperty.

PersistentProperty now exposes getGetter() and getSetter() methods which restrict the methods being returned to return or accept type compatible values to the actual properties type. Thus when you implement a custom getter or setter which - by the definition of the JavaBean spec - would qualify as read or write method for a particular property, we now ensure that they are only considered if they match the type of the field exposed.
583a60b
Commits on Jul 31, 2012
@olivergierke olivergierke DATACMNS-209 - MappingContextEvent now carries its emitting MappingCo…
…ntext.

MappingContextEvent now has an wasEmittedBy(MappingContext<?, ?> context) method to allow identifying whether the event was emitted by the given MappingContext. Useful if multiple MappingContexts are in place and one wants to react on the events emitted by a particular one only.
fc57f60
@olivergierke olivergierke DATACMNS-206 - Guard against PropertyDescriptor being null.
Added guards to PropertyDescriptor access to prevent NullPointerExceptions in cases it is not given in the first place. Polished JavaDoc for test case.
f532404
Commits on Aug 07, 2012
@olivergierke olivergierke DATACMNS-211 - Improved TypeInformation abstraction. f1aff4e
Commits on Aug 10, 2012
@olivergierke olivergierke DATACMNS-210 - Removed references to removed single <repository /> de…
…clarations from reference documentation.
8d156fb
Commits on Aug 13, 2012
@olivergierke olivergierke DATACMNS-47 - Guard against @EnableRepositories annotations not carry…
…ing @Inherited.

If an @EnableRepository annotation does not carry an @Inherited annotation and the annotation is used in a JavaConfig inheritance scenario the ImportBeanDefinitionRegistrar gets invoked without the annotation metadata available. The RepositoryBeanDefinitionRegistrarSupport now guards against that case and will not invoke registration of repository bean definitions. It's strongly recommended to equip @EnableRepository annotations with @Inherited to accommodate this scenario.
27a8a8d
@olivergierke olivergierke DATACMNS-212 - Sonargraph checks and improvements.
Merged mapping.context and mapping.event packages. Moved MappingContext event into context package. Updated Sonargraph architecture description and completed package and dependency mapping.
35d96af
@olivergierke olivergierke DATACMNS-213 - Declaring all compile time dependencies locally.
There have been a few dependencies which we depended on on compile time but which were pulled into the classpath transitively. Declaring these dependencies now explicitly. Keeping them optional to allow minimal footprint.
f4a5edc
Commits on Aug 16, 2012
@olivergierke olivergierke DATACMNS-215 - Removed validators from MappingContext API. beea916
@olivergierke olivergierke DATACMNS-207 - Removed getPropertyDescriptor() from PersistentProperty. d9e5d92
@olivergierke olivergierke DATACMNS-216 - Removed deprecations from AbstractMappingContext.
Removed the deprecation as it might still be necessary to set the ApplicationEventPublisher to emit MappingContextEvents.
c6b0461
@olivergierke olivergierke DATACMNS-211 - Fixed component type resolving for arrays.
ClassTypeInformation does not resolve nested array types anymore as a multidimensional array in fact has a component type of an array of one dimension less, e.g. String[][].getComponentType() -> String[].
0fc753f
@olivergierke olivergierke DATACMNS-214 - Simple types are not considered PersistentEntities any…
…more.

Before actually adding a type as PersistentEntity, AbstractMappingContext will call shouldCreatePersistentEntityFor(TypeInformation<?> type) now. The default implementation will just consider the SimpleTypeHolder for that decision. However as adding a Converter to the context will render the converted object to be treated as simple, one might want to override this method to be more precise and only rule out store-specific simple types at this stage.
307e003
Commits on Aug 20, 2012
@olivergierke olivergierke DATACMNS-219 - Make Spring 3.1.2.RELEASE default Spring dependency ve…
…rsion.

We move away from Maven version ranges as they complicate the build and dependency resolution process. They make the build in-reproducible. Users stuck with a 3.0.x version of Spring will now have to manually declare Spring dependencies in their needed 3.0.x version. Not that at least Spring 3.0.7 is required currently.
b570c57
Commits on Aug 23, 2012
@olivergierke olivergierke DATACMNS-218 - Expose RevisionMetadata from Revision. 6d2d229
@olivergierke olivergierke DATACMNS-217 - Update Spring Hateoas dependency to 0.2.0.RELEASE. 566a9cd
@olivergierke olivergierke DATACMNS-217 - Updated changelog for 1.4.0.RC1. 7cb77eb
@spring-buildmaster spring-buildmaster DATACMNS-217 - Release version 1.4.0.RC1. 11da3c3
@spring-buildmaster spring-buildmaster DATACMNS-217 - Prepare next development iteration. ed7beff
Commits on Sep 03, 2012
@olivergierke olivergierke DATACMNS-225 - Updated Querydsl Maven plugin to 1.0.4. d0e0c8c
@olivergierke olivergierke DATACMNS-226 - Fixed bug in ConfigurableTypeInformationMapper caching.
Separated ConfigurableTypeInformationMapper from MappingContextTypeInformationMapper. The latter now lazily picks up the alias information if the cached values do not contain aliases.

Polished JavaDocs and clarified meaning of null values.
4939fbf
Commits on Sep 04, 2012
Aleksander Blomskøld DATACMNS-221 - Added support for Unicode characters in PartTree.
Altered parsing regular expressions to support unicode characters.
f0ffd03
@olivergierke olivergierke DATACMNS-222 - Fixed JavaDoc of AbstractRepositoryPopulator. 5c54e7f
@olivergierke olivergierke DATACMNS-223 - Added logging to ResourceReaderRepositoryPopulator.
Logging the read resources in INFO level, the individual elements persisted in DEBUG. Polished JavaDoc.
8604de5
@olivergierke olivergierke DATACMNS-224 - RepositoryPopulator now throws event after population.
The ResourceReaderRepositoryPopulator now throws an RepositoriesPopulatedEvent after the population was finished. This indicates the data provided through the resources having been inserted into the database and the repository setup (including population) being completed.
bd6c0bf
@olivergierke olivergierke DATACMNS-220, DATAJPA-174 - Updated reference docs on query parsing.
Updated the repositories reference documentation section on query parsing to reflect the correct usage of method prefixes, how to use the Distinct, IgnoreCase and OrderBy clauses.
e922845
Commits on Sep 10, 2012
@olivergierke olivergierke DATACMNS-228 - AbstractMappingContext disregards Groovy meta fields.
Refactored persistent field discovery by extracting the FieldFilter implementation and improving the way excluded fields are detected. We now exclude all fields named "this$*" as well as a metaClass field of type groovy.lang.MetaClass explicitly.
a01de83
Commits on Sep 13, 2012
@olivergierke olivergierke DATACMNS-176 - ClassTypeInformation now always inspects user class.
Unwrap potentially wrapped CBGlib classes handed to ClassTypeInformation for inspection.
96bc596
@olivergierke olivergierke DATACMNS-231 - Polished Sort domain class.
Improved/fixed JavaDoc. Made orders property final. Fixed formatting here and there. Deprecated Order.create(…) factory method as new Sort(…) can be used instead.
346de53
@olivergierke olivergierke DATACMNS-229 - RepositoryInterfaceAwareBeanPostProcessor now uses bea…
…n class loader.
51d45f3
Commits on Sep 17, 2012
@olivergierke olivergierke DATACMNS-233 - DomainClassConverter is now safe against null and empt…
…y Strings.

Added explicit check for null or empty String source before attempting conversion. Returning null for both cases.
9b4cbb4
@olivergierke olivergierke DATACMNS-146 - PageableDefaults now takes sorting info as well.
PageableDefaults now has a sort and sortDir attribute to allow defining the default sorting options applied to the pageable.
936faca
@olivergierke olivergierke DATACMNS-230 - Clarify packages of Page and Sort in reference docs.
Fully qualified first mentions of Pageable and Sort to avoid ambiguities with types of potentially available types of the same name in a store specific implementation.
c8c26ba
@olivergierke olivergierke DATAJPA-251 - Updated reference documentation.
Improved code samples for PageableArgumentResolver. Corrected registration info for DomainClassConverter and added JavaConfig example. Replace all obsolete readAll(…) method samples with findAll(…). Added hint to @PageableDefaults now being aware of sort properties and direction.
8344387
Commits on Sep 18, 2012
@olivergierke olivergierke DATACMNS-235 - Enforce dependency ordering for custom repository impl…
…ementations.
5ed34bc
Commits on Oct 08, 2012
@olivergierke olivergierke DATACMNS-240 - Upgraded to Querydsl 2.8.0. 861cf40
Commits on Oct 09, 2012
@olivergierke olivergierke DATACMNS-239 - Fixed event handling in AbstractResourcePopulatorFacto…
…ryBean.

Switched from implementing ApplicationEventPublisherAware to ApplicationContextAware to get a reference to an ApplicationContext to fix comparison of the event source.
75026cd
@olivergierke olivergierke DATACMNS-241 - Upgraded to Spring HATEOAS 0.3.0.RELEASE. e675e14
@olivergierke olivergierke DATACMNS-242 - Improved exception messages in QueryMethod. 3498af5
@olivergierke olivergierke DATACMNS-192 - Updated changelog for 1.4.0.RELEASE. 14815dc
@spring-buildmaster spring-buildmaster DATACMNS-192 - Release version 1.4.0.RELEASE. 18c1392
Commits on Nov 12, 2012
@spring-buildmaster spring-buildmaster DATACMNS-192 - Prepare next development iteration. 8007e25
@olivergierke olivergierke DATACMNS-168 - Allow customizing repository bean names.
The bean name is now resolved through inspecting Spring stereotype annotations and @Named on the repository interface. If none found we're still using the uncapitalized simple interface name as we did until now.
b4a553e
Commits on Nov 13, 2012
@olivergierke olivergierke DATACMNS-247 - Improved implementation of RepositoryBeanDefinitionReg…
…istrarSupport.

RepositoryBeanDefinitionRegistrarSupport not implements BeanClassLoaderAware and ResourceLoaderAware as Spring 3.2 will regard these callback interfaces and inject the resources. We still default these injected resources upon invocation to be able to run on Spring 3.1 as well.
c523abe
Commits on Nov 27, 2012
@olivergierke olivergierke DATACMNS-253 - Improved exception message in ParameterOutOfBoundsExce…
…ption.
fe8e484
@olivergierke olivergierke DATACMNS-254 - Polished JavaDoc of Auditable. 5664554
Commits on Nov 29, 2012
@olivergierke olivergierke DATACMNS-257 - PropertyPath can now handle all-uppercase fields.
So far, PropertyPath inevitably uncapitalized the property names it was created for. We now check, whether the source name is all uppercase and prevent uncapitalization in this case.
3fd47ee
Commits on Jan 05, 2013
@olivergierke olivergierke DATACMNS-263 - Fixed incompatibility with OpenWebbeans < 1.1.8.
Prefer using non-anonymous inner classes to represent @Default and @Any qualifiers. Upgraded to OpenWebbeans 1.1.7 along the way.
5266a9a
Commits on Jan 29, 2013
@olivergierke olivergierke DATACMNS-276 - Added hashCode() to ParameterizedTypeInformation.
Implemented hashCode() to be as close as possible to the equals(…) implementation.
3e2ae83
Commits on Feb 07, 2013
@olivergierke olivergierke DATACMNS-280 - Prepare release of version 1.4.1. 8289e17
@spring-buildmaster spring-buildmaster DATACMNS-280 - Release version 1.4.1.RELEASE. 2622232
@spring-buildmaster spring-buildmaster DATACMNS-280 - Prepare next development iteration. 4f67c4b