java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.readops.AbstractReadOperation
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.readops.GetRelationship

public class GetRelationship extends AbstractReadOperation
Base class to retrieve relationship information.
  • Constructor Details

    • GetRelationship

      public GetRelationship(XTDBOMRSRepositoryConnector xtdb, String guid, Date asOfTime)
      Default constructor ensures that a consistent datasource is created and used for the entirety of the operation, and further ensures it is fully-closed afterwards irrespective of any exceptions.
      Parameters:
      xtdb - connectivity to XTDB
      guid - of the relationship to retrieve
      asOfTime - (optional) validity time for which to open the datasource
  • Method Details

    • execute

      public Relationship execute() throws RepositoryErrorException
      Retrieve the requested relationship from the XTDB repository.
      Returns:
      Relationship as it existed at the specified point in time
      Throws:
      RepositoryErrorException - if any issue closing an open XTDB resource
    • byRef

      public static Relationship byRef(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String ref)
      Translate the provided XTDB document reference into an Egeria relationship.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      ref - reference to the relationship document
      Returns:
      Relationship