I've got a multi valued String[]. I need to know whether one of these values matches my search criteria - but I'm not aware, whether it is the first one or it has another place in the array. From your answer I would say, there is no way to match it by a query, I have to supply my own traversal-method.
Am 16.05.2013 um 10:49 schrieb "Seidel. Robert" <[email protected]>: > Hi, > > If you use a multi value string property, you can query for one of the > strings like you did below. If you store an array inside a binary property, > then it will be not queryable. > > If you want to query for an expression inside a string, you can use the > "LIKE" operator and wildcards. > > Regards, Robert > > -----Ursprüngliche Nachricht----- > Von: Ulrich [mailto:[email protected]] > Gesendet: Donnerstag, 16. Mai 2013 10:32 > An: jackrabbit Mailing-List > Betreff: How to setup JQOM-Query testing String-Array > > The list of the supplied comparison-operator does not offer a > "contains"-method (see JCR 2.0 specs chapter 6.7.17). How would I check for > the occurrence of a specific String. > > For a String-value I do it this way: > > valueFactory = session.getValueFactory(); > queryManager = session.getWorkspace().getQueryManager(); > qomf = queryManager.getQOMFactory(); > nodeTypeSelector = qomf.selector(nodeTypeName, selectorName); > operator = qomf.JCR_OPERATOR_EQUAL_TO; > dynOperand = qomf.propertyValue(selectorName, userProperty); > > StaticOperand statOperand = > qomf.literal(valueFactory.createValue(principal)); > Comparison compare = qomf.comparison(dynOperand , operator, > statOperand); > constraint= compare; > > But, again, what can I do about Arrays? > > Regards, > Ulrich > > ________________________________ > > AEB treffen Sie im Juni auf diesen Veranstaltungen: > transport logistic | 4.-7. Juni 2013 | München > EXCHAiNGE | 18.-19. Juni 2013 | Frankfurt am Main > Weitere Informationen und Terminreservierung unter: > www.aeb.de/events<http://logi4.xiti.com/gopc.url?xts=487638&xtor=AD-5-[aeb%20mails]-[link%20in%20mailsignatur]-[intext]-[e-mail-signatur]-[0]-[]&url=http://www.aeb.de/de/events/index.php>
