Examples of addColumnResult()


Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

        artistResult.addObjectField(Artist.ARTIST_NAME_PROPERTY, "Y");
        artistResult.addObjectField(Artist.DATE_OF_BIRTH_PROPERTY, "Z");

        SQLResult rsMap = new SQLResult();
        rsMap.addEntityResult(artistResult);
        rsMap.addColumnResult("C");
        query.setResult(rsMap);

        List<?> objects = context.performQuery(query);
        assertEquals(4, objects.size());
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

                OpenBaseAdapter.class.getName(),
                "SELECT COUNT(ARTIST_ID) X FROM ARTIST");
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);

        SQLResult rsMap = new SQLResult();
        rsMap.addColumnResult("X");
        query.setResult(rsMap);

        List<?> objects = context.performQuery(query);
        assertEquals(1, objects.size());
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

                OpenBaseAdapter.class.getName(),
                "SELECT COUNT(ARTIST_ID) X, 77 Y FROM ARTIST GROUP BY 77");
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);

        SQLResult rsMap = new SQLResult();
        rsMap.addColumnResult("X");
        rsMap.addColumnResult("Y");
        query.setResult(rsMap);

        List<?> objects = context.performQuery(query);
        assertEquals(1, objects.size());
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

                "SELECT COUNT(ARTIST_ID) X, 77 Y FROM ARTIST GROUP BY 77");
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);

        SQLResult rsMap = new SQLResult();
        rsMap.addColumnResult("X");
        rsMap.addColumnResult("Y");
        query.setResult(rsMap);

        List<?> objects = context.performQuery(query);
        assertEquals(1, objects.size());
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

                OpenBaseAdapter.class.getName(),
                "SELECT COUNT(ARTIST_ID) AS X FROM ARTIST");
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);

        SQLResult rsMap = new SQLResult();
        rsMap.addColumnResult("X");
        query.setResult(rsMap);

        Object object = Cayenne.objectForQuery(context, query);
        assertNotNull(object);
        assertTrue(object instanceof Number);
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

            SQLResult mapping = new SQLResult();

            for (int i = 0; i < resultComponents.size(); i++) {
                Object nextMapping = resultComponents.get(i);
                if (nextMapping instanceof String) {
                    mapping.addColumnResult((String) nextMapping);
                }
                else if (nextMapping instanceof EJBQLExpression) {
                    mapping.addEntityResult(compileEntityResult(
                            (EJBQLExpression) nextMapping,
                            i));
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

            SQLResult mapping = new SQLResult();

            for (int i = 0; i < resultComponents.size(); i++) {
                Object nextMapping = resultComponents.get(i);
                if (nextMapping instanceof String) {
                    mapping.addColumnResult((String) nextMapping);
                }
                else if (nextMapping instanceof EJBQLExpression) {
                    EntityResult compileEntityResult = compileEntityResult(
                            (EJBQLExpression) nextMapping,
                            i);
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

            SQLResult mapping = new SQLResult();

            for (int i = 0; i < resultComponents.size(); i++) {
                Object nextMapping = resultComponents.get(i);
                if (nextMapping instanceof String) {
                    mapping.addColumnResult((String) nextMapping);
                }
                else if (nextMapping instanceof EJBQLExpression) {
                    mapping.addEntityResult(compileEntityResult(
                            (EJBQLExpression) nextMapping,
                            i));
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

        artistResult.addObjectField(Artist.ARTIST_NAME_PROPERTY, "Y");
        artistResult.addObjectField(Artist.DATE_OF_BIRTH_PROPERTY, "Z");

        SQLResult rsMap = new SQLResult();
        rsMap.addEntityResult(artistResult);
        rsMap.addColumnResult("C");
        query.setResult(rsMap);

        List objects = createDataContext().performQuery(query);
        assertEquals(4, objects.size());
View Full Code Here

Examples of org.apache.cayenne.map.SQLResult.addColumnResult()

                OpenBaseAdapter.class.getName(),
                "SELECT COUNT(ARTIST_ID) X FROM ARTIST");
        query.setColumnNamesCapitalization(CapsStrategy.UPPER);

        SQLResult rsMap = new SQLResult();
        rsMap.addColumnResult("X");
        query.setResult(rsMap);

        List objects = createDataContext().performQuery(query);
        assertEquals(1, objects.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.