Package org.apache.torque.task

Examples of org.apache.torque.task.TorqueSQLExec


            writeCompressedTexts(outputDir, _initScripts);

            project.setBasedir(outputDir.getAbsolutePath());

            // executing the generated sql, but this time with a torque task
            TorqueSQLExec         sqlExec = new TorqueSQLExec();
            TorqueSQLExec.OnError onError = new TorqueSQLExec.OnError();

            sqlExec.setProject(project);
            onError.setValue("continue");
            sqlExec.setAutocommit(true);
            sqlExec.setDriver(_jcd.getDriver());
            sqlExec.setOnerror(onError);
            sqlExec.setUserid(_jcd.getUserName());
            sqlExec.setPassword(_jcd.getPassWord() == null ? "" : _jcd.getPassWord());
            sqlExec.setUrl(getDBManipulationUrl());
            sqlExec.setSrcDir(outputDir.getAbsolutePath());
            sqlExec.setSqlDbMap(SQL_DB_MAP_NAME);
            sqlExec.execute();
           
            deleteDir(outputDir);
        }
        catch (Exception ex)
        {
View Full Code Here


            writeCompressedTexts(outputDir, _initScripts);

            project.setBasedir(outputDir.getAbsolutePath());

            // executing the generated sql, but this time with a torque task
            TorqueSQLExec         sqlExec = new TorqueSQLExec();
            TorqueSQLExec.OnError onError = new TorqueSQLExec.OnError();

            sqlExec.setProject(project);
            onError.setValue("continue");
            sqlExec.setAutocommit(true);
            sqlExec.setDriver(_jcd.getDriver());
            sqlExec.setOnerror(onError);
            sqlExec.setUserid(_jcd.getUserName());
            sqlExec.setPassword(_jcd.getPassWord() == null ? "" : _jcd.getPassWord());
            sqlExec.setUrl(getDBManipulationUrl());
            sqlExec.setSrcDir(outputDir.getAbsolutePath());
            sqlExec.setSqlDbMap(SQL_DB_MAP_NAME);
            sqlExec.execute();
           
            deleteDir(outputDir);
        }
        catch (Exception ex)
        {
View Full Code Here

TOP

Related Classes of org.apache.torque.task.TorqueSQLExec

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.