Class RepositoryIteratorForEntities
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
-
- org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
-
- Direct Known Subclasses:
RepositoryEntitiesIterator,RepositoryFindEntitiesIterator,RepositoryRelatedEntitiesIterator,RepositorySelectedEntitiesIterator
public abstract class RepositoryIteratorForEntities extends RepositoryIterator
RepositoryIteratorForEntities is the shared interface of all repository helper iterators that retrieve entity details from the repository.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<EntityDetail>entitiesCacheprotected StringentityTypeGUIDprotected StringentityTypeNameprotected StringsequencingPropertyName-
Fields inherited from class org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIterator
effectiveTime, forDuplicateProcessing, forLineage, invalidParameterHandler, MAX_PAGE_SIZE, methodName, pageSize, repositoryHandler, startingFrom, userId
-
-
Constructor Summary
Constructors Constructor Description RepositoryIteratorForEntities(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, String entityTypeName, 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description EntityDetailgetNext()Return the next entity.abstract booleanmoreToReceive()Determine if there is more to receive.
-
-
-
Field Detail
-
entityTypeGUID
protected String entityTypeGUID
-
entityTypeName
protected String entityTypeName
-
sequencingPropertyName
protected String sequencingPropertyName
-
entitiesCache
protected List<EntityDetail> entitiesCache
-
-
Constructor Detail
-
RepositoryIteratorForEntities
public RepositoryIteratorForEntities(RepositoryHandler repositoryHandler, InvalidParameterHandler invalidParameterHandler, String userId, String entityTypeGUID, String entityTypeName, 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 requestentityTypeGUID- identifier for the type of entity to retrieveentityTypeName- name for the type of entity to retrievesequencingPropertyName- name of property used to sequence the results - null means no sequencingforLineage- 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- when page size or start from parameters do not meet criteria
-
-
Method Detail
-
moreToReceive
public abstract boolean moreToReceive() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionDetermine if there is more to receive. It will populate the iterator's cache with more content.- 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
-
getNext
public EntityDetail getNext() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the next entity. It returns null if nothing left to retrieve.- Returns:
- relationship or null
- 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
-
-