Package org.apache.chemistry.opencmis.server.support.query

Examples of org.apache.chemistry.opencmis.server.support.query.ColumnReference


        List<CmisSelector> selects = select.getSelectReferences();
        assertTrue(1 == selects.size());
        // nothing should be in where references
        assertTrue(0 == select.getWhereReferences().size());
        assertTrue(selects.get(0) instanceof ColumnReference);
        ColumnReference colRef = ((ColumnReference)selects.get(0));
        assertEquals("t2", colRef.getTypeQueryName());
        assertEquals("aaa", colRef.getPropertyQueryName());

    }
View Full Code Here


        assertTrue(1 == types.size());
        List<CmisSelector> selects = qo.getSelectReferences();
        assertTrue(2 == selects.size());
        for (CmisSelector select : selects) {
            assertTrue(select instanceof ColumnReference);
            ColumnReference colRef = ((ColumnReference) select);
            assertEquals(bookType, colRef.getTypeDefinition());
            assertTrue(colRef.getPropertyQueryName().equals(TITLE_PROP) || colRef.getPropertyQueryName().equals(AUTHOR_PROP));
        }
    }
View Full Code Here

        Map<String,String> types = qo.getTypes();
        assertTrue(2 == types.size());
        List<CmisSelector> selects = qo.getSelectReferences();
        assertTrue(2 == selects.size());

        ColumnReference colRef = ((ColumnReference) selects.get(0));
        assertEquals(colRef.getTypeDefinition(), bookType);
        assertTrue(colRef.getPropertyQueryName().equals(TITLE_PROP));

        colRef = ((ColumnReference) selects.get(1));
        assertEquals(colRef.getTypeDefinition(), myType);
        assertTrue(colRef.getPropertyQueryName().equals(STRING_PROP));       
    }
View Full Code Here

        Map<String,String> types = qo.getTypes();
        assertTrue(2 == types.size());
        List<CmisSelector> selects = qo.getSelectReferences();
        assertTrue(2 == selects.size());

        ColumnReference colRef = ((ColumnReference) selects.get(0));
        assertEquals(colRef.getTypeDefinition(), bookType);
        assertTrue(colRef.getPropertyQueryName().equals(TITLE_PROP));

        colRef = ((ColumnReference) selects.get(1));
        assertEquals(colRef.getTypeDefinition(), myType);
        assertTrue(colRef.getPropertyQueryName().equals(STRING_PROP));       
    }
View Full Code Here

        QueryObject qo = walker.queryObj;
        Map<String,String> types = qo.getTypes();
        assertTrue(2 == types.size());
        List<CmisSelector> selects = qo.getSelectReferences();
        assertTrue(1 == selects.size());
        ColumnReference colRef = ((ColumnReference) selects.get(0));
        assertEquals(myType, colRef.getTypeDefinition());
        assertTrue(colRef.getPropertyQueryName().equals(STRING_PROP));       
    }
View Full Code Here

        QueryObject qo = walker.queryObj;
        Map<String,String> types = qo.getTypes();
        assertTrue(1 == types.size());
        List<CmisSelector> selects = qo.getSelectReferences();
        assertTrue(1 == selects.size());
        ColumnReference colRef = ((ColumnReference) selects.get(0));
        assertTrue(colRef.getPropertyQueryName().equals("*"));       
        assertEquals(bookType, colRef.getTypeDefinition());
    }
View Full Code Here

        QueryObject qo = walker.queryObj;
        Map<String,String> types = qo.getTypes();
        assertTrue(2 == types.size());
        List<CmisSelector> selects = qo.getSelectReferences();
        assertTrue(1 == selects.size());
        ColumnReference colRef = ((ColumnReference) selects.get(0));
        assertTrue(colRef.getPropertyQueryName().equals("*"));       
        assertEquals(null, colRef.getTypeDefinition());
    }
View Full Code Here

        QueryObject qo = walker.queryObj;
        List<CmisSelector> wheres = qo.getWhereReferences();
        assertTrue(1 == wheres.size());
        for (CmisSelector where : wheres) {
            assertTrue(where instanceof ColumnReference);
            ColumnReference colRef = ((ColumnReference) where);
            assertEquals(colRef.getTypeDefinition(), bookType);
            assertTrue(colRef.getPropertyQueryName().equals(ISBN_PROP));
        }
    }
View Full Code Here

        QueryObject qo = walker.queryObj;
        List<CmisSelector> wheres = qo.getWhereReferences();
        assertTrue(1 == wheres.size());
        for (CmisSelector where : wheres) {
            assertTrue(where instanceof ColumnReference);
            ColumnReference colRef = ((ColumnReference) where);
            assertEquals(colRef.getTypeDefinition(), bookType);
            assertTrue(colRef.getPropertyQueryName().equals(ISBN_PROP));
        }
    }
View Full Code Here

        QueryObject qo = walker.queryObj;
        List<CmisSelector> wheres = qo.getWhereReferences();
        assertTrue(1 == wheres.size());
        for (CmisSelector where : wheres) {
            assertTrue(where instanceof ColumnReference);
            ColumnReference colRef = ((ColumnReference) where);
            assertEquals(colRef.getTypeDefinition(), bookType);
            assertTrue(colRef.getPropertyQueryName().equals(ISBN_PROP));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.server.support.query.ColumnReference

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.