Class RepositoryFindRelationshipsIterator
java.lang.Object
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryFindRelationshipsIterator
RepositoryFindEntitiesIterator is an iterator class for iteratively retrieving relationships 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
effectiveTime, forDuplicateProcessing, forLineage, invalidParameterHandler, MAX_PAGE_SIZE, methodName, pageSize, repositoryHandler, startingFrom, userId
-
Constructor Summary
ConstructorDescriptionRepositoryFindRelationshipsIterator
(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String relationshipTypeGUID, List<String> relationshipSubtypeGUIDs, SearchProperties searchProperties, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Constructor takes the parameters used to call the repository handler. -
Method Summary
Modifier and TypeMethodDescriptiongetNext()
Return the next relationship.boolean
Determine if there is more to receive.
-
Constructor Details
-
RepositoryFindRelationshipsIterator
public RepositoryFindRelationshipsIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String relationshipTypeGUID, List<String> relationshipSubtypeGUIDs, SearchProperties searchProperties, List<InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, SequencingOrder sequencingOrder, int startingFrom, int pageSize, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException Constructor takes the parameters used to call the repository handler.- Parameters:
repositoryHandler
- interface to the open metadata repositories.invalidParameterHandler
- invalid parameter handleruserId
- user making the requestrelationshipTypeGUID
- String unique identifier for the relationship type of interest (null means any relationship type).relationshipSubtypeGUIDs
- optional list of the unique identifiers (guids) for subtypes of the relationshipTypeGUID to include in the search results. Null means all subtypes.searchProperties
- Optional list of relationship property conditions to match.limitResultsByStatus
- By default, entities in all statuses are returned. However, it is possible to specify a list of statuses (eg ACTIVE) to restrict the results to. Null means all status values.asOfTime
- Requests a historical query of the relationship. Null means return the present values.sequencingProperty
- String name of the relationship 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.startingFrom
- initial position in the stored list.pageSize
- maximum number of definitions to return on this call.forLineage
- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing
- the request is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName
- name of calling method- Throws:
InvalidParameterException
- when page size or start from parameters do not meet criteria
-
-
Method Details
-
moreToReceive
Determine if there is more to receive. It will populate the iterator's cache with more content.- Returns:
- boolean flag
- Throws:
UserNotAuthorizedException
- the repository is not allowing the user to access the metadataPropertyServerException
- there is a problem in the repository
-
getNext
Return the next relationship. It returns null if nothing left to retrieve.- Returns:
- relationship or null
- Throws:
UserNotAuthorizedException
- the repository is not allowing the user to access the metadataPropertyServerException
- there is a problem in the repository
-