Class RepositoryIteratorForEntities
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryIteratorForEntities
-
- Direct Known Subclasses:
RepositoryEntitiesIterator,RepositoryFindEntitiesIterator,RepositoryRelatedEntitiesIterator,RepositorySelectedEntitiesIterator
public abstract class RepositoryIteratorForEntities extends Object
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 StringmethodNameprotected intpageSizeprotected RepositoryHandlerrepositoryHandlerprotected StringsequencingPropertyNameprotected intstartingFromprotected StringuserId
-
Constructor Summary
Constructors Constructor Description RepositoryIteratorForEntities(RepositoryHandler repositoryHandler, String userId, String entityTypeGUID, String entityTypeName, String sequencingPropertyName, int startingFrom, int pageSize, 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
-
repositoryHandler
protected RepositoryHandler repositoryHandler
-
userId
protected String userId
-
entityTypeGUID
protected String entityTypeGUID
-
entityTypeName
protected String entityTypeName
-
startingFrom
protected int startingFrom
-
pageSize
protected int pageSize
-
methodName
protected String methodName
-
sequencingPropertyName
protected String sequencingPropertyName
-
entitiesCache
protected List<EntityDetail> entitiesCache
-
-
Constructor Detail
-
RepositoryIteratorForEntities
public RepositoryIteratorForEntities(RepositoryHandler repositoryHandler, String userId, String entityTypeGUID, String entityTypeName, 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 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 sequencingstartingFrom- initial position in the stored list.pageSize- maximum number of definitions to return on this call.methodName- name of calling method
-
-
Method Detail
-
moreToReceive
public abstract 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 EntityDetail getNext() throws UserNotAuthorizedException, PropertyServerException
Return the next entity. 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
-
-