Paul Libbrecht wrote:
Hello XWikiers,
is there an example usage of xwiki.searchDocuments(java.lang.String parametrizedSqlClause, java.util.List parameterValues)
The page: http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples did not contain this.
today I would like to search for a list of documents modified since a given date.
Hi Paul, I found the example right in the javadoc of the function, at: http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwi...) This and all the xwiki java api documentation can be found at http://platform.xwiki.org/xwiki/bin/view/DevGuide/API and I personally find it very useful (especially as it is displayed for each version). As for your query, it should be something like: #set($changed = $xwiki.searchDocuments(" where doc.date < ?",[${afterDate}])) where $afterDate is a java.util.date object (use functions in com.xpn.xwiki.api.Util to create such an object and manipulate it). Happy coding, Anca Luca
thanks in advance
paul ------------------------------------------------------------------------
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs