org.oddjob.sql
Class ScriptParser

java.lang.Object
  extended by org.oddjob.beanbus.AbstractBusComponent<String>
      extended by org.oddjob.sql.ScriptParser
All Implemented Interfaces:
ArooaSessionAware, ServiceProvider, BusServiceProvider, Outbound<String>

public class ScriptParser
extends AbstractBusComponent<String>
implements ArooaSessionAware

Parses SQL from an InputStream into individual statements.

Author:
rob

Constructor Summary
ScriptParser()
           
 
Method Summary
protected  void doProcessing()
           
 String getDelimiter()
          Getter for delimiter.
 SQLJob.DelimiterType getDelimiterType()
          Getter for delimiterType.
 String getEncoding()
          Getter for encoding.
 InputStream getInput()
           
 void go()
           
 boolean isExpandProperties()
          Getter for expandProperties.
 boolean isKeepFormat()
          Getter for keepFormat.
 void setArooaSession(ArooaSession session)
           
 void setDelimiter(String delimiter)
          Setter for delimiter.
 void setDelimiterType(SQLJob.DelimiterType delimiterType)
          Setter for delimiterType.
 void setEncoding(String encoding)
          Setter for encoding.
 void setExpandProperties(boolean expandProperties)
          Setter for exapndProperties.
 void setInput(InputStream input)
           
 void setKeepFormat(boolean keepformat)
          Setter for keepFormat
 void stop()
           
protected  void stopTheBus()
          Implementation override this to perform the action of stopping the bus.
 
Methods inherited from class org.oddjob.beanbus.AbstractBusComponent
accept, getServices, getTo, requestBusStop, setTo, startBus, stopBus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptParser

public ScriptParser()
Method Detail

setArooaSession

public void setArooaSession(ArooaSession session)
Specified by:
setArooaSession in interface ArooaSessionAware

isKeepFormat

public boolean isKeepFormat()
Getter for keepFormat.

Returns:
keepFormat flag.

setKeepFormat

public void setKeepFormat(boolean keepformat)
Setter for keepFormat

Parameters:
keepformat - The keepFormat flag.

isExpandProperties

public boolean isExpandProperties()
Getter for expandProperties.

Returns:
The expandProperties flag.

setExpandProperties

public void setExpandProperties(boolean expandProperties)
Setter for exapndProperties.

Parameters:
expandProperties - The expandProperties flag.

getDelimiterType

public SQLJob.DelimiterType getDelimiterType()
Getter for delimiterType.

Returns:
The delimiterType.

setDelimiterType

public void setDelimiterType(SQLJob.DelimiterType delimiterType)
Setter for delimiterType.

Parameters:
delimiterType - The delimiterType.

getDelimiter

public String getDelimiter()
Getter for delimiter.

Returns:
The delimiter.

setDelimiter

public void setDelimiter(String delimiter)
Setter for delimiter.

Parameters:
delimiter - The delimiter.

getEncoding

public String getEncoding()
Getter for encoding.

Returns:
The encoding.

setEncoding

public void setEncoding(String encoding)
Setter for encoding.

Parameters:
encoding - The encoding.

go

public void go()
        throws BusException,
               IOException
Throws:
BusException
IOException

doProcessing

protected void doProcessing()
                     throws BusException
Throws:
BusException

stopTheBus

protected void stopTheBus()
Description copied from class: AbstractBusComponent
Implementation override this to perform the action of stopping the bus.

Specified by:
stopTheBus in class AbstractBusComponent<String>

stop

public void stop()

getInput

public InputStream getInput()

setInput

public void setInput(InputStream input)