Class DefaultTinkerpopGraphDatabaseManager

java.lang.Object
org.eclipse.jnosql.databases.tinkerpop.communication.DefaultTinkerpopGraphDatabaseManager
All Implemented Interfaces:
AutoCloseable, Supplier<org.apache.tinkerpop.gremlin.structure.Graph>, org.eclipse.jnosql.communication.graph.GraphDatabaseManager, org.eclipse.jnosql.communication.semistructured.DatabaseManager, TinkerpopGraphDatabaseManager

public class DefaultTinkerpopGraphDatabaseManager extends Object implements TinkerpopGraphDatabaseManager
Default implementation of TinkerpopGraphDatabaseManager that serves as an adapter to the TinkerPop graph database provided by the Apache TinkerPop framework.

This implementation wraps a TinkerPop Graph instance and provides methods to interact with the underlying graph database, execute graph traversals, and perform other graph-related operations.

Note that this implementation does not support certain operations such as insertions with a duration, as indicated by the UnsupportedOperationException thrown by those methods.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    long
    count(String entity)
     
    long
    count(org.eclipse.jnosql.communication.semistructured.SelectQuery query)
     
    void
    delete(org.eclipse.jnosql.communication.semistructured.DeleteQuery query)
     
    <K> void
    deleteEdge(K id)
     
    org.eclipse.jnosql.communication.graph.CommunicationEdge
    edge(org.eclipse.jnosql.communication.semistructured.CommunicationEntity source, String label, org.eclipse.jnosql.communication.semistructured.CommunicationEntity target, Map<String,Object> properties)
     
    <K> Optional<org.eclipse.jnosql.communication.graph.CommunicationEdge>
     
    org.apache.tinkerpop.gremlin.structure.Graph
    get()
     
    Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity>
    insert(Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> entities)
     
    Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity>
    insert(Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> iterable, Duration duration)
     
    org.eclipse.jnosql.communication.semistructured.CommunicationEntity
    insert(org.eclipse.jnosql.communication.semistructured.CommunicationEntity entity)
     
    org.eclipse.jnosql.communication.semistructured.CommunicationEntity
    insert(org.eclipse.jnosql.communication.semistructured.CommunicationEntity entity, Duration duration)
     
     
    void
    remove(org.eclipse.jnosql.communication.semistructured.CommunicationEntity source, String label, org.eclipse.jnosql.communication.semistructured.CommunicationEntity target)
     
    Stream<org.eclipse.jnosql.communication.semistructured.CommunicationEntity>
    select(org.eclipse.jnosql.communication.semistructured.SelectQuery query)
     
    Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity>
    update(Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> entities)
     
    org.eclipse.jnosql.communication.semistructured.CommunicationEntity
    update(org.eclipse.jnosql.communication.semistructured.CommunicationEntity entity)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.jnosql.communication.semistructured.DatabaseManager

    deleteAndCount, exists, prepare, prepare, query, query, selectCursor, singleResult, update
  • Field Details

  • Method Details

    • get

      public org.apache.tinkerpop.gremlin.structure.Graph get()
      Specified by:
      get in interface Supplier<org.apache.tinkerpop.gremlin.structure.Graph>
    • name

      public String name()
      Specified by:
      name in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • insert

      public org.eclipse.jnosql.communication.semistructured.CommunicationEntity insert(org.eclipse.jnosql.communication.semistructured.CommunicationEntity entity)
      Specified by:
      insert in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • insert

      public org.eclipse.jnosql.communication.semistructured.CommunicationEntity insert(org.eclipse.jnosql.communication.semistructured.CommunicationEntity entity, Duration duration)
      Specified by:
      insert in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • insert

      public Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> insert(Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> entities)
      Specified by:
      insert in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • insert

      public Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> insert(Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> iterable, Duration duration)
      Specified by:
      insert in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • update

      public org.eclipse.jnosql.communication.semistructured.CommunicationEntity update(org.eclipse.jnosql.communication.semistructured.CommunicationEntity entity)
      Specified by:
      update in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • update

      public Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> update(Iterable<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> entities)
      Specified by:
      update in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • delete

      public void delete(org.eclipse.jnosql.communication.semistructured.DeleteQuery query)
      Specified by:
      delete in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • select

      public Stream<org.eclipse.jnosql.communication.semistructured.CommunicationEntity> select(org.eclipse.jnosql.communication.semistructured.SelectQuery query)
      Specified by:
      select in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • count

      public long count(String entity)
      Specified by:
      count in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • count

      public long count(org.eclipse.jnosql.communication.semistructured.SelectQuery query)
      Specified by:
      count in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
    • edge

      public org.eclipse.jnosql.communication.graph.CommunicationEdge edge(org.eclipse.jnosql.communication.semistructured.CommunicationEntity source, String label, org.eclipse.jnosql.communication.semistructured.CommunicationEntity target, Map<String,Object> properties)
      Specified by:
      edge in interface org.eclipse.jnosql.communication.graph.GraphDatabaseManager
    • remove

      public void remove(org.eclipse.jnosql.communication.semistructured.CommunicationEntity source, String label, org.eclipse.jnosql.communication.semistructured.CommunicationEntity target)
      Specified by:
      remove in interface org.eclipse.jnosql.communication.graph.GraphDatabaseManager
    • deleteEdge

      public <K> void deleteEdge(K id)
      Specified by:
      deleteEdge in interface org.eclipse.jnosql.communication.graph.GraphDatabaseManager
    • findEdgeById

      public <K> Optional<org.eclipse.jnosql.communication.graph.CommunicationEdge> findEdgeById(K id)
      Specified by:
      findEdgeById in interface org.eclipse.jnosql.communication.graph.GraphDatabaseManager