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 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 Details
-
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
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
-