Class QueryHelper
- java.lang.Object
-
- org.ametys.plugins.repository.query.QueryHelper
-
public final class QueryHelper extends Object
Helper for creating JCR XPath queries.
Created XPath queries are like ://element(*, ametys:object)[<predicates<>]
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getXPathQuery(String namePattern, String nodetype, Expression expression)
Creates the XPath query corresponding to specifiedExpression
.static String
getXPathQuery(String namePattern, String nodetype, Expression expression, SortCriteria sortCriteria)
Creates the XPath query corresponding to specifiedExpression
andSortCriteria
.
-
-
-
Method Detail
-
getXPathQuery
public static String getXPathQuery(String namePattern, String nodetype, Expression expression, SortCriteria sortCriteria)
Creates the XPath query corresponding to specifiedExpression
andSortCriteria
.- 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
public static String getXPathQuery(String namePattern, String nodetype, Expression expression)
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
-
-