Package org.apache.cayenne.query

Examples of org.apache.cayenne.query.SQLResultSetMapping


        }

        private void addResultSetColumn() {
            if (appendingResultColumns) {
                if (resultSetMapping == null) {
                    resultSetMapping = new SQLResultSetMapping();
                }

                String column = "sc" + resultSetMapping.getColumnResults().size();
                resultSetMapping.addColumnResult(column);
            }
View Full Code Here


            }
        }
    }

    private boolean interceptMappedConversion() {
        SQLResultSetMapping rsMapping = metadata.getResultSetMapping();

        if (rsMapping == null) {
            return !DONE;
        }

        List mainRows = response.firstList();
        if (mainRows != null && !mainRows.isEmpty()) {

            Collection columns = rsMapping.getColumnResults();
            if (columns.isEmpty()) {
                throw new CayenneRuntimeException(
                        "Invalid result set mapping, no columns mapped.");
            }
View Full Code Here

    /**
     * Returns a positional column alias, incrementing position index on each call.
     */
    String nextColumnAlias() {

        SQLResultSetMapping resultSetMapping = compiledExpression.getResultSetMapping();
        if (resultSetMapping == null) {
            throw new EJBQLException(
                    "No result set mapping exists for expression, can't map column aliases");
        }

        return (String) resultSetMapping.getColumnResults().get(columnAliasPosition++);
    }
View Full Code Here

            }
        }
    }

    private boolean interceptMappedConversion() {
        SQLResultSetMapping rsMapping = metadata.getResultSetMapping();

        if (rsMapping == null) {
            return !DONE;
        }

        List mainRows = response.firstList();
        if (mainRows != null && !mainRows.isEmpty()) {

            Collection columns = rsMapping.getColumnResults();
            if (columns.isEmpty()) {
                throw new CayenneRuntimeException(
                        "Invalid result set mapping, no columns mapped.");
            }
View Full Code Here

        }

        private void addResultSetColumn() {
            if (appendingResultColumns) {
                if (resultSetMapping == null) {
                    resultSetMapping = new SQLResultSetMapping();
                }

                String column = "sc" + resultSetMapping.getColumnResults().size();
                resultSetMapping.addColumnResult(column);
            }
View Full Code Here

    /**
     * Returns a positional column alias, incrementing position index on each call.
     */
    String nextColumnAlias() {

        SQLResultSetMapping resultSetMapping = compiledExpression.getResultSetMapping();
        if (resultSetMapping == null) {
            throw new EJBQLException(
                    "No result set mapping exists for expression, can't map column aliases");
        }

        return (String) resultSetMapping.getColumnResults().get(columnAliasPosition++);
    }
View Full Code Here

            return false;
        }

        private void addResultSetColumn() {
            if (resultSetMapping == null) {
                resultSetMapping = new SQLResultSetMapping();
            }

            String column = "sc" + resultSetMapping.getColumnResults().size();
            resultSetMapping.addColumnResult(column);
        }
View Full Code Here

            }
        }
    }

    private boolean interceptMappedConversion() {
        SQLResultSetMapping rsMapping = metadata.getResultSetMapping();

        if (rsMapping == null) {
            return !DONE;
        }

        List mainRows = response.firstList();
        if (mainRows != null && !mainRows.isEmpty()) {

            Collection columns = rsMapping.getColumnResults();
            if (columns.isEmpty()) {
                throw new CayenneRuntimeException(
                        "Invalid result set mapping, no columns mapped.");
            }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.query.SQLResultSetMapping

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.