What parameters are needed to instantiate an ItemQueryIterator object
![]()
As part of an Asynchronous Task, I need to get a list of Project Areas so I use the code snippet below:
private List<IProjectAreaHandle> findProjectAreas(IProgressMonitor monitor) throws TeamRepositoryException {
IItemType itemType= IProjectArea.ITEM_TYPE;
IDynamicQueryModel model= itemType.getQueryModel();
IItemQuery query= IItemQuery.FACTORY.newInstance((IItemQueryModel) model);
IQueryService queryService = getService(IQueryService.class);
ItemQueryIterator<IProjectAreaHandle> iterator= new ItemQueryIterator<IProjectAreaHandle>(queryService, query, parameters );
return iterator.getAllItems();
}
When instantiating ItemQueryIterator, one of the parameters is an Object array called parameters. What values do I use for this array? Can you point me to documentation that would answer this question?
|
2 answers
![]()
Found the constant IQueryService.EMPTY_PARAMETERS
I used it for the parameters parameter and it worked.
|