Class BaseStreamingRetriever<I,Q,R>
java.lang.Object
com.atlassian.jira.issue.util.streamingretrievers.BaseStreamingRetriever<I,Q,R>
- Type Parameters:
I- The type of entity ids used by this class descendantsQ- The type of parameter that is passed to method getting desired entity idsR- The type of returned entities
- Direct Known Subclasses:
StreamingActionDTORetriever,StreamingChangeItemDTORetriever,StreamingCustomFieldValueDTORetriever,StreamingGenericConfigurationDTORetriever,StreamingIssueDTORetriever,StreamingProjectDTORetriever,StreamingWorklogDTORetriever
This is the base class for DTO streaming retrievers.
The purpose of this class is to provide means to easily return batches of DTOs from database providing
methods for getting desired entity ids and getting batches of entities with given ids from database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEntitiesBatchByIds(List<I> idsBatch) The implementation should return the entities based on provided ids listgetEntityIds(Q queryParam) The implementation should return all the ids of entities which will be then returned in batchesReturns stream of batches ActionDTOs whose bodies contain specified text Note that the returned entities are sorted by the id of the issue they belong to
-
Constructor Details
-
BaseStreamingRetriever
public BaseStreamingRetriever()
-
-
Method Details
-
stream
Returns stream of batches ActionDTOs whose bodies contain specified text Note that the returned entities are sorted by the id of the issue they belong to- Parameters:
queryParam- parameter for the query returning entity ids from the databasebatchSize- size of single entity batch to be returned- Returns:
- stream containing entity batches
-
getEntityIds
The implementation should return all the ids of entities which will be then returned in batches- Parameters:
queryParam- the parameter which is used to find the entities
-
getEntitiesBatchByIds
The implementation should return the entities based on provided ids list- Parameters:
idsBatch- the batch of ids for the entities to be returned
-