Search in sources :

Example 1 with Backend

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;
}
Also used : Backend(org.immutables.criteria.backend.Backend)

Example 2 with Backend

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;
}
Also used : Backend(org.immutables.criteria.backend.Backend)

Example 3 with Backend

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);
}
Also used : Backend(org.immutables.criteria.backend.Backend) PersonRepository(org.immutables.criteria.personmodel.PersonRepository)

Aggregations

Backend (org.immutables.criteria.backend.Backend)3 PersonRepository (org.immutables.criteria.personmodel.PersonRepository)1