Class AbstractReadOperation
java.lang.Object
org.odpi.openmetadata.adapters.repositoryservices.xtdb.repositoryconnector.readops.AbstractReadOperation
- Direct Known Subclasses:
AbstractGraphOperation
,AbstractHistoryOperation
,AbstractSearchOperation
,GetEntity
,GetRelationship
Base class that all read operations should implement.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Date
protected final xtdb.api.IXtdbDatasource
protected final XTDBOMRSRepositoryConnector
-
Constructor Summary
ModifierConstructorDescriptionprotected
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.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. -
Method Summary
Modifier and TypeMethodDescriptionstatic xtdb.api.XtdbDocument
getXtdbObjectByReference
(xtdb.api.IXtdbDatasource db, String reference) Retrieve the requested reference's details from an already-open XTDB datasource.
-
Field Details
-
xtdb
-
asOfTime
-
existingDB
protected final xtdb.api.IXtdbDatasource existingDB
-
-
Constructor Details
-
AbstractReadOperation
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 XTDBasOfTime
- (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 XTDBexistingDB
- 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 detailsreference
- indicating the primary key of the XTDB object to retrieve- Returns:
- XtdbDocument of the object's properties
-