com.googlecode.jpattern.orm.script
Interface IScriptExecutor

All Known Implementing Classes:
NullScriptExecutor, ScriptExecutor

public interface IScriptExecutor

Author:
Francesco Cina 02/lug/2011 Executes statements from a standard sql script; The script can contain comments using the double hyphen symbol -- only if the comment is the only thing in a row, e.g.: this is valid: insert into TABLE_NAME -- valid comment values (1,2,3); this isn't valid: insert into TABLE_NAME -- NOT valid comment, this can break the parser!! values (1,2,3);

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.
 

Method Detail

execute

void execute(String script)
             throws OrmException
Executes the script and performs a 'commit' at the end of the execution.

Parameters:
script -
Throws:
OrmException

execute

void execute(String script,
             int commitEveryStatements)
             throws OrmException
Executes the script and performs a 'commit' every n statements and at the end of the script.

Parameters:
script -
commitEveryStatements - number of statements to wait before perform a commit.
Throws:
OrmException

execute

void execute(InputStream scriptStream)
             throws IOException,
                    OrmException
Executes the script and performs a 'commit' at the end of the execution.

Parameters:
script -
Throws:
IOException
OrmException

execute

void execute(InputStream scriptStream,
             int commitEveryStatements)
             throws IOException,
                    OrmException
Executes the script and performs a 'commit' every n statements and at the end of the script.

Parameters:
script -
commitEveryStatements - number of statements to wait before perform a commit.
Throws:
IOException
OrmException

execute

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

Parameters:
script -
charset -
Throws:
IOException
OrmException

execute

void execute(InputStream scriptStream,
             Charset charset,
             int commitEveryStatements)
             throws IOException,
                    OrmException
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.

Parameters:
script -
charset -
commitEveryStatements - number of statements to wait before perform a commit.
Throws:
IOException
OrmException


Copyright © 2011. All Rights Reserved.