Search in sources :

Example 1 with ClassMappings

use of org.eclipse.jnosql.mapping.reflection.ClassMappings in project jnosql-diana by eclipse.

the class BeanManagersTest method shouldInstanceWithQualifierWithCurrentBeanManager.

@Test
public void shouldInstanceWithQualifierWithCurrentBeanManager() {
    final ClassMappings classMappings = BeanManagers.getInstance(ClassMappings.class, new Default.Literal());
    assertNotNull(classMappings);
}
Also used : ClassMappings(org.eclipse.jnosql.mapping.reflection.ClassMappings) Default(javax.enterprise.inject.Default) Test(org.junit.jupiter.api.Test)

Example 2 with ClassMappings

use of org.eclipse.jnosql.mapping.reflection.ClassMappings in project jnosql-diana by eclipse.

the class BeanManagersTest method shouldInstanceWithQualifier.

@Test
public void shouldInstanceWithQualifier() {
    final ClassMappings classMappings = BeanManagers.getInstance(ClassMappings.class, new Default.Literal(), beanManager);
    assertNotNull(classMappings);
}
Also used : ClassMappings(org.eclipse.jnosql.mapping.reflection.ClassMappings) Default(javax.enterprise.inject.Default) Test(org.junit.jupiter.api.Test)

Example 3 with ClassMappings

use of org.eclipse.jnosql.mapping.reflection.ClassMappings in project jnosql-diana by eclipse.

the class BeanManagersTest method shouldInstance.

@Test
public void shouldInstance() {
    final ClassMappings classMappings = BeanManagers.getInstance(ClassMappings.class, beanManager);
    assertNotNull(classMappings);
}
Also used : ClassMappings(org.eclipse.jnosql.mapping.reflection.ClassMappings) Test(org.junit.jupiter.api.Test)

Example 4 with ClassMappings

use of org.eclipse.jnosql.mapping.reflection.ClassMappings 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)

Example 5 with ClassMappings

use of org.eclipse.jnosql.mapping.reflection.ClassMappings in project jnosql-diana by eclipse.

the class BeanManagersTest method shouldInstanceWithCurrentBeanManager.

@Test
public void shouldInstanceWithCurrentBeanManager() {
    final ClassMappings classMappings = BeanManagers.getInstance(ClassMappings.class);
    assertNotNull(classMappings);
}
Also used : ClassMappings(org.eclipse.jnosql.mapping.reflection.ClassMappings) Test(org.junit.jupiter.api.Test)

Aggregations

ClassMappings (org.eclipse.jnosql.mapping.reflection.ClassMappings)9 Converters (jakarta.nosql.mapping.Converters)5 Test (org.junit.jupiter.api.Test)4 Repository (jakarta.nosql.mapping.Repository)3 ColumnTemplate (jakarta.nosql.mapping.column.ColumnTemplate)2 DocumentTemplate (jakarta.nosql.mapping.document.DocumentTemplate)2 Default (javax.enterprise.inject.Default)2 ReactiveRepository (org.eclipse.jnosql.mapping.reactive.ReactiveRepository)2 Graph (org.apache.tinkerpop.gremlin.structure.Graph)1 ReactiveColumnTemplate (org.eclipse.jnosql.mapping.column.reactive.ReactiveColumnTemplate)1 ReactiveColumnTemplateProducer (org.eclipse.jnosql.mapping.column.reactive.ReactiveColumnTemplateProducer)1 ReactiveDocumentTemplate (org.eclipse.jnosql.mapping.document.reactive.ReactiveDocumentTemplate)1 ReactiveDocumentTemplateProducer (org.eclipse.jnosql.mapping.document.reactive.ReactiveDocumentTemplateProducer)1 GraphConverter (org.eclipse.jnosql.mapping.graph.GraphConverter)1 GraphTemplate (org.eclipse.jnosql.mapping.graph.GraphTemplate)1