Search in sources :

Example 6 with Repository

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

the class RepositoryColumnBean method create.

@Override
public Repository create(CreationalContext<Repository> creationalContext) {
    ClassMappings classMappings = getInstance(ClassMappings.class);
    ColumnTemplate template = provider.isEmpty() ? getInstance(ColumnTemplate.class) : getInstance(ColumnTemplate.class, DatabaseQualifier.ofColumn(provider));
    Converters converters = getInstance(Converters.class);
    ColumnRepositoryProxy handler = new ColumnRepositoryProxy(template, classMappings, type, converters);
    return (Repository) Proxy.newProxyInstance(type.getClassLoader(), new Class[] { type }, handler);
}
Also used : Repository(jakarta.nosql.mapping.Repository) ColumnTemplate(jakarta.nosql.mapping.column.ColumnTemplate) Converters(jakarta.nosql.mapping.Converters) ClassMappings(org.eclipse.jnosql.mapping.reflection.ClassMappings)

Aggregations

Repository (jakarta.nosql.mapping.Repository)6 Converters (jakarta.nosql.mapping.Converters)4 ClassMappings (org.eclipse.jnosql.mapping.reflection.ClassMappings)3 DynamicQueryException (jakarta.nosql.mapping.DynamicQueryException)2 KeyValueTemplate (jakarta.nosql.mapping.keyvalue.KeyValueTemplate)2 InvocationHandler (java.lang.reflect.InvocationHandler)2 Method (java.lang.reflect.Method)2 Graph (org.apache.tinkerpop.gremlin.structure.Graph)2 GraphConverter (org.eclipse.jnosql.mapping.graph.GraphConverter)2 GraphTemplate (org.eclipse.jnosql.mapping.graph.GraphTemplate)2 RepositoryType (org.eclipse.jnosql.mapping.query.RepositoryType)2 DynamicQueryMethodReturn (org.eclipse.jnosql.mapping.repository.DynamicQueryMethodReturn)2 Page (jakarta.nosql.mapping.Page)1 Pagination (jakarta.nosql.mapping.Pagination)1 ColumnTemplate (jakarta.nosql.mapping.column.ColumnTemplate)1 DocumentTemplate (jakarta.nosql.mapping.document.DocumentTemplate)1 List (java.util.List)1 Optional (java.util.Optional)1 Function (java.util.function.Function)1 Supplier (java.util.function.Supplier)1