From a130118fccb9132cc46fa1f063422f140bca06cd Mon Sep 17 00:00:00 2001
From: Otavio Santana This class models relationships between nodes in a Neo4J database, where each
- * edge is defined by a source node, a target node, and a relationship type. Edges are immutable and ensure that a valid relationship exists between two entities.
* This implementation wraps a TinkerPop {@link Graph} instance and provides methods to interact with
@@ -44,12 +44,12 @@
* as indicated by the UnsupportedOperationException thrown by those methods.
*
- * The core interface in this package is {@link org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager},
+ * The core interface in this package is {@link org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager},
* which extends {@link org.eclipse.jnosql.communication.semistructured.DatabaseManager}
* and acts as a specialized extension for managing graph databases. Implementations of this interface
* provide methods for interacting with the underlying graph database, executing graph traversals,
diff --git a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/AbstractGraphTemplate.java b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/AbstractGraphTemplate.java
index 2b49f6218..3c149a999 100644
--- a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/AbstractGraphTemplate.java
+++ b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/AbstractGraphTemplate.java
@@ -25,7 +25,7 @@
import org.apache.tinkerpop.gremlin.structure.Transaction;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.eclipse.jnosql.databases.tinkerpop.communication.CommunicationEntityConverter;
-import org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager;
+import org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager;
import org.eclipse.jnosql.databases.tinkerpop.communication.GraphTransactionUtil;
import org.eclipse.jnosql.mapping.IdNotFoundException;
import org.eclipse.jnosql.mapping.PreparedStatement;
@@ -62,11 +62,11 @@ abstract class AbstractGraphTemplate extends AbstractSemiStructuredTemplate impl
/**
- * Retrieves the {@link GraphDatabaseManager} associated with this graph template.
+ * Retrieves the {@link TinkerpopGraphDatabaseManager} associated with this graph template.
*
- * @return the {@link GraphDatabaseManager} associated with this graph template
+ * @return the {@link TinkerpopGraphDatabaseManager} associated with this graph template
*/
- protected abstract GraphDatabaseManager manager();
+ protected abstract TinkerpopGraphDatabaseManager manager();
/**
* Retrieves the {@link GraphTraversalSource} associated with this graph template.
diff --git a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultGraphTemplate.java b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultGraphTemplate.java
index eefe02480..201cd1a2e 100644
--- a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultGraphTemplate.java
+++ b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultGraphTemplate.java
@@ -19,7 +19,7 @@
import jakarta.inject.Inject;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager;
+import org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager;
import org.eclipse.jnosql.mapping.Database;
import org.eclipse.jnosql.mapping.core.Converters;
import org.eclipse.jnosql.mapping.metadata.EntitiesMetadata;
@@ -34,7 +34,7 @@
class DefaultGraphTemplate extends AbstractGraphTemplate {
private EntityConverter converter;
- private GraphDatabaseManager manager;
+ private TinkerpopGraphDatabaseManager manager;
private EventPersistManager eventManager;
private EntitiesMetadata entities;
private Converters converters;
@@ -49,7 +49,7 @@ class DefaultGraphTemplate extends AbstractGraphTemplate {
this.eventManager = eventManager;
this.entities = entities;
this.converters = converters;
- this.manager = GraphDatabaseManager.of(graph);
+ this.manager = TinkerpopGraphDatabaseManager.of(graph);
}
/**
@@ -64,7 +64,7 @@ protected EntityConverter converter() {
}
@Override
- protected GraphDatabaseManager manager() {
+ protected TinkerpopGraphDatabaseManager manager() {
return manager;
}
diff --git a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java
index 37a4ee1c5..9f1c219f0 100644
--- a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java
+++ b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java
@@ -20,7 +20,7 @@
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.eclipse.jnosql.communication.semistructured.DatabaseManager;
-import org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager;
+import org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager;
import org.eclipse.jnosql.mapping.core.Converters;
import org.eclipse.jnosql.mapping.metadata.EntitiesMetadata;
import org.eclipse.jnosql.mapping.semistructured.EntityConverter;
@@ -70,14 +70,14 @@ static class ProducerGraphTemplate extends AbstractGraphTemplate {
private final Graph graph;
- private final GraphDatabaseManager manager;
+ private final TinkerpopGraphDatabaseManager manager;
public ProducerGraphTemplate(EntityConverter converter, Graph graph,
EventPersistManager eventManager,
EntitiesMetadata entities, Converters converters) {
this.converter = converter;
this.graph = graph;
- this.manager = GraphDatabaseManager.of(graph);
+ this.manager = TinkerpopGraphDatabaseManager.of(graph);
this.eventManager = eventManager;
this.entities = entities;
this.converters = converters;
@@ -93,7 +93,7 @@ protected EntityConverter converter() {
}
@Override
- protected GraphDatabaseManager manager() {
+ protected TinkerpopGraphDatabaseManager manager() {
return manager;
}
diff --git a/jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/communication/DefaultGraphDatabaseManagerTest.java b/jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/communication/DefaultTinkerpopGraphDatabaseManagerTest.java
similarity index 97%
rename from jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/communication/DefaultGraphDatabaseManagerTest.java
rename to jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/communication/DefaultTinkerpopGraphDatabaseManagerTest.java
index a5f5d954f..e1f17fc97 100644
--- a/jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/communication/DefaultGraphDatabaseManagerTest.java
+++ b/jnosql-tinkerpop/src/test/java/org/eclipse/jnosql/databases/tinkerpop/communication/DefaultTinkerpopGraphDatabaseManagerTest.java
@@ -44,18 +44,18 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
-class DefaultGraphDatabaseManagerTest {
+class DefaultTinkerpopGraphDatabaseManagerTest {
public static final String COLLECTION_NAME = "person";
- private GraphDatabaseManager entityManager;
+ private TinkerpopGraphDatabaseManager entityManager;
private final Faker faker = new Faker();
@BeforeEach
void setUp(){
Graph graph = GraphSupplier.INSTANCE.get();
- this.entityManager = GraphDatabaseManager.of(graph);
+ this.entityManager = TinkerpopGraphDatabaseManager.of(graph);
}
@BeforeEach
@@ -76,7 +76,7 @@ void shouldInsertEntity(){
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(communicationEntity.find("name", String.class)).get().isEqualTo(name);
softly.assertThat(communicationEntity.find("age", int.class)).get().isEqualTo(age);
- softly.assertThat(communicationEntity.find(DefaultGraphDatabaseManager.ID_PROPERTY)).isPresent();
+ softly.assertThat(communicationEntity.find(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY)).isPresent();
});
}
@@ -102,11 +102,11 @@ void shouldInsertEntities(){
softly.assertThat(communicationEntities).hasSize(2);
softly.assertThat(communicationEntities.get(0).find("name", String.class)).get().isEqualTo(name);
softly.assertThat(communicationEntities.get(0).find("age", int.class)).get().isEqualTo(age);
- softly.assertThat(communicationEntities.get(0).find(DefaultGraphDatabaseManager.ID_PROPERTY)).isPresent();
+ softly.assertThat(communicationEntities.get(0).find(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY)).isPresent();
softly.assertThat(communicationEntities.get(1).find("name", String.class)).get().isEqualTo(name2);
softly.assertThat(communicationEntities.get(1).find("age", int.class)).get().isEqualTo(age2);
- softly.assertThat(communicationEntities.get(1).find(DefaultGraphDatabaseManager.ID_PROPERTY)).isPresent();
+ softly.assertThat(communicationEntities.get(1).find(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY)).isPresent();
});
}
From bed52abe0d1886f4636af0967b5c92cd8c457cbc Mon Sep 17 00:00:00 2001
From: Otavio Santana outVertex ---label---> inVertex.
*/
diff --git a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java
index 9f1c219f0..188fff9c8 100644
--- a/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java
+++ b/jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java
@@ -30,11 +30,11 @@
import java.util.function.Function;
/**
- * An {@code ApplicationScoped} producer class responsible for creating instances of {@link GraphTemplate}.
- * It implements the {@link Function} interface with {@link DatabaseManager} as input and {@link GraphTemplate} as output.
+ * An {@code ApplicationScoped} producer class responsible for creating instances of {@link TinkerpopTemplate}.
+ * It implements the {@link Function} interface with {@link DatabaseManager} as input and {@link TinkerpopTemplate} as output.
*/
@ApplicationScoped
-public class GraphTemplateProducer implements Function