Package com.adobe.granite.rest.query
Interface QueryTransformer
Defines a service interface which might be asked to transform an arbitrary
string into a valid JCR-SQL2 query.
A custom query language string might be translated from:
SELECT page WHERE dc:description LIKE 'foo%' ORDER BY dc:title
into the corresponding valid JCR-SQL2 query:
SELECT page.* FROM [cq:Page] AS page
INNER JOIN [cq:PageContent] AS child ON ISCHILDNODE(child, page)
WHERE child.[jcr:description] LIKE 'foo' AND ISDESCENDANTNODE(page, [/content])
ORDER BY child.[jcr:title]
-
Method Summary
-
Method Details
-
transform
Transforms the specifiedcustomqueryto a valid JCR-SQL2 query. Thecustomqueryis meant to be applied as the specifiedresourceas the search path.- Parameters:
resource- Resource to search incustomquery- Custom query string- Returns:
- A valid JCR-SQL2 query string
- Throws:
RestException- If an error occurs during transformation
-