Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get IQueryDescriptor from query UUID (via plain Java API)

I know that I can use the calls findSharedQueries or findPersonalQueries from the IQueryClient class from native Java API to search for a workitem query by name and use the resulting IQueryDescriptor for executing the query..
Is there a way I can directly access a query based on the knowledge of the UUID, i.e. the string seen in the WebClient if executing a query?

0 votes


Accepted answer

Permanent link
you can get the handle to an object from its UUID

IItemHandle handle = itype.ITEM_TYPE.createHandle(UUID.valueOf(uuid_string), null);

itype = IQueryDescriptor or IWorkItem or ...

once you have the handle, you can use one of the item manager methods to get the object.

Guenther Jornitz selected this answer as the correct answer

1 vote

Comments

Perfect...  did resolve my problem.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,951

Question asked: Dec 02 '14, 6:21 a.m.

Question was seen: 2,823 times

Last updated: Dec 29 '14, 9:54 a.m.

Confirmation Cancel Confirm