use of org.springframework.data.repository.core.support.RepositoryComposition.RepositoryFragments in project spring-data-commons by spring-projects.
the class CdiRepositoryBean method create.
/**
* Creates the actual component instance given a {@link RepositoryFactorySupport repository factory supplier} and the
* repository {@link Class type}. This method is an utility for to create a repository. This method will obtain a
* {@link RepositoryFactorySupport repository factory} and configure it with {@link CdiRepositoryConfiguration}.
*
* @param factorySupplier must not be {@literal null}.
* @param repositoryType must not be {@literal null}.
* @return
* @since 2.1
*/
protected T create(Supplier<? extends RepositoryFactorySupport> factorySupplier, Class<T> repositoryType) {
CdiRepositoryConfiguration configuration = lookupConfiguration(beanManager, qualifiers);
RepositoryFragments repositoryFragments = getRepositoryFragments(repositoryType, configuration);
RepositoryFactorySupport factory = factorySupplier.get();
applyConfiguration(factory, configuration);
return create(factory, repositoryType, repositoryFragments);
}
Aggregations