Class RepositorySelectedEntitiesIterator


public class RepositorySelectedEntitiesIterator extends RepositoryIteratorForEntities
RepositorySelectedEntitiesIterator is an iterator class for iteratively retrieving entities based on a search criteria. 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
    RepositorySelectedEntitiesIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, String searchCriteria, String sequencingPropertyName, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName)
    Constructor takes the parameters used to call the repository handler.
    RepositorySelectedEntitiesIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties properties, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.MatchCriteria matchCriteria, String sequencingPropertyName, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName)
    Constructor takes the parameters used to call the repository handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine if there is more to receive.

    Methods inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities

    getNext

    Methods inherited from class java.lang.Object

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

    • RepositorySelectedEntitiesIterator

      public RepositorySelectedEntitiesIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties properties, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.MatchCriteria matchCriteria, String sequencingPropertyName, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, 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 - error handler set up with max page size
      userId - user making the request
      entityTypeGUID - identifier for the relationship to follow
      properties - properties used in the search
      matchCriteria - all or any
      sequencingPropertyName - name of property used to sequence the results - null means no sequencing
      limitResultsByStatus - only return elements that have the requested status (null means all statuses
      limitResultsByClassification - only return elements that have the requested classification(s)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      startingFrom - initial position in the stored list.
      pageSize - maximum number of definitions to return on this call.
      effectiveTime - the time that the retrieved elements must be effective for
      methodName - name of calling method
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad parameter - probably page size
    • RepositorySelectedEntitiesIterator

      public RepositorySelectedEntitiesIterator(RepositoryHandler repositoryHandler, org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, String searchCriteria, String sequencingPropertyName, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, 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 - error handler set up with max page size
      userId - user making the request
      entityTypeGUID - identifier for the relationship to follow
      searchCriteria - value used in the search
      sequencingPropertyName - name of property used to sequence the results - null means no sequencing
      limitResultsByStatus - only return elements that have the requested status (null means all statuses
      limitResultsByClassification - only return elements that have the requested classification(s)
      forLineage - the request is to support lineage retrieval this means entities with the Memento classification can be returned
      forDuplicateProcessing - the request is for duplicate processing and so must not deduplicate
      startingFrom - initial position in the stored list.
      pageSize - maximum number of definitions to return on this call.
      effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
      methodName - name of calling method
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - bad parameter - probably page size
  • 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.
      Specified by:
      moreToReceive in class RepositoryIteratorForEntities
      Returns:
      boolean flag
      Throws:
      org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException - the bean properties are invalid
      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