It's all about the answers!

Ask a question

Where can I find Jazz API Javadoc and more example codes?


Rui Shen (51103) | asked Feb 25 '09, 7:41 a.m.
I know I can get the result of a query defined in Jazz, but I don't know how to get data from qResult. Where can I find Jazz API Javadoc and more example codes? Thanks

IQueryDescriptor iqd = findPersonalQuery("my query", queryClient, repository, projectArea);
IQueryResult<IResult> qResult=queryClient.getQueryResults(iqd);

If possible, can you provide the sample code to retrieve data from the qResult in the above code? Thanks.

2 answers



permanent link
Craig Chaney (9212) | answered Feb 27 '09, 1:08 p.m.
JAZZ DEVELOPER
ilovepumpkin wrote:
I know I can get the result of a query defined in Jazz, but I don't
know how to get data from qResult. Where can I find Jazz API Javadoc
and more example codes? Thanks

I think your best bet is to load the Jazz source into your eclipse
environment. Then you'll be able to see the Javadoc using the tools in
the IDE, and find lots of examples in our code and testcases.

Thanks,
Craig Chaney
Jazz Server team


IQueryDescriptor iqd = findPersonalQuery("my query",
queryClient, repository, projectArea);
IQueryResult<IResult> qResult=queryClient.getQueryResults(iqd);

If possible, can you provide the sample code to retrieve data from the
qResult in the above code? Thanks.

permanent link
Patrick Streule (4.9k21) | answered Feb 27 '09, 1:38 p.m.
JAZZ DEVELOPER
I think your best bet is to load the Jazz source into your eclipse
environment. Then you'll be able to see the Javadoc using the tools in
the IDE, and find lots of examples in our code and testcases.

I agree that looking at how we use the API in our code and tests is
probably the quickest way to get your head around it.

For the specific example, I assume you are querying work items? In this
case, you could use:

IQueryResult<IResolvedResult<IWorkItem>> result=
workItemClient.getQueryClient().getResolvedQueryResults(query,
IWorkItem.SMALL_PROFILE);
while (result.hasNext(monitor)) {
IWorkItem workItem= result.next(monitor).getItem();
....

--
Regards,
Patrick
Jazz Work Item Team

Your answer


Register or to post your answer.