It's all about the answers!

Ask a question

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


Guenther Jornitz (517) | asked Dec 02 '14, 6:21 a.m.
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?

Accepted answer


permanent link
sam detweiler (12.5k6184201) | answered Dec 02 '14, 7:07 a.m.
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

Comments
Guenther Jornitz commented Dec 29 '14, 9:54 a.m.

Perfect...  did resolve my problem.

Your answer


Register or to post your answer.