@ -94,8 +94,8 @@ public class Repositories implements Iterable<Class<?>> {
@@ -94,8 +94,8 @@ public class Repositories implements Iterable<Class<?>> {
RepositoryFactoryInformation repositoryFactoryInformation = beanFactory . getBean ( name ,
RepositoryFactoryInformation . class ) ;
Class < ? > domainType = ClassUtils . getUserClass ( repositoryFactoryInformation . getRepositoryInformation ( )
. getDomainType ( ) ) ;
Class < ? > domainType = ClassUtils
. getUserClass ( repositoryFactoryInformation . getRepositoryInformation ( ) . get DomainType ( ) ) ;
RepositoryInformation information = repositoryFactoryInformation . getRepositoryInformation ( ) ;
Set < Class < ? > > alternativeDomainTypes = information . getAlternativeDomainTypes ( ) ;
@ -193,6 +193,28 @@ public class Repositories implements Iterable<Class<?>> {
@@ -193,6 +193,28 @@ public class Repositories implements Iterable<Class<?>> {
return information = = EMPTY_REPOSITORY_FACTORY_INFO ? null : information . getRepositoryInformation ( ) ;
}
/ * *
* Returns the { @link RepositoryInformation } for the given repository interface .
*
* @param repositoryInterface must not be { @literal null } .
* @return the { @link RepositoryInformation } for the given repository interface or { @literal null } there ' s no
* repository instance registered for the given interface .
* @since 1 . 12
* /
public RepositoryInformation getRepositoryInformation ( Class < ? > repositoryInterface ) {
for ( RepositoryFactoryInformation < Object , Serializable > factoryInformation : repositoryFactoryInfos . values ( ) ) {
RepositoryInformation information = factoryInformation . getRepositoryInformation ( ) ;
if ( information . getRepositoryInterface ( ) . equals ( repositoryInterface ) ) {
return information ;
}
}
return null ;
}
/ * *
* Returns the { @link PersistentEntity } for the given domain class . Might return { @literal null } in case the module
* storing the given domain class does not support the mapping subsystem .