Search in sources :

Example 1 with DocumentTemplateProducer

use of jakarta.nosql.mapping.document.DocumentTemplateProducer in project jnosql-diana by eclipse.

the class TemplateBean method create.

@Override
public DocumentTemplate create(CreationalContext<DocumentTemplate> creationalContext) {
    DocumentTemplateProducer producer = getInstance(DocumentTemplateProducer.class);
    DocumentCollectionManager manager = getManager();
    return producer.get(manager);
}
Also used : DocumentCollectionManager(jakarta.nosql.document.DocumentCollectionManager) DocumentTemplateProducer(jakarta.nosql.mapping.document.DocumentTemplateProducer)

Example 2 with DocumentTemplateProducer

use of jakarta.nosql.mapping.document.DocumentTemplateProducer in project jnosql-diana by eclipse.

the class DocumentTemplateConverter method success.

@Override
public DocumentTemplate success(String value) {
    Config config = BeanManagers.getInstance(Config.class);
    final DocumentCollectionManager manager = config.getValue(value, DocumentCollectionManager.class);
    DocumentTemplateProducer producer = BeanManagers.getInstance(DocumentTemplateProducer.class);
    return producer.get(manager);
}
Also used : Config(org.eclipse.microprofile.config.Config) DocumentCollectionManager(jakarta.nosql.document.DocumentCollectionManager) DocumentTemplateProducer(jakarta.nosql.mapping.document.DocumentTemplateProducer)

Example 3 with DocumentTemplateProducer

use of jakarta.nosql.mapping.document.DocumentTemplateProducer in project jnosql-diana by eclipse.

the class ReactiveTemplateBean method create.

@Override
public ReactiveDocumentTemplate create(CreationalContext<ReactiveDocumentTemplate> context) {
    DocumentTemplateProducer producer = getInstance(DocumentTemplateProducer.class);
    DocumentCollectionManager manager = getManager();
    return producer.get(manager);
}
Also used : DocumentCollectionManager(jakarta.nosql.document.DocumentCollectionManager) DocumentTemplateProducer(jakarta.nosql.mapping.document.DocumentTemplateProducer)

Aggregations

DocumentCollectionManager (jakarta.nosql.document.DocumentCollectionManager)3 DocumentTemplateProducer (jakarta.nosql.mapping.document.DocumentTemplateProducer)3 Config (org.eclipse.microprofile.config.Config)1