Package org.apache.cayenne.access.trans

Examples of org.apache.cayenne.access.trans.ProcedureTranslator


     * Returns the ProcedureTranslator to use for this ProcedureAction.
     *
     * @param connection JDBC connection
     */
    protected ProcedureTranslator createTranslator(Connection connection) {
        ProcedureTranslator translator = new ProcedureTranslator();
        translator.setAdapter(getAdapter());
        translator.setQuery(query);
        translator.setEntityResolver(getEntityResolver());
        translator.setConnection(connection);
        translator.setJdbcEventLogger(adapter.getJdbcEventLogger());
        return translator;
    }
View Full Code Here


    @Override
    public void performAction(Connection connection, OperationObserver observer)
            throws SQLException, Exception {

        ProcedureTranslator transl = createTranslator(connection);
        CallableStatement statement = (CallableStatement) transl.createStatement();

        try {
            // stored procedure may contain a mixture of update counts and result sets,
            // and out parameters. Read out parameters first, then
            // iterate until we exhaust all results
View Full Code Here

    public void performAction(Connection connection, OperationObserver observer)
            throws SQLException, Exception {

        processedResultSets = 0;

        ProcedureTranslator transl = createTranslator(connection);
        CallableStatement statement = (CallableStatement) transl.createStatement();

        try {

            // this is one difference with super - we need to read the first result set
            // without calling 'getMoreResults' - which may actually be a good default
View Full Code Here

     * Creates a translator that adds parenthesis to no-param queries.
     */
    // see CAY-750 for the problem description
    @Override
    protected ProcedureTranslator createTranslator(Connection connection) {
        ProcedureTranslator translator = new MySQLProcedureTranslator();
        translator.setAdapter(getAdapter());
        translator.setQuery(query);
        translator.setEntityResolver(getEntityResolver());
        translator.setConnection(connection);
        return translator;
    }
View Full Code Here

     * Creates a translator that adds parenthesis to no-param queries.
     */
    // see CAY-750 for the problem description
    @Override
    protected ProcedureTranslator createTranslator(Connection connection) {
        ProcedureTranslator translator = new PostgresProcedureTranslator();
        translator.setAdapter(getAdapter());
        translator.setQuery(query);
        translator.setEntityResolver(getEntityResolver());
        translator.setConnection(connection);
        return translator;
    }
View Full Code Here

    public SQLAction procedureAction(ProcedureQuery query) {
        return new ProcedureAction(query, adapter, entityResolver) {

            @Override
            protected ProcedureTranslator createTranslator(Connection connection) {
                ProcedureTranslator transl = new HSQLDBProcedureTranslator();
                transl.setAdapter(getAdapter());
                transl.setQuery(query);
                transl.setEntityResolver(getEntityResolver());
                transl.setConnection(connection);
                return transl;
            }
        };
    }
View Full Code Here

    public void performAction(Connection connection, OperationObserver observer)
            throws SQLException, Exception {

        processedResultSets = 0;

        ProcedureTranslator transl = createTranslator(connection);

        CallableStatement statement = (CallableStatement) transl.createStatement();

        try {
            initStatement(statement);
           
            // stored procedure may contain a mixture of update counts and result sets,
View Full Code Here

     * Returns the ProcedureTranslator to use for this ProcedureAction.
     *
     * @param connection JDBC connection
     */
    protected ProcedureTranslator createTranslator(Connection connection) {
        ProcedureTranslator translator = new ProcedureTranslator();
        translator.setAdapter(getAdapter());
        translator.setQuery(query);
        translator.setEntityResolver(getEntityResolver());
        translator.setConnection(connection);
        return translator;
    }
View Full Code Here

    public void performAction(Connection connection, OperationObserver observer)
            throws SQLException, Exception {

        processedResultSets = 0;

        ProcedureTranslator transl = createTranslator(connection);

        CallableStatement statement = (CallableStatement) transl.createStatement();

        try {
            // stored procedure may contain a mixture of update counts and result sets,
            // and out parameters. Read out parameters first, then
            // iterate until we exhaust all results
View Full Code Here

     * Returns the ProcedureTranslator to use for this ProcedureAction.
     *
     * @param connection JDBC connection
     */
    protected ProcedureTranslator createTranslator(Connection connection) {
        ProcedureTranslator translator = new ProcedureTranslator();
        translator.setAdapter(getAdapter());
        translator.setQuery(query);
        translator.setEntityResolver(getEntityResolver());
        translator.setConnection(connection);
        return translator;
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.access.trans.ProcedureTranslator

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.