You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Alexander Klimetschek <ak...@adobe.com> on 2012/08/01 16:23:42 UTC

Re: GQL query for fetching a file node by UUID

On 31.07.2012, at 22:31, Peri Subrahmanya <pe...@gmail.com> wrote:

> I was wondering what the query will look like if I had the UUID of the fileNode to retrieve using GQL.

In Xpath, you can do //*[@jcr:uuid='87b8648b-1fc0-4886-8e16-c439580bcf1f'], and since jackrabbit-jcr-commons GQL translates to an Xpath query internally, you might try:

"jcr:uuid":"87b8648b-1fc0-4886-8e16-c439580bcf1f"

But note that using Session.getNodeByIdentifier(String id) is simpler and faster.

Cheers,
Alex