Package org.apache.torque.task

Examples of org.apache.torque.task.TorqueDataModelTask$TorqueFileResourceLoader


        {
            createCreationScript();
        }

        Project             project    = new Project();
        TorqueDataModelTask modelTask  = new TorqueDataModelTask();
        File                tmpDir     = null;
        File                scriptFile = null;
       
        try
        {
View Full Code Here


     * @throws PlatformException If some error occurred
     */
    public void createCreationScript() throws PlatformException
    {
        Project             project    = new Project();
        TorqueDataModelTask modelTask  = new TorqueDataModelTask();
        File                tmpDir     = null;
        File                scriptFile = null;
       
        _creationScript = null;
        try
        {
            tmpDir = new File(getWorkDir(), "schemas");
            tmpDir.mkdir();

            String includes = writeSchemata(tmpDir);
           
            scriptFile = new File(tmpDir, CREATION_SCRIPT_NAME);

            project.setBasedir(tmpDir.getAbsolutePath());

            // populating with defaults
            modelTask.setProject(project);
            modelTask.setUseClasspath(true);
            modelTask.setControlTemplate("sql/db-init/Control.vm");
            modelTask.setOutputDirectory(tmpDir);
            modelTask.setOutputFile(CREATION_SCRIPT_NAME);
            modelTask.setTargetDatabase(_targetDatabase);

            FileSet files = new FileSet();

            files.setDir(tmpDir);
            files.setIncludes(includes);
            modelTask.addFileset(files);
            modelTask.execute();

            _creationScript = readTextCompressed(scriptFile);

            deleteDir(tmpDir);
        }
View Full Code Here

     * @throws PlatformException If some error occurred
     */
    public void createCreationScript() throws PlatformException
    {
        Project             project    = new Project();
        TorqueDataModelTask modelTask  = new TorqueDataModelTask();
        File                tmpDir     = null;
        File                scriptFile = null;
       
        _creationScript = null;
        try
        {
            tmpDir = new File(getWorkDir(), "schemas");
            tmpDir.mkdir();

            String includes = writeSchemata(tmpDir);
           
            scriptFile = new File(tmpDir, CREATION_SCRIPT_NAME);

            project.setBasedir(tmpDir.getAbsolutePath());

            // populating with defaults
            modelTask.setProject(project);
            modelTask.setUseClasspath(true);
            modelTask.setControlTemplate("sql/db-init/Control.vm");
            modelTask.setOutputDirectory(tmpDir);
            modelTask.setOutputFile(CREATION_SCRIPT_NAME);
            modelTask.setTargetDatabase(_targetDatabase);

            FileSet files = new FileSet();

            files.setDir(tmpDir);
            files.setIncludes(includes);
            modelTask.addFileset(files);
            modelTask.execute();

            _creationScript = readTextCompressed(scriptFile);

            deleteDir(tmpDir);
        }
View Full Code Here

        {
            createCreationScript();
        }

        Project             project    = new Project();
        TorqueDataModelTask modelTask  = new TorqueDataModelTask();
        File                tmpDir     = null;
        File                scriptFile = null;
       
        try
        {
View Full Code Here

TOP

Related Classes of org.apache.torque.task.TorqueDataModelTask$TorqueFileResourceLoader

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.