com.googlecode.jpattern.orm.script
Class ScriptExecutor

java.lang.Object
  extended by com.googlecode.jpattern.orm.script.ScriptExecutor
All Implemented Interfaces:
IScriptExecutor

public class ScriptExecutor
extends Object
implements IScriptExecutor

Author:
Francesco Cina 02/lug/2011

Constructor Summary
ScriptExecutor(ISessionSqlPerformer session)
           
 
Method Summary
 void execute(InputStream scriptStream)
          Executes the script and performs a 'commit' at the end of the execution.
 void execute(InputStream scriptStream, Charset charset)
          Executes the script and performs a 'commit' at the end of the execution.
 void execute(InputStream scriptStream, Charset charset, int commitEveryStatements)
          Executes the script and performs a 'commit' every n statements and at the end of the script.
 void execute(InputStream scriptStream, int commitEveryStatements)
          Executes the script and performs a 'commit' every n statements and at the end of the script.
 void execute(String script)
          Executes the script and performs a 'commit' at the end of the execution.
 void execute(String script, int commitEveryStatements)
          Executes the script and performs a 'commit' every n statements and at the end of the script.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptExecutor

public ScriptExecutor(ISessionSqlPerformer session)
Method Detail

execute

public void execute(String script)
             throws OrmException
Description copied from interface: IScriptExecutor
Executes the script and performs a 'commit' at the end of the execution.

Specified by:
execute in interface IScriptExecutor
Throws:
OrmException

execute

public void execute(String script,
                    int commitEveryStatements)
             throws OrmException
Description copied from interface: IScriptExecutor
Executes the script and performs a 'commit' every n statements and at the end of the script.

Specified by:
execute in interface IScriptExecutor
commitEveryStatements - number of statements to wait before perform a commit.
Throws:
OrmException

execute

public void execute(InputStream scriptStream)
             throws IOException,
                    OrmException
Description copied from interface: IScriptExecutor
Executes the script and performs a 'commit' at the end of the execution.

Specified by:
execute in interface IScriptExecutor
Throws:
IOException
OrmException

execute

public void execute(InputStream scriptStream,
                    int commitEveryStatements)
             throws IOException,
                    OrmException
Description copied from interface: IScriptExecutor
Executes the script and performs a 'commit' every n statements and at the end of the script.

Specified by:
execute in interface IScriptExecutor
commitEveryStatements - number of statements to wait before perform a commit.
Throws:
IOException
OrmException

execute

public void execute(InputStream scriptStream,
                    Charset charset)
             throws IOException,
                    OrmException
Description copied from interface: IScriptExecutor
Executes the script and performs a 'commit' at the end of the execution. The passed Charset will be used to read the stream.

Specified by:
execute in interface IScriptExecutor
Throws:
IOException
OrmException

execute

public void execute(InputStream scriptStream,
                    Charset charset,
                    int commitEveryStatements)
             throws IOException,
                    OrmException
Description copied from interface: IScriptExecutor
Executes the script and performs a 'commit' every n statements and at the end of the script. The passed Charset will be used to read the stream.

Specified by:
execute in interface IScriptExecutor
commitEveryStatements - number of statements to wait before perform a commit.
Throws:
IOException
OrmException


Copyright © 2011. All Rights Reserved.