java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.readops.AbstractReadOperation
Direct Known Subclasses:
AbstractGraphOperation, AbstractHistoryOperation, AbstractSearchOperation, GetEntity, GetRelationship

public abstract class AbstractReadOperation extends Object
Base class that all read operations should implement.
  • Field Details

    • xtdb

      protected final XTDBOMRSRepositoryConnector xtdb
    • asOfTime

      protected final Date asOfTime
    • existingDB

      protected final xtdb.api.IXtdbDatasource existingDB
  • Constructor Details

    • AbstractReadOperation

      protected AbstractReadOperation(XTDBOMRSRepositoryConnector xtdb, 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
      asOfTime - (optional) validity time for which to open the datasource
    • AbstractReadOperation

      protected AbstractReadOperation(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource existingDB)
      Alternative constructor to use if an existing datasource is already open that we want to re-use for this operation.
      Parameters:
      xtdb - connectivity to XTDB
      existingDB - already-opened datasource to re-use
  • Method Details

    • getXtdbObjectByReference

      public static xtdb.api.XtdbDocument getXtdbObjectByReference(xtdb.api.IXtdbDatasource db, String reference)
      Retrieve the requested reference's details from an already-open XTDB datasource.
      Parameters:
      db - from which to retrieve the details
      reference - indicating the primary key of the XTDB object to retrieve
      Returns:
      XtdbDocument of the object's properties