Skip to content

Commit 471725b

Browse files
committed
feat: update package manage
Signed-off-by: Otavio Santana <[email protected]>
1 parent 0fe1e0f commit 471725b

File tree

8 files changed

+27
-26
lines changed

8 files changed

+27
-26
lines changed

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/communication/CommunicationEntityConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum CommunicationEntityConverter implements Function<Vertex, Communicati
2727
public CommunicationEntity apply(Vertex vertex) {
2828
var entity = CommunicationEntity.of(vertex.label());
2929
vertex.properties().forEachRemaining(p -> entity.add(p.key(), p.value()));
30-
entity.add(DefaultGraphDatabaseManager.ID_PROPERTY, vertex.id());
30+
entity.add(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY, vertex.id());
3131
return entity;
3232
}
3333
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import static org.apache.tinkerpop.gremlin.process.traversal.Order.desc;
3434

3535
/**
36-
* Default implementation of {@link GraphDatabaseManager} that serves as an adapter to the TinkerPop
36+
* Default implementation of {@link TinkerpopGraphDatabaseManager} that serves as an adapter to the TinkerPop
3737
* graph database provided by the Apache TinkerPop framework.
3838
* <p>
3939
* This implementation wraps a TinkerPop {@link Graph} instance and provides methods to interact with
@@ -44,12 +44,12 @@
4444
* as indicated by the UnsupportedOperationException thrown by those methods.
4545
* </p>
4646
*/
47-
public class DefaultGraphDatabaseManager implements GraphDatabaseManager {
47+
public class DefaultTinkerpopGraphDatabaseManager implements TinkerpopGraphDatabaseManager {
4848

4949
public static final String ID_PROPERTY = "_id";
5050
private final Graph graph;
5151

52-
DefaultGraphDatabaseManager(Graph graph) {
52+
DefaultTinkerpopGraphDatabaseManager(Graph graph) {
5353
this.graph = graph;
5454
}
5555

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
package org.eclipse.jnosql.databases.tinkerpop.communication;
1616

1717
import org.apache.tinkerpop.gremlin.structure.Graph;
18+
import org.eclipse.jnosql.communication.graph.GraphDatabaseManager;
1819
import org.eclipse.jnosql.communication.semistructured.DatabaseManager;
1920

2021
import java.util.Objects;
@@ -32,7 +33,7 @@
3233
* also act as suppliers of the underlying {@link org.apache.tinkerpop.gremlin.structure.Graph} instance.
3334
* </p>
3435
*/
35-
public interface GraphDatabaseManager extends DatabaseManager, Supplier<Graph> {
36+
public interface TinkerpopGraphDatabaseManager extends GraphDatabaseManager, Supplier<Graph> {
3637

3738
/**
3839
* Creates a new instance of DefaultGraphDatabaseManager with the specified TinkerPop Graph.
@@ -41,8 +42,8 @@ public interface GraphDatabaseManager extends DatabaseManager, Supplier<Graph> {
4142
* @return a new DefaultGraphDatabaseManager instance
4243
* @throws NullPointerException if the graph parameter is null
4344
*/
44-
static GraphDatabaseManager of(Graph graph) {
45+
static TinkerpopGraphDatabaseManager of(Graph graph) {
4546
Objects.requireNonNull(graph, "graph is required");
46-
return new DefaultGraphDatabaseManager(graph);
47+
return new DefaultTinkerpopGraphDatabaseManager(graph);
4748
}
4849
}

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/communication/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* in the JNoSQL project. It contains interfaces, classes, and utilities that enable developers to
1919
* communicate with and manage graph databases.
2020
* <p>
21-
* The core interface in this package is {@link org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager},
21+
* The core interface in this package is {@link org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager},
2222
* which extends {@link org.eclipse.jnosql.communication.semistructured.DatabaseManager}
2323
* and acts as a specialized extension for managing graph databases. Implementations of this interface
2424
* provide methods for interacting with the underlying graph database, executing graph traversals,

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/AbstractGraphTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.apache.tinkerpop.gremlin.structure.Transaction;
2626
import org.apache.tinkerpop.gremlin.structure.Vertex;
2727
import org.eclipse.jnosql.databases.tinkerpop.communication.CommunicationEntityConverter;
28-
import org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager;
28+
import org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager;
2929
import org.eclipse.jnosql.databases.tinkerpop.communication.GraphTransactionUtil;
3030
import org.eclipse.jnosql.mapping.IdNotFoundException;
3131
import org.eclipse.jnosql.mapping.PreparedStatement;
@@ -62,11 +62,11 @@ abstract class AbstractGraphTemplate extends AbstractSemiStructuredTemplate impl
6262

6363

6464
/**
65-
* Retrieves the {@link GraphDatabaseManager} associated with this graph template.
65+
* Retrieves the {@link TinkerpopGraphDatabaseManager} associated with this graph template.
6666
*
67-
* @return the {@link GraphDatabaseManager} associated with this graph template
67+
* @return the {@link TinkerpopGraphDatabaseManager} associated with this graph template
6868
*/
69-
protected abstract GraphDatabaseManager manager();
69+
protected abstract TinkerpopGraphDatabaseManager manager();
7070

7171
/**
7272
* Retrieves the {@link GraphTraversalSource} associated with this graph template.

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/DefaultGraphTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import jakarta.inject.Inject;
2020
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
2121
import org.apache.tinkerpop.gremlin.structure.Graph;
22-
import org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager;
22+
import org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager;
2323
import org.eclipse.jnosql.mapping.Database;
2424
import org.eclipse.jnosql.mapping.core.Converters;
2525
import org.eclipse.jnosql.mapping.metadata.EntitiesMetadata;
@@ -34,7 +34,7 @@
3434
class DefaultGraphTemplate extends AbstractGraphTemplate {
3535

3636
private EntityConverter converter;
37-
private GraphDatabaseManager manager;
37+
private TinkerpopGraphDatabaseManager manager;
3838
private EventPersistManager eventManager;
3939
private EntitiesMetadata entities;
4040
private Converters converters;
@@ -49,7 +49,7 @@ class DefaultGraphTemplate extends AbstractGraphTemplate {
4949
this.eventManager = eventManager;
5050
this.entities = entities;
5151
this.converters = converters;
52-
this.manager = GraphDatabaseManager.of(graph);
52+
this.manager = TinkerpopGraphDatabaseManager.of(graph);
5353
}
5454

5555
/**
@@ -64,7 +64,7 @@ protected EntityConverter converter() {
6464
}
6565

6666
@Override
67-
protected GraphDatabaseManager manager() {
67+
protected TinkerpopGraphDatabaseManager manager() {
6868
return manager;
6969
}
7070

jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/mapping/GraphTemplateProducer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
2121
import org.apache.tinkerpop.gremlin.structure.Graph;
2222
import org.eclipse.jnosql.communication.semistructured.DatabaseManager;
23-
import org.eclipse.jnosql.databases.tinkerpop.communication.GraphDatabaseManager;
23+
import org.eclipse.jnosql.databases.tinkerpop.communication.TinkerpopGraphDatabaseManager;
2424
import org.eclipse.jnosql.mapping.core.Converters;
2525
import org.eclipse.jnosql.mapping.metadata.EntitiesMetadata;
2626
import org.eclipse.jnosql.mapping.semistructured.EntityConverter;
@@ -70,14 +70,14 @@ static class ProducerGraphTemplate extends AbstractGraphTemplate {
7070

7171
private final Graph graph;
7272

73-
private final GraphDatabaseManager manager;
73+
private final TinkerpopGraphDatabaseManager manager;
7474

7575
public ProducerGraphTemplate(EntityConverter converter, Graph graph,
7676
EventPersistManager eventManager,
7777
EntitiesMetadata entities, Converters converters) {
7878
this.converter = converter;
7979
this.graph = graph;
80-
this.manager = GraphDatabaseManager.of(graph);
80+
this.manager = TinkerpopGraphDatabaseManager.of(graph);
8181
this.eventManager = eventManager;
8282
this.entities = entities;
8383
this.converters = converters;
@@ -93,7 +93,7 @@ protected EntityConverter converter() {
9393
}
9494

9595
@Override
96-
protected GraphDatabaseManager manager() {
96+
protected TinkerpopGraphDatabaseManager manager() {
9797
return manager;
9898
}
9999

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@
4444
import static org.junit.jupiter.api.Assertions.assertThrows;
4545
import static org.junit.jupiter.api.Assertions.assertTrue;
4646

47-
class DefaultGraphDatabaseManagerTest {
47+
class DefaultTinkerpopGraphDatabaseManagerTest {
4848

4949
public static final String COLLECTION_NAME = "person";
5050

51-
private GraphDatabaseManager entityManager;
51+
private TinkerpopGraphDatabaseManager entityManager;
5252

5353
private final Faker faker = new Faker();
5454

5555
@BeforeEach
5656
void setUp(){
5757
Graph graph = GraphSupplier.INSTANCE.get();
58-
this.entityManager = GraphDatabaseManager.of(graph);
58+
this.entityManager = TinkerpopGraphDatabaseManager.of(graph);
5959
}
6060

6161
@BeforeEach
@@ -76,7 +76,7 @@ void shouldInsertEntity(){
7676
SoftAssertions.assertSoftly(softly -> {
7777
softly.assertThat(communicationEntity.find("name", String.class)).get().isEqualTo(name);
7878
softly.assertThat(communicationEntity.find("age", int.class)).get().isEqualTo(age);
79-
softly.assertThat(communicationEntity.find(DefaultGraphDatabaseManager.ID_PROPERTY)).isPresent();
79+
softly.assertThat(communicationEntity.find(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY)).isPresent();
8080
});
8181
}
8282

@@ -102,11 +102,11 @@ void shouldInsertEntities(){
102102
softly.assertThat(communicationEntities).hasSize(2);
103103
softly.assertThat(communicationEntities.get(0).find("name", String.class)).get().isEqualTo(name);
104104
softly.assertThat(communicationEntities.get(0).find("age", int.class)).get().isEqualTo(age);
105-
softly.assertThat(communicationEntities.get(0).find(DefaultGraphDatabaseManager.ID_PROPERTY)).isPresent();
105+
softly.assertThat(communicationEntities.get(0).find(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY)).isPresent();
106106

107107
softly.assertThat(communicationEntities.get(1).find("name", String.class)).get().isEqualTo(name2);
108108
softly.assertThat(communicationEntities.get(1).find("age", int.class)).get().isEqualTo(age2);
109-
softly.assertThat(communicationEntities.get(1).find(DefaultGraphDatabaseManager.ID_PROPERTY)).isPresent();
109+
softly.assertThat(communicationEntities.get(1).find(DefaultTinkerpopGraphDatabaseManager.ID_PROPERTY)).isPresent();
110110
});
111111

112112
}

0 commit comments

Comments
 (0)