Search in sources :

Example 1 with RepositoryAsync

use of org.jnosql.artemis.RepositoryAsync in project jnosql-artemis by eclipse.

the class RepositoryAsyncColumnBean method create.

@Override
public RepositoryAsync create(CreationalContext<RepositoryAsync> creationalContext) {
    ClassRepresentations classRepresentations = getInstance(ClassRepresentations.class);
    ColumnTemplateAsync repository = provider.isEmpty() ? getInstance(ColumnTemplateAsync.class) : getInstance(ColumnTemplateAsync.class, provider);
    Reflections reflections = getInstance(Reflections.class);
    Converters converters = getInstance(Converters.class);
    ColumnRepositoryAsyncProxy handler = new ColumnRepositoryAsyncProxy(repository, classRepresentations, type, reflections, converters);
    return (RepositoryAsync) Proxy.newProxyInstance(type.getClassLoader(), new Class[] { type }, handler);
}
Also used : Converters(org.jnosql.artemis.Converters) ClassRepresentations(org.jnosql.artemis.reflection.ClassRepresentations) ColumnTemplateAsync(org.jnosql.artemis.column.ColumnTemplateAsync) Reflections(org.jnosql.artemis.reflection.Reflections) RepositoryAsync(org.jnosql.artemis.RepositoryAsync)

Example 2 with RepositoryAsync

use of org.jnosql.artemis.RepositoryAsync in project jnosql-artemis by eclipse.

the class DocumentRepositoryAsyncBean method create.

@Override
public RepositoryAsync create(CreationalContext<RepositoryAsync> creationalContext) {
    ClassRepresentations classRepresentations = getInstance(ClassRepresentations.class);
    DocumentTemplateAsync repository = provider.isEmpty() ? getInstance(DocumentTemplateAsync.class) : getInstance(DocumentTemplateAsync.class, provider);
    Reflections reflections = getInstance(Reflections.class);
    Converters converters = getInstance(Converters.class);
    DocumentRepositoryAsyncProxy handler = new DocumentRepositoryAsyncProxy(repository, classRepresentations, type, reflections, converters);
    return (RepositoryAsync) Proxy.newProxyInstance(type.getClassLoader(), new Class[] { type }, handler);
}
Also used : DocumentTemplateAsync(org.jnosql.artemis.document.DocumentTemplateAsync) Converters(org.jnosql.artemis.Converters) ClassRepresentations(org.jnosql.artemis.reflection.ClassRepresentations) Reflections(org.jnosql.artemis.reflection.Reflections) RepositoryAsync(org.jnosql.artemis.RepositoryAsync)

Aggregations

Converters (org.jnosql.artemis.Converters)2 RepositoryAsync (org.jnosql.artemis.RepositoryAsync)2 ClassRepresentations (org.jnosql.artemis.reflection.ClassRepresentations)2 Reflections (org.jnosql.artemis.reflection.Reflections)2 ColumnTemplateAsync (org.jnosql.artemis.column.ColumnTemplateAsync)1 DocumentTemplateAsync (org.jnosql.artemis.document.DocumentTemplateAsync)1