Class ScriptBundleExecutorImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.commons.logging.Log log  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void exec​(boolean logOnly, java.lang.String dir, java.lang.String... scripts)
      Runs a bundle of scripts.
      void exec​(java.lang.String dir, java.lang.String... scripts)
      Runs a bundle of scripts.
      void execWithPostScript​(java.lang.String dir, java.lang.String postScript, java.lang.String... scripts)
      Runs a bundle of scripts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected org.apache.commons.logging.Log log
    • Constructor Detail

      • ScriptBundleExecutorImpl

        public ScriptBundleExecutorImpl​(ScriptExecutor scriptExecutor)
    • Method Detail

      • exec

        public void exec​(boolean logOnly,
                         java.lang.String dir,
                         java.lang.String... scripts)
        Description copied from interface: ScriptBundleExecutor
        Runs a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run.
        Specified by:
        exec in interface ScriptBundleExecutor
        Parameters:
        logOnly - true to catch and log any exceptions or false to rethrow
        dir - Directory where the script bundle may be found.
        scripts - Names of the SQL scripts to run, relative to the specified directory.
      • exec

        public void exec​(java.lang.String dir,
                         java.lang.String... scripts)
        Description copied from interface: ScriptBundleExecutor
        Runs a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run.
        Specified by:
        exec in interface ScriptBundleExecutor
        Parameters:
        dir - Directory where the script bundle may be found.
        scripts - Names of the SQL scripts to run, relative to the specified directory.
      • execWithPostScript

        public void execWithPostScript​(java.lang.String dir,
                                       java.lang.String postScript,
                                       java.lang.String... scripts)
        Description copied from interface: ScriptBundleExecutor
        Runs a bundle of scripts. If any script within the bundle fails, then the rest of the files are not run, with the exception of postScript - which is always run (a clean-up script for example).
        Specified by:
        execWithPostScript in interface ScriptBundleExecutor
        Parameters:
        dir - Directory where the script bundle may be found.
        postScript - A script that is always run after the other scripts.
        scripts - Names of the SQL scripts to run, relative to the specified directory.