use of org.immutables.criteria.backend.Backend in project immutables by immutables.
the class PersonAggregationTest method repository.
protected PersonRepository repository() {
if (repository == null) {
Backend backend = Objects.requireNonNull(backend(), "backend is null");
repository = new PersonRepository(backend);
}
return repository;
}
use of org.immutables.criteria.backend.Backend in project immutables by immutables.
the class AbstractPersonTest method repository.
protected PersonRepository repository() {
if (repository == null) {
Backend backend = Objects.requireNonNull(backend(), "backend is null");
repository = new PersonRepository(backend);
}
return repository;
}
use of org.immutables.criteria.backend.Backend in project immutables by immutables.
the class GetAllOptimizationTest method createRepository.
/**
* Create repository using lambda for customization
*/
private PersonRepository createRepository(Function<GeodeSetup.Builder, GeodeSetup.Builder> fn) {
RegionResolver resolver = new LocalResolver(RegionResolver.defaultResolver(cache));
GeodeSetup.Builder setup = fn.apply(GeodeSetup.builder().regionResolver(resolver));
AutocreateRegion autocreate = new AutocreateRegion(cache);
Backend backend = WithSessionCallback.wrap(new GeodeBackend(setup.build()), autocreate);
return new PersonRepository(backend);
}
Aggregations