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 DateeffectiveTimeprotected List<EntityDetail>entitiesCacheprotected StringentityTypeGUIDprotected StringentityTypeNameprotected booleanforDuplicateProcessingprotected booleanforLineageprotected StringmethodNameprotected intpageSizeprotected RepositoryHandlerrepositoryHandlerprotected StringsequencingPropertyNameprotected intstartingFromprotected StringuserId
-
Constructor Summary
Constructors Constructor Description RepositoryIteratorForEntities(RepositoryHandler repositoryHandler, 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
-
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
-
forLineage
protected boolean forLineage
-
forDuplicateProcessing
protected boolean forDuplicateProcessing
-
effectiveTime
protected Date effectiveTime
-
entitiesCache
protected List<EntityDetail> entitiesCache
-
-
Constructor Detail
-
RepositoryIteratorForEntities
public RepositoryIteratorForEntities(RepositoryHandler repositoryHandler, 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.- 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 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
-
-
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
-
-