Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.Column


    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumn() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, propertyName1);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", propertyName1, col.getColumnName());
    }
View Full Code Here


    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumnAllProperties() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, null, null);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertNull("Property name must be null", col.getPropertyName());
        assertNull("Column name must be null", col.getColumnName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumnWithColumnName() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, COLUMN_NAME);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", COLUMN_NAME, col.getColumnName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumnWithSelector() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, COLUMN_NAME);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", COLUMN_NAME, col.getColumnName());
    }
View Full Code Here

    public void testCreateQueryFromSourceWithConstraintOrderingAndColumn() throws RepositoryException {
        Source selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Ordering ordering = qf.ascending(propValue);
        Column column = qf.column(SELECTOR_NAME1, propertyName1, propertyName1);
        QueryObjectModel qom = qf.createQuery(selector, propExist,
                new Ordering[]{ordering}, new Column[]{column});
        assertTrue("Not a selector source", qom.getSource() instanceof Selector);
        assertTrue("Not a property existence constraint", qom.getConstraint() instanceof PropertyExistence);
        assertEquals("Wrong size of orderings", 1, qom.getOrderings().length);
View Full Code Here

            if (c.propertyName == null) {
                for (Selector selector : selectors) {
                    if (c.selectorName == null
                            || c.selectorName
                                    .equals(selector.getSelectorName())) {
                        Column column = factory.column(selector
                                .getSelectorName(), null, null);
                        columns.add(column);
                    }
                }
            } else {
                Column column;
                if (c.selectorName != null) {
                    column = factory.column(c.selectorName, c.propertyName, c.columnName);
                } else if (c.columnName != null) {
                    column = factory.column(getOnlySelectorName(), c.propertyName, c.columnName);
                } else {
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumn() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, propertyName1);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", propertyName1, col.getColumnName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumnAllProperties() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, null, null);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertNull("Property name must be null", col.getPropertyName());
        assertNull("Column name must be null", col.getColumnName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumnWithColumnName() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, COLUMN_NAME);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", COLUMN_NAME, col.getColumnName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#column(String, String, String)}
     */
    public void testColumnWithSelector() throws RepositoryException {
        Column col = qf.column(SELECTOR_NAME1, propertyName1, COLUMN_NAME);
        assertEquals("Wrong selector name", SELECTOR_NAME1, col.getSelectorName());
        assertEquals("Wrong property name", propertyName1, col.getPropertyName());
        assertEquals("Wrong column name", COLUMN_NAME, col.getColumnName());
    }
View Full Code Here

TOP

Related Classes of javax.jcr.query.qom.Column

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.