Class QueryHelper
java.lang.Object
org.ametys.plugins.repository.query.QueryHelper
Helper for creating JCR XPath queries.
Created XPath queries are like :
Created XPath queries are like :
//element(*, ametys:object)[<predicates<>]-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetXPathQuery(String namePattern, String nodetype, Expression expression) Creates the XPath query corresponding to specifiedExpression.static StringgetXPathQuery(String namePattern, String nodetype, Expression expression, SortCriteria sortCriteria) Creates the XPath query corresponding to specifiedExpressionandSortCriteria.
-
Method Details
-
getXPathQuery
public static String getXPathQuery(String namePattern, String nodetype, Expression expression, SortCriteria sortCriteria) Creates the XPath query corresponding to specifiedExpressionandSortCriteria.- Parameters:
namePattern- a pattern for the name of the resulting nodes. May be null, which is equivalent to '*'nodetype- the base nodetype for the query. May be null, which is equivalent to ametys:objectexpression- the query predicatessortCriteria- criteria for sorting results- Returns:
- the created XPath query
-
getXPathQuery
Creates the XPath query corresponding to specifiedExpression.- Parameters:
namePattern- a pattern for the name of the resulting nodes. May be null, which is equivalent to '*'nodetype- the base nodetype for the query. May be null, which is equivalent to 'ametys:object'expression- the query predicates- Returns:
- the created XPath query
-