use of org.eclipse.jnosql.mapping.document.reactive.ReactiveDocumentTemplateProducer in project jnosql-diana by eclipse.
the class ReactiveDocumentManagerConverter method success.
@Override
protected ReactiveDocumentTemplate success(String value) {
Config config = BeanManagers.getInstance(Config.class);
final DocumentTemplate template = config.getValue(value, DocumentTemplate.class);
ReactiveDocumentTemplateProducer producer = BeanManagers.getInstance(ReactiveDocumentTemplateProducer.class);
return producer.get(template);
}
use of org.eclipse.jnosql.mapping.document.reactive.ReactiveDocumentTemplateProducer in project jnosql-diana by eclipse.
the class ReactiveRepositoryDocumentBean method create.
@Override
public ReactiveRepository<?, ?> create(CreationalContext<ReactiveRepository<?, ?>> context) {
ClassMappings classMappings = getInstance(ClassMappings.class);
DocumentTemplate template = provider.isEmpty() ? getInstance(DocumentTemplate.class) : getInstance(DocumentTemplate.class, DatabaseQualifier.ofDocument(provider));
ReactiveDocumentTemplateProducer reactiveProducer = getInstance(ReactiveDocumentTemplateProducer.class);
final ReactiveDocumentTemplate reactiveDocumentTemplate = reactiveProducer.get(template);
Converters converters = getInstance(Converters.class);
ReactiveDocumentRepositoryProxy<?> handler = new ReactiveDocumentRepositoryProxy<>(reactiveDocumentTemplate, template, converters, classMappings, type);
return (ReactiveRepository<?, ?>) Proxy.newProxyInstance(type.getClassLoader(), new Class[] { type }, handler);
}
Aggregations