Class GetRelationshipsForEntity


  • public class GetRelationshipsForEntity
    extends AbstractRelationshipSearchOperation
    Implements the 'getRelationshipsForEntity' operation of the OMRS metadata collection interface.
    • Constructor Detail

      • GetRelationshipsForEntity

        public GetRelationshipsForEntity​(XtdbOMRSRepositoryConnector xtdb,
                                         String entityGUID,
                                         String relationshipTypeGUID,
                                         int fromRelationshipElement,
                                         List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus,
                                         xtdb.api.IXtdbDatasource existingDB,
                                         String sequencingProperty,
                                         org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder,
                                         int pageSize,
                                         String userId)
        Create a new 'getRelationshipsForEntity' executable.
        Parameters:
        xtdb - connectivity to XTDB
        entityGUID - of the entity for which to find relationships
        relationshipTypeGUID - to limit the relationship types to retrieve (optional)
        fromRelationshipElement - starting element for paging
        limitResultsByStatus - by which to limit results (optional)
        existingDB - already-opened datasource against which to do the retrievals
        sequencingProperty - by which to order the results (required if sequencingOrder involves a property)
        sequencingOrder - by which to order results (optional, will default to GUID)
        pageSize - maximum number of results per page
        userId - of the user running the query
    • Method Detail

      • runQuery

        protected Collection<List<?>> runQuery​(xtdb.api.IXtdbDatasource db)
                                        throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException,
                                               org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
        Interface that must be implemented to actually execute the query logic.
        Specified by:
        runQuery in class AbstractSearchOperation
        Parameters:
        db - the datasource against which to run the query
        Returns:
        Collection<List<?>> of internal XT references (IDs) that match the query
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException - if a requested type for searching is not known to the repository
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - if there is any issue iterating through the results