Search in sources :

Example 1 with ColumnTemplate

use of org.jnosql.artemis.column.ColumnTemplate in project jnosql-artemis by eclipse.

the class RepositoryColumnBean method create.

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

Aggregations

Converters (org.jnosql.artemis.Converters)1 Repository (org.jnosql.artemis.Repository)1 ColumnTemplate (org.jnosql.artemis.column.ColumnTemplate)1 ClassRepresentations (org.jnosql.artemis.reflection.ClassRepresentations)1 Reflections (org.jnosql.artemis.reflection.Reflections)1