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
effectiveTime, forDuplicateProcessing, invalidParameterHandler, MAX_PAGE_SIZE, methodName, pageSize, repositoryHandler, startingFrom, userId
-
-
Constructor Summary
Constructors Constructor Description RepositoryRelationshipsIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, boolean forDuplicateProcessing, int startingFrom, int pageSize, Date effectiveTime, String methodName)Constructor takes the parameters used to call the repository handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelationshipgetNext()Return the next relationship.booleanmoreToReceive()Determine if there is more to receive.
-
-
-
Constructor Detail
-
RepositoryRelationshipsIterator
public RepositoryRelationshipsIterator(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, 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 followforDuplicateProcessing- 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 formethodName- name of calling method- Throws:
InvalidParameterException- when page size or start from parameters do not meet criteria
-
-
Method Detail
-
moreToReceive
public boolean moreToReceive() throws UserNotAuthorizedException, PropertyServerExceptionDetermine 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
public Relationship getNext() throws UserNotAuthorizedException, PropertyServerException
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
-
-