use of javax.jcr.query.Row in project jackrabbit-oak by apache.
the class HybridIndexClusterIT method queryResult.
private static List<String> queryResult(Session session, String indexedPropName, String value) throws RepositoryException {
session.refresh(false);
QueryManager qm = session.getWorkspace().getQueryManager();
Query q = qm.createQuery("select * from [nt:base] where [" + indexedPropName + "] = $value", Query.JCR_SQL2);
q.bindValue("value", session.getValueFactory().createValue(value));
QueryResult result = q.execute();
List<String> paths = Lists.newArrayList();
for (Row r : JcrUtils.getRows(result)) {
paths.add(r.getPath());
}
return paths;
}
use of javax.jcr.query.Row in project jackrabbit by apache.
the class RowTest method testGetScoreWithSelector.
public void testGetScoreWithSelector() throws RepositoryException {
Row r = getRow();
// value is implementation dependent, simply call method...
r.getScore(SELECTOR_NAME);
}
use of javax.jcr.query.Row in project jackrabbit by apache.
the class RowTest method testGetValue.
public void testGetValue() throws RepositoryException {
Row r = getRow();
assertEquals("property value does not match", TEST_VALUE, r.getValue(propertyName1).getString());
}
use of javax.jcr.query.Row in project jackrabbit by apache.
the class RowTest method testGetScore.
public void testGetScore() throws RepositoryException {
Row r = getRow();
// value is implementation dependent, simply call method...
r.getScore();
}
use of javax.jcr.query.Row in project jackrabbit by apache.
the class RowTest method testGetNodeWithSelector.
public void testGetNodeWithSelector() throws RepositoryException {
Row r = getRow();
String expectedPath = testRootNode.getNode(nodeName1).getPath();
assertEquals("unexpected result node", expectedPath, r.getNode(SELECTOR_NAME).getPath());
}
Aggregations