Class RepositorySelectedEntitiesIterator
java.lang.Object
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
org.odpi.openmetadata.commonservices.repositoryhandler.RepositorySelectedEntitiesIterator
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.RepositoryIteratorForEntities
entitiesCache, entityTypeGUID, entityTypeName, limitResultsByClassification, limitResultsByStatus, sequencingPropertyName
Fields inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
effectiveTime, forDuplicateProcessing, forLineage, invalidParameterHandler, MAX_PAGE_SIZE, methodName, pageSize, repositoryHandler, startingFrom, userId
-
Constructor Summary
ConstructorDescriptionRepositorySelectedEntitiesIterator
(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, String searchCriteria, String sequencingPropertyName, List<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, InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, InstanceProperties properties, MatchCriteria matchCriteria, String sequencingPropertyName, List<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
Methods inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
getNext
-
Constructor Details
-
RepositorySelectedEntitiesIterator
public RepositorySelectedEntitiesIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, InstanceProperties properties, MatchCriteria matchCriteria, String sequencingPropertyName, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, 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
- error handler set up with max page sizeuserId
- user making the requestentityTypeGUID
- identifier for the relationship to followproperties
- properties used in the searchmatchCriteria
- all or anysequencingPropertyName
- name of property used to sequence the results - null means no sequencinglimitResultsByStatus
- only return elements that have the requested status (null means all statuseslimitResultsByClassification
- 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 returnedforDuplicateProcessing
- the request 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
- bad parameter - probably page size
-
RepositorySelectedEntitiesIterator
public RepositorySelectedEntitiesIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, String searchCriteria, String sequencingPropertyName, List<InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, 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
- error handler set up with max page sizeuserId
- user making the requestentityTypeGUID
- identifier for the relationship to followsearchCriteria
- value used in the searchsequencingPropertyName
- name of property used to sequence the results - null means no sequencinglimitResultsByStatus
- only return elements that have the requested status (null means all statuseslimitResultsByClassification
- 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 returnedforDuplicateProcessing
- the request 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 for (null for any time, new Date() for now)methodName
- name of calling method- Throws:
InvalidParameterException
- bad parameter - probably page size
-
-
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
-