Class RepositoryRelationshipsIterator

java.lang.Object
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryRelationshipsIterator

public class RepositoryRelationshipsIterator extends RepositoryIterator
RepositoryRelationshipsIterator is an iterator class for iteratively retrieving relationships for a starting entity (possibly restricting the type of relationships returned). It is used where the caller needs to filter the results coming from the repository and may need to make more than one call to the repository in order to accumulate the number of requested results. Note this class is intended for a single request's use - it is not thread-safe.
  • Field Summary

    Fields inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator

    MAX_PAGE_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    RepositoryRelationshipsIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, int selectionEnd, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName)
    Constructor takes the parameters used to call the repository handler.
    RepositoryRelationshipsIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail startingEntity, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, int selectionEnd, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName)
    Constructor if entity not already retrieved.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship
    Return the next relationship.
    boolean
    Determine if there is more to receive.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RepositoryRelationshipsIterator

      public RepositoryRelationshipsIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail startingEntity, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, int selectionEnd, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Constructor if entity not already retrieved. It takes the parameters used to call the repository handler.
      Parameters:
      repositoryHandler - interface to the open metadata repositories.
      invalidParameterHandler - invalid parameter handler
      userId - user making the request
      startingEntity - starting entity
      startingEntityTypeName - starting entity's type name
      relationshipTypeGUID - identifier for the relationship to follow
      relationshipTypeName - type name for the relationship to follow
      selectionEnd - 0 means either end, 1 means only take from end 1, 2 means only take from end 2
      limitResultsByStatus - By default, relationships in all statuses (other than DELETE) are returned. However, it is possible to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      sequencingPropertyName - String name of the property that is to be used to sequence the results. Null means do not sequence on a property name (see SequencingOrder).
      sequencingOrder - Enum defining how the results should be ordered.
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - is this retrieve part of duplicate processing?
      startingFrom - initial position in the stored list.
      pageSize - maximum number of definitions to return by this iterator.
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - name of calling method
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - when page size or start from parameters do not meet criteria
    • RepositoryRelationshipsIterator

      public RepositoryRelationshipsIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, int selectionEnd, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException
      Constructor takes the parameters used to call the repository handler.
      Parameters:
      repositoryHandler - interface to the open metadata repositories.
      invalidParameterHandler - invalid parameter handler
      userId - user making the request
      startingEntityGUID - starting entity's GUID
      startingEntityTypeName - starting entity's type name
      relationshipTypeGUID - identifier for the relationship to follow
      relationshipTypeName - type name for the relationship to follow
      selectionEnd - 0 means either end, 1 means only take from end 1, 2 means only take from end 2
      limitResultsByStatus - By default, relationships in all statuses (other than DELETE) are returned. However, it is possible to specify a list of statuses (for example ACTIVE) to restrict the results to. Null means all status values.
      asOfTime - Requests a historical query of the entity. Null means return the present values.
      sequencingPropertyName - String name of the property that is to be used to sequence the results. Null means do not sequence on a property name (see SequencingOrder).
      sequencingOrder - Enum defining how the results should be ordered.
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - is this retrieve part of duplicate processing?
      startingFrom - initial position in the stored list.
      pageSize - maximum number of definitions to return by this iterator.
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - name of calling method
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - when page size or start from parameters do not meet criteria
  • Method Details

    • moreToReceive

      public boolean moreToReceive() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Determine if there is more to receive. It will populate the iterator's cache with more content.
      Returns:
      boolean flag
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad parameter
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the repository is not allowing the user to access the metadata
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem in the repository
    • getNext

      public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getNext() throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException
      Return the next relationship. It returns null if nothing left to retrieve.
      Returns:
      relationship or null
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad parameter
      org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException - the repository is not allowing the user to access the metadata
      org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException - there is a problem in the repository