Search in sources :

Example 1 with GraphConverter

use of org.eclipse.jnosql.mapping.graph.GraphConverter in project jnosql-diana by eclipse.

the class RepositoryGraphBean method create.

@Override
public Repository create(CreationalContext<Repository> creationalContext) {
    ClassMappings classMappings = getInstance(ClassMappings.class);
    GraphTemplate repository = provider.isEmpty() ? getInstance(GraphTemplate.class) : getInstance(GraphTemplate.class, DatabaseQualifier.ofGraph(provider));
    GraphConverter converter = getInstance(GraphConverter.class);
    Graph graph = provider.isEmpty() ? getInstance(Graph.class) : getInstance(Graph.class, DatabaseQualifier.ofGraph(provider));
    Converters converters = getInstance(Converters.class);
    GraphRepositoryProxy handler = new GraphRepositoryProxy(repository, classMappings, type, graph, converter, converters);
    return (Repository) Proxy.newProxyInstance(type.getClassLoader(), new Class[] { type }, handler);
}
Also used : Repository(jakarta.nosql.mapping.Repository) Graph(org.apache.tinkerpop.gremlin.structure.Graph) GraphTemplate(org.eclipse.jnosql.mapping.graph.GraphTemplate) Converters(jakarta.nosql.mapping.Converters) GraphConverter(org.eclipse.jnosql.mapping.graph.GraphConverter) ClassMappings(org.eclipse.jnosql.mapping.reflection.ClassMappings)

Aggregations

Converters (jakarta.nosql.mapping.Converters)1 Repository (jakarta.nosql.mapping.Repository)1 Graph (org.apache.tinkerpop.gremlin.structure.Graph)1 GraphConverter (org.eclipse.jnosql.mapping.graph.GraphConverter)1 GraphTemplate (org.eclipse.jnosql.mapping.graph.GraphTemplate)1 ClassMappings (org.eclipse.jnosql.mapping.reflection.ClassMappings)1