Hello fellow Jackrabbit(JCR) Users:
I am building a query constraint for fetching all the nodes whose names does
not contain a string.
So the way I have approached building the constraint was as below:
QueryObjectModelFactory factory =
session.getWorkspace().getQueryManager().getQOMFactory();
ValueFactory valueFactory = session.getValueFactory();
DynamicOperand operand =
factory.lowerCase(factory.nodeName(DEFAULT_SELECTOR_NAME));
Literal literal;
Constraint constraint;
--------------------
--------------------
literal = factory.literal(valueFactory.createValue("%" + "searchVal" + "%"));
constraint = factory.not(factory.comparison(operand,
QueryObjectModelConstants.JCR_OPERATOR_LIKE, literal));
------------------
-----------------
QueryObjectModelFactory factory = queryManager.getQOMFactory();
Selector source = factory.selector(nodeType, selectorName);
Column[] columns = null;
return factory.createQuery(source, constraint, orderings,
columns).execute().getNodes();
This throws the "UnsupportedRepositoryOperationException". Any thoughts please?
Thank you.
Sincerely,
Michael P. Sucena
MEI Software Engineer
610 Old York Rd.
Suite: 250
Jenkintown, PA 19046
Phone: 215-886-5662 x281
Fax: 215-886-5681
[email protected]<mailto:[email protected]>
Have you seen Nervous Pixel, MEI's creative services division?
www.nervouspixel.com<http://www.nervouspixel.com/>
MEI Releases InPorter 3 to Support Cross-Media Publishing
http://www.maned.com/news/pressreleases/051911