Package javax.jcr.query

Examples of javax.jcr.query.Row


    public Node getNode() throws RepositoryException {
        throw new RepositoryException();
    }

    public Node getNode(String selectorName) throws RepositoryException {
        Row row = getRow(selectorName);
        if (row != null) {
            return row.getNode(selectorName);
        } else {
            return null;
        }
    }
View Full Code Here


    public double getScore() throws RepositoryException {
        throw new RepositoryException();
    }

    public double getScore(String selectorName) throws RepositoryException {
        Row row = getRow(selectorName);
        if (row != null) {
            return row.getScore(selectorName);
        } else {
            return 0.0;
        }
    }
View Full Code Here

     */
    protected void checkValue(RowIterator itr,
                              String propertyName,
                              String expectedValue) throws RepositoryException {
        while (itr.hasNext()) {
            Row row = itr.nextRow();
            // check fullText
            Value value = row.getValue(propertyName);
            if (value == null) {
                fail("Search Test: fails result does not contain value for selected property");
            }
            assertEquals("Value in query result row does not match expected value",
                    expectedValue, value.getString());
View Full Code Here

        );
        forQOMandSQL2(qom, new Callable() {
            public Object call(Query query) throws RepositoryException {
                RowIterator rows = query.execute().getRows();
                assertTrue("empty result", rows.hasNext());
                Row r = rows.nextRow();
                assertEquals("unexpected value", TEST_VALUE, r.getValue(columnName1).getString());
                assertEquals("unexpected value", TEST_VALUE, r.getValue(columnName2).getString());
                return null;
            }
        });
    }
View Full Code Here

        }

        List<String> resultPaths = new ArrayList<String>();
        log.println("result:");
        for (RowIterator it = result.getRows(); it.hasNext();) {
            Row r = it.nextRow();
            StringBuffer aggregatedPaths = new StringBuffer();
            for (int i = 0; i < selectorNames.length; i++) {
                aggregatedPaths.append(getPath(r.getNode(selectorNames[i])));
                aggregatedPaths.append("|");
            }
            resultPaths.add(aggregatedPaths.toString());
            log.println(aggregatedPaths.toString());
        }
View Full Code Here

        }

        Set<String> resultPaths = new HashSet<String>();
        log.println("result:");
        for (RowIterator it = result.getRows(); it.hasNext();) {
            Row r = it.nextRow();
            StringBuffer aggregatedPaths = new StringBuffer();
            for (int i = 0; i < selectorNames.length; i++) {
                aggregatedPaths.append(getPath(r.getNode(selectorNames[i])));
                aggregatedPaths.append("|");
            }
            resultPaths.add(aggregatedPaths.toString());
            log.println(aggregatedPaths.toString());
        }
View Full Code Here

        n.setProperty(propertyName1, TEST_VALUE);
        superuser.save();
    }

    public void testGetValues() throws RepositoryException {
        Row r = getRow();
        Value[] values = r.getValues();
        assertEquals("wrong number of columns", 1, values.length);
        assertEquals("property value does not match", TEST_VALUE, values[0].getString());
    }
View Full Code Here

        assertEquals("wrong number of columns", 1, values.length);
        assertEquals("property value does not match", TEST_VALUE, values[0].getString());
    }

    public void testGetValue() throws RepositoryException {
        Row r = getRow();
        assertEquals("property value does not match", TEST_VALUE, r.getValue(propertyName1).getString());
    }
View Full Code Here

        Row r = getRow();
        assertEquals("property value does not match", TEST_VALUE, r.getValue(propertyName1).getString());
    }

    public void testGetNode() throws RepositoryException {
        Row r = getRow();
        String expectedPath = testRootNode.getNode(nodeName1).getPath();
        assertEquals("unexpected result node", expectedPath, r.getNode().getPath());
    }
View Full Code Here

        String expectedPath = testRootNode.getNode(nodeName1).getPath();
        assertEquals("unexpected result node", expectedPath, r.getNode().getPath());
    }

    public void testGetNodeWithSelector() throws RepositoryException {
        Row r = getRow();
        String expectedPath = testRootNode.getNode(nodeName1).getPath();
        assertEquals("unexpected result node", expectedPath, r.getNode(SELECTOR_NAME).getPath());
    }
View Full Code Here

TOP

Related Classes of javax.jcr.query.Row

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.