Interface Relationship

All Superinterfaces:
Entity, MapAccessor

public interface Relationship extends Entity
The Relationship interface describes the characteristics of a relationship from a Neo4j graph.
Since:
1.0
  • Method Details

    • startNodeId

      @Deprecated long startNodeId()
      Deprecated.
      superseded by startNodeElementId()
      The id of the node where this relationship starts.

      Please note that depending on server configuration numeric id might not be available and accessing it will result in IllegalStateException.

      Returns:
      the node id
    • startNodeElementId

      String startNodeElementId()
      The id of the node where this relationship starts.
      Returns:
      the node id
    • endNodeId

      @Deprecated long endNodeId()
      Deprecated.
      superseded by endNodeElementId()
      The id of the node where this relationship ends.

      Please note that depending on server configuration numeric id might not be available and accessing it will result in IllegalStateException.

      Returns:
      the node id
    • endNodeElementId

      String endNodeElementId()
      The id of the node where this relationship ends.
      Returns:
      the node id
    • type

      String type()
      Return the type of this relationship.
      Returns:
      the type name
    • hasType

      boolean hasType(String relationshipType)
      Test if this relationship has the given type
      Parameters:
      relationshipType - the give relationship type
      Returns:
      true if this relationship has the given relationship type otherwise false