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

public class GetEntity extends AbstractReadOperation
Base class to retrieve entity information.
  • Constructor Details

    • GetEntity

      public GetEntity(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 entity to retrieve
      asOfTime - (optional) validity time for which to open the datasource
  • Method Details

    • asSummary

      public EntitySummary asSummary() throws RepositoryErrorException
      Retrieve the requested entity as a summary from the XTDB repository.
      Returns:
      EntitySummary as it existed at the specified point in time
      Throws:
      RepositoryErrorException - if any issue closing an open XTDB resource
    • asProxy

      public EntityProxy asProxy() throws RepositoryErrorException
      Retrieve the requested entity as a proxy from the XTDB repository.
      Returns:
      EntityProxy as it existed at the specified point in time
      Throws:
      RepositoryErrorException - if any issue closing an open XTDB resource
    • asDetail

      Retrieve the requested entity as a detailed object from the XTDB repository.
      Returns:
      EntityDetail as it existed at the specified point in time
      Throws:
      RepositoryErrorException - if any issues closing an open XTDB resource
      EntityProxyOnlyException - if the retrieved entity is only a proxy
    • summaryByGuid

      public static EntitySummary summaryByGuid(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String guid)
      Translate the provided Egeria unique identifier into an Egeria entity.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      guid - unique identifier of the Egeria entity
      Returns:
      EntitySummary
    • summaryByRef

      public static EntitySummary summaryByRef(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String ref)
      Translate the provided XTDB document reference into an Egeria entity.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      ref - internal XTDB reference to the entity document
      Returns:
      EntitySummary
    • proxyByGuid

      public static EntityProxy proxyByGuid(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String guid)
      Translate the provided Egeria unique identifier into an Egeria entity.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      guid - unique identifier of the Egeria entity
      Returns:
      EntityProxy
    • proxyByRef

      public static EntityProxy proxyByRef(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String ref)
      Translate the provided XTDB document reference into an Egeria entity.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      ref - internal XTDB reference to the entity document
      Returns:
      EntityProxy
    • detailByGuid

      public static EntityDetail detailByGuid(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String guid) throws EntityProxyOnlyException
      Translate the provided Egeria unique identifier into an Egeria entity.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      guid - unique identifier of the Egeria entity
      Returns:
      EntityDetail
      Throws:
      EntityProxyOnlyException - if the retrieved entity is only a proxy
    • detailByRef

      public static EntityDetail detailByRef(XTDBOMRSRepositoryConnector xtdb, xtdb.api.IXtdbDatasource db, String ref) throws EntityProxyOnlyException
      Translate the provided XTDB document reference into an Egeria entity.
      Parameters:
      xtdb - connectivity to XTDB
      db - from which to retrieve the details
      ref - reference to the entity document
      Returns:
      EntityDetail
      Throws:
      EntityProxyOnlyException - if the retrieved entity is only a proxy