Class RepositoryRelatedEntitiesIterator
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
-
- org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryRelatedEntitiesIterator
-
public class RepositoryRelatedEntitiesIterator extends RepositoryIteratorForEntities
RepositoryRelatedEntitiesIterator is an iterator class for iteratively retrieving relationships for an 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, methodName, pageSize, repositoryHandler, sequencingPropertyName, startingFrom, userId
-
-
Constructor Summary
Constructors Constructor Description RepositoryRelatedEntitiesIterator(RepositoryHandler repositoryHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, String sequencingPropertyName, int startingFrom, int pageSize, int selectionEnd, String methodName)Constructor takes the parameters used to call the repository handler.RepositoryRelatedEntitiesIterator(RepositoryHandler repositoryHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, String sequencingPropertyName, int startingFrom, int pageSize, 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 booleanmoreToReceive()Determine if there is more to receive.-
Methods inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
getNext
-
-
-
-
Constructor Detail
-
RepositoryRelatedEntitiesIterator
public RepositoryRelatedEntitiesIterator(RepositoryHandler repositoryHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, String sequencingPropertyName, int startingFrom, int pageSize, String methodName)
Constructor takes the parameters used to call the repository handler.- Parameters:
repositoryHandler- interface to the open metadata repositories.userId- 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 followsequencingPropertyName- name of property used to sequence the results - null means no sequencingstartingFrom- initial position in the stored list.pageSize- maximum number of definitions to return on this call.methodName- name of calling method
-
RepositoryRelatedEntitiesIterator
public RepositoryRelatedEntitiesIterator(RepositoryHandler repositoryHandler, String userId, String startingEntityGUID, String startingEntityTypeName, String relationshipTypeGUID, String relationshipTypeName, String sequencingPropertyName, int startingFrom, int pageSize, int selectionEnd, String methodName)
Constructor takes the parameters used to call the repository handler.- Parameters:
repositoryHandler- interface to the open metadata repositories.userId- 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 followsequencingPropertyName- name of property used to sequence the results - null means no sequencingstartingFrom- 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 2methodName- name of calling method
-
-
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.- Specified by:
moreToReceivein classRepositoryIteratorForEntities- Returns:
- boolean flag
- Throws:
UserNotAuthorizedException- the repository is not allowing the user to access the metadataPropertyServerException- there is a problem in the repository
-
-