use of jakarta.nosql.mapping.keyvalue.KeyValueTemplate in project jnosql-diana by eclipse.
the class DefaultKeyValueRepositoryProducerTest method shouldCreateFromTemplate.
@Test
public void shouldCreateFromTemplate() {
KeyValueTemplate template = Mockito.mock(KeyValueTemplate.class);
PersonRepository personRepository = producer.get(PersonRepository.class, template);
assertNotNull(personRepository);
}
use of jakarta.nosql.mapping.keyvalue.KeyValueTemplate in project jnosql-diana by eclipse.
the class DefaultKeyValueRepositoryProducer method get.
@Override
public <T, K, R extends Repository<T, K>> R get(Class<R> repositoryClass, BucketManager manager) {
Objects.requireNonNull(repositoryClass, "repository class is required");
Objects.requireNonNull(manager, "manager class is required");
KeyValueTemplate template = producer.get(manager);
return get(repositoryClass, template);
}
use of jakarta.nosql.mapping.keyvalue.KeyValueTemplate in project jnosql-diana by eclipse.
the class ReactiveKeyValueManagerConverter method success.
@Override
protected ReactiveKeyValueTemplate success(String value) {
Config config = BeanManagers.getInstance(Config.class);
final KeyValueTemplate template = config.getValue(value, KeyValueTemplate.class);
ReactiveKeyValueTemplateProducer producer = BeanManagers.getInstance(ReactiveKeyValueTemplateProducer.class);
return producer.get(template);
}
use of jakarta.nosql.mapping.keyvalue.KeyValueTemplate in project jnosql-diana by eclipse.
the class ReactiveTemplateBean method create.
@Override
public ReactiveKeyValueTemplate create(CreationalContext<ReactiveKeyValueTemplate> creationalContext) {
ReactiveKeyValueTemplateProducer producer = getInstance(ReactiveKeyValueTemplateProducer.class);
KeyValueTemplate template = getManager();
return producer.get(template);
}
use of jakarta.nosql.mapping.keyvalue.KeyValueTemplate in project jnosql-diana by eclipse.
the class ReactiveKeyValueRepositoryProducerTest method shouldCreateFromTemplate.
@Test
public void shouldCreateFromTemplate() {
KeyValueTemplate template = Mockito.mock(KeyValueTemplate.class);
PersonRepository personRepository = producer.get(PersonRepository.class, template);
assertNotNull(personRepository);
}
Aggregations