Class RepositoryRelatedEntitiesIterator
java.lang.Object
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryRelatedEntitiesIterator
RepositoryRelatedEntitiesIterator is an iterator class for iteratively retrieving relationships for a starting entity (possibly restricting
the type of relationships returned) and returning the entity at the other end. 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.RepositoryIteratorForEntities
entitiesCache, entityTypeGUID, entityTypeName, limitResultsByClassification, limitResultsByStatus, sequencingPropertyName
Fields inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
asOfTime, effectiveTime, forDuplicateProcessing, forLineage, invalidParameterHandler, MAX_PAGE_SIZE, methodName, pageSize, repositoryHandler, sequencingOrder, startingFrom, userId
-
Constructor Summary
ConstructorDescriptionRepositoryRelatedEntitiesIterator
(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, List<InstanceStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, int selectionEnd, Date effectiveTime, String methodName) Constructor takes the parameters used to call the repository handler.RepositoryRelatedEntitiesIterator
(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, List<InstanceStatus> limitResultsByStatus, Date asOfTime, 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. -
Method Summary
Methods inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
getNext
-
Constructor Details
-
RepositoryRelatedEntitiesIterator
public RepositoryRelatedEntitiesIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, List<InstanceStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, 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 requeststartingEntityGUID
- starting entity's GUIDstartingEntityTypeName
- starting entity's type namerelationshipTypeGUID
- identifier for the relationship to followrelationshipTypeName
- type name for the relationship to followlimitResultsByStatus
- 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 query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicatestartingFrom
- 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 formethodName
- name of calling method- Throws:
InvalidParameterException
- when page size or start from parameters do not meet criteria
-
RepositoryRelatedEntitiesIterator
public RepositoryRelatedEntitiesIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, List<InstanceStatus> limitResultsByStatus, Date asOfTime, SequencingOrder sequencingOrder, String sequencingPropertyName, boolean forLineage, boolean forDuplicateProcessing, int startingFrom, int pageSize, int selectionEnd, 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 requeststartingEntityGUID
- starting entity's GUIDstartingEntityTypeName
- starting entity's type namerelationshipTypeGUID
- identifier for the relationship to followrelationshipTypeName
- type name for the relationship to followlimitResultsByStatus
- 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 query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicatestartingFrom
- initial position in the stored list.pageSize
- maximum number of definitions to return on this call.selectionEnd
- 0 means either end, 1 means only take from end 1, 2 means only take from end 2effectiveTime
- the time that the retrieved elements must be effective formethodName
- name of calling method- Throws:
InvalidParameterException
- the bean properties are invalid
-
-
Method Details
-
moreToReceive
public boolean moreToReceive() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionDetermine if there is more to receive. It will populate the iterator's cache with more content.- Specified by:
moreToReceive
in classRepositoryIteratorForEntities
- Returns:
- boolean flag
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- the repository is not allowing the user to access the metadataPropertyServerException
- there is a problem in the repository
-