IProjectAreaHandle prjAreaHandle = (IProjectAreaHandle)prjArea.getItemHandle();
IQueryClient queryClient = (IQueryClient) repo.getClientLibrary(IQueryClient.class);
IAuditableClient auditableClient = (IAuditableClient) repo.getClientLibrary(IAuditableClient.class);
IQueryableAttributeFactory attFactory = QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE);
IQueryableAttribute typeAttribute =
attFactory.findAttribute(prjAreaHandle, IWorkItem.TYPE_PROPERTY, auditableClient, null);
Expression expression= new AttributeExpression(typeAttribute, AttributeOperation.EQUALS, "Issue");
IQueryResult<IResolvedResult<IWorkItem>> queryResult = queryClient.getResolvedExpressionResults(prjAreaHandle,
expression, IWorkItem.FULL_PROFILE);
System.out.println("# of Query Results: " + queryResult.getResultSize(null).getTotal());
TeamPlatform.shutdown();
쿼리에 관련된 보다 자세한 정보는 https://jazz.net/wiki/bin/view/Main/QueryDevGuide
댓글 없음:
댓글 쓰기