net.sourceforge.sqlunit.handlers
Class IncludeHandler

java.lang.Object
  extended by net.sourceforge.sqlunit.handlers.IncludeHandler
All Implemented Interfaces:
IHandler

public class IncludeHandler
extends java.lang.Object
implements IHandler

The IncludeHandler reads and executes SQL statements specified in a included file. The format of the include file is a sequence of valid SQL statements (usually updates and inserts) separated by lines containing a single semi-colon (;) or slash (/) character. The semi-colon or slash character must be the first character in the line and the rest of the line must be empty. Alternatively, a line terminated by the semi-colon (;) character can also be used to signal the end of the SQL statement.Comments can appear in the include file as well, and uses the standard -- comment syntax of SQL.

Version:
$Revision: 1.11 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
IncludeHandler()
           
 
Method Summary
 java.lang.Object process(org.jdom.Element elInclude)
          Processes the JDOM Element representing the include tag and runs the SQL statement specified in the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncludeHandler

public IncludeHandler()
Method Detail

process

public final java.lang.Object process(org.jdom.Element elInclude)
                               throws java.lang.Exception
Processes the JDOM Element representing the include tag and runs the SQL statement specified in the file.

Specified by:
process in interface IHandler
Parameters:
elInclude - the JDOM Element representing the include tag.
Returns:
an Object which is the result of processing. Null in this case.
Throws:
java.lang.Exception - if something went wrong processing the include.