Search in sources :

Example 1 with QueryByExampleExecutor

use of org.springframework.data.repository.query.QueryByExampleExecutor in project spring-data-commons by spring-projects.

the class RepositoryCompositionUnitTests method before.

@Before
@SuppressWarnings("rawtypes")
public void before() {
    RepositoryInformation repositoryInformation = new DefaultRepositoryInformation(new DefaultRepositoryMetadata(PersonRepository.class), backingRepo.getClass(), RepositoryComposition.empty());
    RepositoryFragment<QueryByExampleExecutor> mixin = RepositoryFragment.implemented(QueryByExampleExecutor.class, queryByExampleExecutor);
    RepositoryFragment<PersonRepository> base = RepositoryFragment.implemented(backingRepo);
    repositoryComposition = RepositoryComposition.of(RepositoryFragments.of(mixin, base)).withMethodLookup(MethodLookups.forRepositoryTypes(repositoryInformation));
}
Also used : QueryByExampleExecutor(org.springframework.data.repository.query.QueryByExampleExecutor) RepositoryInformation(org.springframework.data.repository.core.RepositoryInformation) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 RepositoryInformation (org.springframework.data.repository.core.RepositoryInformation)1 QueryByExampleExecutor (org.springframework.data.repository.query.QueryByExampleExecutor)1