@ -1,5 +1,5 @@
/ *
/ *
* Copyright 2012 - 2014 the original author or authors .
* Copyright 2012 - 2015 the original author or authors .
*
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* you may not use this file except in compliance with the License .
@ -39,6 +39,7 @@ import org.springframework.util.ClassUtils;
*
*
* @author Oliver Gierke
* @author Oliver Gierke
* @author Thomas Darimont
* @author Thomas Darimont
* @author Thomas Eizinger
* /
* /
public class Repositories implements Iterable < Class < ? > > {
public class Repositories implements Iterable < Class < ? > > {
@ -133,11 +134,19 @@ public class Repositories implements Iterable<Class<?>> {
Assert . notNull ( domainClass , DOMAIN_TYPE_MUST_NOT_BE_NULL ) ;
Assert . notNull ( domainClass , DOMAIN_TYPE_MUST_NOT_BE_NULL ) ;
RepositoryFactoryInformation < Object , Serializable > repositoryInfo = repositoryFactoryInfos . get ( ClassUtils
Class < ? > classToInspect = domainClass ;
. getUserClass ( domainClass ) ) ;
RepositoryFactoryInformation < Object , Serializable > repositoryInfo = repositoryFactoryInfos
. get ( ClassUtils . getUserClass ( classToInspect ) ) ;
while ( repositoryInfo = = null & & ! classToInspect . equals ( Object . class ) ) {
classToInspect = classToInspect . getSuperclass ( ) ;
repositoryInfo = repositoryFactoryInfos . get ( ClassUtils . getUserClass ( classToInspect ) ) ;
}
return repositoryInfo = = null ? EMPTY_REPOSITORY_FACTORY_INFO : repositoryInfo ;
return repositoryInfo = = null ? EMPTY_REPOSITORY_FACTORY_INFO : repositoryInfo ;
}
}
/ * *
/ * *
* Returns the { @link EntityInformation } for the given domain class .
* Returns the { @link EntityInformation } for the given domain class .
*
*