Search in sources :

Example 1 with KeyValueTemplate

use of org.jnosql.artemis.key.KeyValueTemplate in project jnosql-artemis by eclipse.

the class KeyValueRepositoryBean method create.

@Override
public Repository create(CreationalContext<Repository> creationalContext) {
    KeyValueTemplate repository = provider.isEmpty() ? getInstance(KeyValueTemplate.class) : getInstance(KeyValueTemplate.class, provider);
    KeyValueRepositoryProxy handler = new KeyValueRepositoryProxy(type, repository);
    return (Repository) Proxy.newProxyInstance(type.getClassLoader(), new Class[] { type }, handler);
}
Also used : Repository(org.jnosql.artemis.Repository) KeyValueTemplate(org.jnosql.artemis.key.KeyValueTemplate)

Aggregations

Repository (org.jnosql.artemis.Repository)1 KeyValueTemplate (org.jnosql.artemis.key.KeyValueTemplate)1