Search in sources :

Example 1 with KeyValueTemplateProducer

use of jakarta.nosql.mapping.keyvalue.KeyValueTemplateProducer in project jnosql-diana by eclipse.

the class TemplateBean method create.

@Override
public KeyValueTemplate create(CreationalContext<KeyValueTemplate> creationalContext) {
    KeyValueTemplateProducer producer = getInstance(KeyValueTemplateProducer.class);
    BucketManager manager = getManager();
    return producer.get(manager);
}
Also used : KeyValueTemplateProducer(jakarta.nosql.mapping.keyvalue.KeyValueTemplateProducer) BucketManager(jakarta.nosql.keyvalue.BucketManager)

Example 2 with KeyValueTemplateProducer

use of jakarta.nosql.mapping.keyvalue.KeyValueTemplateProducer in project jnosql-diana by eclipse.

the class KeyValueTemplateConverter method success.

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

Aggregations

BucketManager (jakarta.nosql.keyvalue.BucketManager)2 KeyValueTemplateProducer (jakarta.nosql.mapping.keyvalue.KeyValueTemplateProducer)2 Config (org.eclipse.microprofile.config.Config)1