Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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: ractive/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 Oct 24, 2011
@ractive DATACMNS-93 - Add dynamic package import directive.
Added "DynamicImport-Package: *" to template.mf so that repository interfaces from other bundles can be read.
0762a34
@olivergierke olivergierke DATACMNS-91 - Clarify JavaDoc of CrudRepository.
Explicitly define the expected behavior for null parameters in CRUD methods to throw an IllegalArgumentException.
3a38161
Commits on Nov 21, 2011
@olivergierke olivergierke DATACMNS-98 - Fixed potential ClassCastException for domain type look…
…up for query methods.

Refactored the definition of what domain class is returned from a query method into a common AbstractRepositoryMetadata and moved ClassUtils.getReturnedDomainClass into RepositoryMetadata. Moved test cases accordingly. Added getReturnType(Method method) to TypeInformation.
9b3d2d0
@olivergierke olivergierke DATACMNS-97 - Added PartTree.getParts(Type type).
Added method to allow iterating over Parts of a given type.
904578d
Commits on Nov 23, 2011
@olivergierke olivergierke DATACMNS-99 - SimpleTypeHolder considers complex Enums as simple now.
Fixed SimpleTypeHolder.isSimpleType(Class<?> type) for calls where the Class object handed in is derived from an Enum that implements an abstract method. These Class objects return false for a call to isEnum(). So an ….isAssignableFrom(…) check is safer.
1468ba5
@olivergierke olivergierke Removed unused import. 966b9e1
Commits on Nov 24, 2011
@olivergierke olivergierke DATACMNS-100 - Removed Number from the Set of simple types.
Removing Number from SimpleTypeHolder's default Set of types results in
Number sub-types not explicitly listed not being considered as simple
by default.
1fb6e70
Commits on Nov 28, 2011
@olivergierke olivergierke DATACMNS-103 - Create hybrid Spring 3.0.6 / 3.1 build.
Introduced version range for Spring dependency of [3.0.6.RELEASE, 3.1.0.RC1]. This causes Maven to scan the metadata in the configured repositories to find the latest version up to Spring 3.1.0.RC1. For users having the Spring Milestone repo configured this will resolve against 3.1.0.RC1 then. All others will get the latest one from Maven Central which is 3.0.6. To let Bundlor still use 3.0.6 I've created a org.springframework.version.30 property and let template.mf use that.
f073539
@olivergierke olivergierke DATACMNS-101 - Made AbstractMappingContext more flexible for extension.
The former getNestedTypeToAdd(…) method in AbstractMappingContext is now located in PersistentProperty to allow easier customization of the implementation. We also not only support returning one type from it but rather an Iterable of them to prepare handling of custom types implementing Collection interfaces.
8286bff
Commits on Nov 30, 2011
@olivergierke olivergierke DATACMNS-103 - Upgraded to Spring 3.1.0.RC2. 7d2314a
Commits on Dec 01, 2011
@olivergierke olivergierke DATACMNS-103 - Improved 3.1 build.
We now use an exclusive upper bound of 4.0.0.RELEASE for Spring dependencies. With the snapshot repository removed we now get the latest release milestone to build on. Changed repository links to use http://repo.springframework.org to route dependencies through our Artifactory instance. Fixed some plugin dependency versions along the way.
5eaa87c
Commits on Dec 02, 2011
@olivergierke olivergierke DATACMNS-108 - BeanWrapper now handles exceptions.
Removed explicit declaration of throwing IllegalAccessException and InvocationTargetException.
a4ac30d
@olivergierke olivergierke DATACMNS-77 - Introduced caching inside ClassTypeInformation.
ClassTypeInformation now holds a cache for Class<?> to TypeInformation<?> mappings. It also exposes constants for Object, Collection, Set, List and Map TypeInformations.
a5a925e
@olivergierke olivergierke DATACMNS-103 - Fixed repository urls. 89fb4a1
@olivergierke olivergierke DATACMNS-92 - PersistentEntities are not held in cache if verify() fa…
…ils.

Documented verify() to throw a MappingException in case verification fails. Let this exception flying cause the PersistentEntity already added to the cache be removed from it in turn.

Fixed execution of integration tests and tests in classes starting with Abstract* along the way. Upgraded to Mockito 1.8.5.
0b04251
@olivergierke olivergierke DATACMNS-91 - Clarify contract for CrudRepository.
Added JavaDoc to document expected exceptions for null parameters.
f8b37b8
@olivergierke olivergierke DATACMNS-71 - Fixed cross reference in namespace documentation. 0fc2985
@olivergierke olivergierke DATACMNS-71 - Fixed missing closing quote in reference documentation. 4b01b13
@olivergierke olivergierke DATACMNS-71 - Formatting of repositories reference doc source. fcde926
@olivergierke olivergierke DATACMNS-95 - Added reference documentation for DomainClassConverter,…
… -PropertyEditor as well as PageableArgumentResolver.

Fixed missing closing quote as well.
6546d81
@olivergierke olivergierke DATACMNS-39 - TypeDiscoverer handles WildcardTypes now.
We now resolve the first bound from wildcard types now.
e195abc
@olivergierke olivergierke DATACMNS-39 - Formatting. 4a8d7a6
@olivergierke olivergierke DATACMNS-106 - Introduced QueryMethod.getReturnedObjectType(). e6431fc
Commits on Dec 05, 2011
@olivergierke olivergierke DATACMNS-94 - Added Regex and Exists keywords for query parser. f7b796d
@olivergierke olivergierke DATACMNS-107 - Added support for True and False as query method keywo…
…rds.
498f40b
@olivergierke olivergierke DATACMNS-88 - Map value types are now resolve correctly for generic t…
…ypes extending Map.

Extracted base ParentTypeAwareTypeInformation class as base class for TypeInformations that need to consider the parent's type variable map.
b3c8cb5
@olivergierke olivergierke DATACMNS-108 - Fixed ClassCastException in RepositoryFactorySupport. ca4d2f5
Commits on Dec 06, 2011
@olivergierke olivergierke DATACMNS-107 - Allow IsTrue/IsFalse as keywords for True/False. 188e396
Mark Pollack update changelog ab4c6aa
Mark Pollack prepare for Spring Data Commons 1.2.0.RC1 a151860
Mark Pollack prepare for Spring Data Commons 1.2.0.BUILD-SNAPSHOT a0c9167
Commits on Dec 16, 2011
@olivergierke olivergierke DATACMNS-113 - Introduced annotations to resolve custom conversion di…
…sambiguities.

Introduced @ReadingConverter and @WritingConverter to allow to resolve disambiguates that might arise when implementing custom Converters.

Suppose we implemented a Converter<String, Class> and the store is able to handle both String and Class as native types. In this case there's no way to determine whether the converter shall actually be used to convert String properties into Class instances when writing or to create Class instances from Strings when reading. Thus the @ReadingConverter comes in handy in this case to tell the infrastructure to consider the converter for reading only.
0334a2d
Commits on Dec 19, 2011
@DirkMahler DirkMahler DATACMNS-110 - Added support for CDI integration for repositories.
Added custom CDI extension to use repositories in a CDI environment. Base class picks up all Spring Data repository interfaces and allows working with qualifiers to bind beans to be created to qualifiers.
eebc822
@olivergierke olivergierke DATACMNS-112, DATACMNS-109 - Upgraded to Querydsl 2.3.0. 89410ef
Commits on Dec 20, 2011
@olivergierke olivergierke DATACMNS-114 - Improved detection of custom implementations for repos…
…itories.

Fixed edge case scenario where the lookup for repository implementation classes picked up multiple classes if they ended with the same suffix (e.g. FooRepoImpl, AnotherFooRepoImpl). We're now expecting the classname to be an exact match but still allow nested packages. Changed the parser to reject multiple found implementation classes strictly now to at least avoid undiscoverable errors in case an ambiguity is popping up.
48d4c05
Commits on Dec 22, 2011
@olivergierke olivergierke DATACMNS-104 - Upgraded to Spring 3.0.7.
Removed GenericTypeResolver copy as all necessary local changes have been released with Spring 3.0.7.
0053e33
@olivergierke olivergierke DATACMNS-118 - Preparations for 1.2.0 release.
Updated changelog and version. Removed milestone repository and use Artifactory repository now.
5213eac
@olivergierke olivergierke DATACMNS-118 - Prepare 1.3.0 development branch. 8c360af
Commits on Jan 11, 2012
@olivergierke olivergierke DATACMNS-119 - Order now implements Serializable. 59d8852
Commits on Jan 24, 2012
@olivergierke olivergierke DATACMNS-122 - Introduced further abstractions to improve entity inst…
…antiation.

PersistentEntity now has a isConstructorArgument(…) allowing to find out whether a PersistentProperty is referred to from a constructor argument. The PreferredConstructor abstraction now keeps track of the PersistentEntity it is built for and thus allows finding out whether a constructor Parameter maps a PersistentProperty.

Removed bean creation responsibility from BeanWrapper and introduced EntityInstantiator abstraction to allow the entity instantiation mechanism be short circuited via custom implementations. The reflection based implementation from BeanWrapper is now residing in ReflectionEntityInstantiator.
35697d6
@olivergierke olivergierke DATACMNS-123 - Deprecated types of persistence package. c683d28
@olivergierke olivergierke DATACMNS-125 - QueryExecutorMethodInterceptor now correctly rejects r…
…epository interfaces with query methods if no QueryLookupStrategy defined.
ef65df2
Commits on Jan 31, 2012
@olivergierke olivergierke Consolidated repository usage to repo.springsource.org/libs-snapshots. 3e5e2bf
@olivergierke olivergierke Polished namespace schema. e150264
Commits on Feb 02, 2012
@olivergierke olivergierke DATACMNS-127 - Added DelegatingEntityInformation. 15c3b74
@olivergierke olivergierke DATACMNS-128 - Introduced ParameterAccessor.hasBindableNullValue(). b1f2eac
@olivergierke olivergierke DATACMNS-129 - Introduced CrudRepository.findAll(Iterable<ID> ids). 0189813
Commits on Feb 03, 2012
@olivergierke olivergierke DATACMNS-131 - Polished pom.xml. 4fcb4a7
@olivergierke olivergierke DATACMNS-131 - Formatting. bfd306d
@olivergierke olivergierke DATACMNS-131 - Prepare 1.3.0 M1 release.
Updated change log.
9c112fa
Commits on Feb 06, 2012
@olivergierke olivergierke DATACMNS-131 - Prepare 1.3.0 M1 release.
Consolidate repositories being used. Removed invalid XML element.
4f94f8c
Commits on Feb 07, 2012
@spring-buildmaster spring-buildmaster Release version 1.3.0.RELEASE. 257d8af
@spring-buildmaster spring-buildmaster Next development version. 3903fa7
Commits on Feb 28, 2012
@olivergierke olivergierke DATACMNS-133 - Improved DomainClassConverter implementation.
DomainClassConverter now registers itself with the ConversionService handed into it. Added integration tests for lookup of RepositoryFactoryInformation.
9005e19
@olivergierke olivergierke Fixed URL for plugin repository. 10da4b3
Commits on Mar 09, 2012
@olivergierke olivergierke DATACMNS-134 - Changed instantation infrastructure to be able to inst…
…antiate member types.

In case a member class is not static the compiler will either create a constructor with a parameter of the enclosing type or alter the existing ones to add a first parameter of that type. Thus when instantiating the class we need to detect that case and hand in the parent object as parameter value.

Updated PreferredConstructor and Parameter abstractions to allow detecting this case as well as the ParameterValueProvider abstraction to capture the parent object.
c2fd1e2
Commits on Mar 20, 2012
@olivergierke olivergierke DATACMNS-133 - Fixed bean lookup in DomainClassConverter.
Previously DomainClassConverter looked up the RepositoryInformation instances from the entire BeanFactory hierarchy but only looked the actual repository up from the current BeanFactory and not the entire hierarchy. Fixed and added test case.
2f39b74
@olivergierke olivergierke DATACMNS-135 - Added basic infrastructure to support historiography o…
…f data.

Added interfaces for common abstractions needed to implement historiography. A Revision is an entity associated with some RevisionMetadata. That in turn consists of a revision number and date at least and is backed by a implementation specific delegate. The Revisions wrapper class allows accessing the latest revision from a list of Revision instances no matter what order they are in. A RevisionRepository allows access the revision an entity was changed in the last time, access all Revisions of an entity as well as paged access to it.
f8d5e31
@olivergierke olivergierke DATACMNS-136 - Made some Spring dependencies optional in template.mf.
We have declared some Spring dependencies optional in the pom.xml file. I've changed the template.mf to declare the package dependencies of these artifacts as optional as well.
9e44d58
Commits on Mar 21, 2012
@olivergierke olivergierke DATACMNS-135 - Added accessor for the underlying content to Revisions. 8e52d75
@olivergierke olivergierke DATACMNS-111 - Added query parser keywords StartingWith, EndingWith a…
…nd Containing.
b4d2100
Commits on Apr 02, 2012
@olivergierke olivergierke DATACMNS-142 - Polished API of UserCredentials.
Added constant to represent no credentials. Removed empty constructor. Added methods to ask whether username or password is configured.
cb375b2
Commits on Apr 03, 2012
@olivergierke olivergierke DATACMNS-120 - Added equals(…) and hashCode() methods to Parameter. 5c24898
Commits on Apr 04, 2012
@olivergierke olivergierke DATACMNS-124 - Added missing package-info.java files.
Polished JavaDocs. Polished MappingContextEvent and added deprecations to it to be cleaned up for 1.3.GA.
b811fa3
Commits on Apr 09, 2012
@olivergierke olivergierke DATACMNS-141 - Added Before and After as query parser keywords.
The query parser now supports After, IsAfter, Before and IsBefore as keywords. Added the Is* prefix to suitable keywords as well and refactored unit tests quite a bit to ease adding new keyword tests.
a2e5cc4
@olivergierke olivergierke DATACMNS-144 - Polished reference docs on repositories.
Made clear that the usages of the JPA namespace are a convenience artifact to keep the sample code copyable as much as possible but need to be tweaked in case one uses repositories with a different store. Added language attributes to code snippets where missing.
08b2666
Commits on Apr 10, 2012
@olivergierke olivergierke DATACMNS-145 - Added Docbook file to list all supported keywords. 171de78
Commits on Apr 11, 2012
@olivergierke olivergierke DATACMNS-124 - Removed accidentally committed code. 75c67f0
@olivergierke olivergierke DATACMNS-132 - Guard against untyped Maps and Collections in Abstract…
…PersistentProperty.isEntity().

Just mentioned method threw a NullPointerException when the property was backed by an untyped Map or Collection as TypeInformation.getActualType() returns null in this case. Changed that to correctly return false.
109e7f9
@olivergierke olivergierke DATACMNS-139 - Fixed potential StackOverflowException in PropertyPath.
When trying to access an inexistent property starting with an underscore (e.g. _id) PropertyPath.create(…) ran into a StackOverflowException. Changed the traversing regular expression to expect at least one capital letter for further traversals.
f3d037b
@olivergierke olivergierke DATACMNS-121 - Implement equals(…) and hashCode() of AbstractPersiste…
…ntProperty.

Implemented equals(…) and hashCode() methods based on the field backing the property.
aa12db2
Commits on Apr 13, 2012
@olivergierke olivergierke DATACMNS-150 - Fixed potential ClassCastException in DomainClassConve…
…rter and -PropertyEditorRegistrar.

Introduced Repositories value object to easily access repository instances and EntityInformation objects registered in an ApplicationContext.
c158442
@olivergierke olivergierke DATACMNS-151 - Improve CrudRepository method signature generics.
Method signatures of save(…) methods in CrudRepository now return the concrete type passed in. This way subtypes can be persisted without casting the result back.

class Contact { … }
class Person extends Contact { … }

interface ContactRepository extends CrudRepository<Contact, Long> { … }

Before:

Person person = new Person();
person = (Person) repo.save(person);
         ^^^^^^^^

Now:

Person person = new Person();
person = repo.save(person);
67c8c53
Commits on Apr 14, 2012
@olivergierke olivergierke DATACMNS-152 - Improved API in mapping subsystem.
PersistentProperty now exposes isEntity(). Mapping context now allows accessing a PersistentEntity referred to from a PersistentProperty. JavaDoc cleanups in MappingContext interface.
81718ae
Commits on Apr 15, 2012
@olivergierke olivergierke DATAJPA-153 - Fixed typo in reference documentation. 3196f3b
Commits on Apr 16, 2012
@olivergierke olivergierke DATACMNS-148 - Prepare 1.3.0.RC1 release.
Adapted changelog.
5fe65bb
@spring-buildmaster spring-buildmaster Release version 1.3.0.RC1. 703b285
@spring-buildmaster spring-buildmaster DATACMNS-148 - Next development version. 91eef0e
Commits on Apr 19, 2012
@olivergierke olivergierke DATACMNS-154 - Fixed query method detection when re-declararing CrudR…
…epositoryMethods.

With the fix for DATACMNS-151 we apparently broke the generic parameter type matching for methods that carry the domain class type parameter as argument. We now inspect the bound and make sure we compare the name of it if it's a TypeVariable or use the plain parameter type if its not.
f1516a9
Commits on Apr 20, 2012
@olivergierke olivergierke DATACMNS-153 - Fixed class loading issue in SimpleEntityPathResolver.
The path class is loaded using the domain class' class loader instead of the one of SimpleEntityPathResolver.
ecf3592
@olivergierke olivergierke DATACMNS-156 - Removed deprecated persistence package. 06dc1e5
@olivergierke olivergierke DATACMNS-157 - Query method lookup now only returns most specific met…
…hod for overridden methods.

Supposed you have a base repository interface declaring a method:

interface BaseRepository<T, ID extends Serializable> extends Repository<T, ID> {

  T myGenericMethod();
}

as well as a concrete repository redeclaring this method to annotate a query on it:

interface ConcreteRepository extends BaseRepository<User, Long> {

  @Query("…")
  User myGenericMethod()
}

Until now we both returned the intermediate method as well as the concrete one which might cause failures as in this case a query derivation would be attempted for the intermediate method which will fail for obvious reasons. The fix now starts with looking up the most specific method when iterating over the repository's methods which causes the intermediate method to be skipped in case it was overridden.
ddea8ed
Commits on Apr 23, 2012
@olivergierke olivergierke DATACMNS-158 - Test case failing to reproduce the ticket.
Added test case to show that invalid properties containing numeric digits do not cause a stack overflow.
8448573
Commits on Apr 27, 2012
@olivergierke olivergierke DATACMNS-161 - Upgrade to Querydsl 2.5.0.
Polished pom.xml a little.
6a461c0
Karl Bennett DATACMNS-159 - Improve reference documentation on repository extensions.
Updated section covering adding custom behavior to all repositories to better match what is in the actual code base.
a0bec0f
@olivergierke olivergierke DATACMNS-143 - Removed deprecations in MappingContextEvent. 7f6c03d
Commits on May 02, 2012
@olivergierke olivergierke DATACMNS-166 - Improved API in Repositories / RepositoryFactoryInform…
…ation.

Renamed methods in RepositoryMetadata to be consistent with EntityMetadata. Changed return type of RepositoryMetadata.getIdType() to Class<? extends Serializable>. Changed RepositoryFactoryInformation interface to expose RepositoryInformation rather than just the repository interface. Added exposing the QueryMethod instances as well. Adapter Repositories wrapper and it's clients accordingly.
5b0cb1a
@olivergierke olivergierke DATACMNS-167 - Improved Iterable handling in TypeDiscoverer.
If a type implemented Iterable<…> it was currently treated as a collection which might cause inappropriate conversion in the mapping sub-system. We now consider types collection like if they're either Iterable directly or assignable to Collection.
aec655a
@olivergierke olivergierke DATACMNS-165 - Updated changelog for 1.3.0.RC2 release. 100d5b3
@spring-buildmaster spring-buildmaster [artifactory-release] Release version 1.3.0.BUILD a1a60f3
@spring-buildmaster spring-buildmaster Prepare 1.3.0.BUILD-SNAPSHOT development. f67f9eb
Commits on May 03, 2012
@olivergierke olivergierke DATAMONGO-439 - Performance improvements in mapping subsystem.
Fixed minor performance problems discovered by the fix for DATAMONGO-439. We're now caching the information whether a constructor parameter is an enclosing class parameter. PersistentEntityParameterValueProvider is throwing an exception now if the parameter is not referring to a property of the entity (via the parameter name).
e20938a
Commits on May 07, 2012
@olivergierke olivergierke Polished pom.xml.
Removed obsolete stuff as we're now deploying to Artifactory.
b8c2e62
@olivergierke olivergierke DATACMNS-170 - Fixed potential NullPointerException in ReflectionEnti…
…tyInstantiator.

Moved null-check before the attempt to make the discovered id field accessible.
0f7231e
Commits on May 11, 2012
@olivergierke olivergierke Expose Bundlor's failOnWarnings to allow disabling for Sonar build. f4c3c78
Commits on May 16, 2012
@olivergierke olivergierke DATACMNS-171 - Added isQueryForEntity() method to QueryMethod.
isQueryForEntity() returns true if the QueryMethod returns either a single entity, a collection or Page of those.
7673567
@olivergierke olivergierke DATACMNS-149 - Polished repositories reference documentation. cee108d
@olivergierke olivergierke DATACMNS-149 - Updated changelog and pom.xml.
Fixed pom.xml to match requirements of Maven central.
ec87165
@spring-buildmaster spring-buildmaster DATACMNS-149 - Release version 1.3.0.RELEASE. 9f48059
@spring-buildmaster spring-buildmaster DATACMNS-149 - Next development version. b1d7e89
Commits on May 21, 2012
@olivergierke olivergierke DATACMNS-172 - Improved handling of invalid PropertyPaths.
Introduced PropertyReferenceException to capture the invalid property and the base PropertyPath a property expression could be resolved into. Introduced getLeafProperty() to be able to access the leaf property of a property path being created.
a7688b6
@olivergierke olivergierke DATACMNS-173 - Upgraded Maven Compiler and Surefire plugins.
Upgraded Surefire plugin to 2.12. Upgraded JUnit dependency to 4.10. Upgraded compiler plugin to 2.4.
169bdfe
@olivergierke olivergierke DATACMNS-174 - Part.Type now exposes keywords. 1a24145
@olivergierke olivergierke DATACMNS-175 - Execute Javadoc plugin before assembly. 4863609
Commits on May 23, 2012
@olivergierke olivergierke DATACMNS-177 - Changed OSGi bundle identifier to org.sfw.data.core. f2989f5
Commits on May 29, 2012
@olivergierke olivergierke DATACMNS-178 - Fixed dependency scope for JUnit.
Reduced scope of junit-dep dependency from compile to test.
31926a6
Commits on Jun 04, 2012
@olivergierke olivergierke DATACMNS-179 - Defer adding initial entity set to AbstractMappingCont…
…ext.

So far the domain classes to be added to the mapping context initially were added in afterPropertiesSet() of InitializingBean. This had the drawback that although the MappingContext is already set up properly the actual listeners of the events fired (e.g. index creating ones) might not have been set up properly. We list to the ContextRefreshedEvent indicating the entire ApplicationContext being set up completely. Thus all infrastructure components are set up properly and the timing issues doesn't exist anymore.
e5c6af6
Commits on Jun 06, 2012
@olivergierke olivergierke DATACMNS-180 - Don't consider Java transient fields transient for per…
…sistence.

So far we have considered Java transient fields as transient through the isTransient() method on PersistentProperty. This resulted in the properties not being persisted eventually. We now consider all fields as non-transient by default as we actually have to persist them as the object cannot be re-created completely without doing so as the usage of the transient keyword might rely on the readObject(…) method inside the object which would actually reconstitute the transient field's state but we of course cannot call this method actually.
031129e
Commits on Jun 08, 2012
@olivergierke olivergierke DATACMNS-182 - Added test case showing query method parsing works as …
…expected.
149cfa0
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