Daniele Dellafiore wrote:
Today I encounter and solved, searching the mauiling list, some
"escape char" problem in my queries.
Now, I am wondering if there is a common way to build strong queries,
some equivalent of PreparedStatement in JDBC, where you set the
property name and then add values with "addString" and such and the
builder knows how to fill the query.

this is currently not possible. but once JSR 283 is implemented in Jackrabbit you can use parametrized query statements:

QueryManager qm = ....;
String stmt = "//element(*, nt:resource)[jcr:contains(., $exp)]";
Query q = qm.createQuery(stmt, Query.XPath);
q.bindValue("exp", "jackrabbit");
q.execute();

regards
 marcel

Reply via email to