Copyright (C) 2003,2004 dr. Cristiano Sadun

org.sadun.text.ffp.test
Class DBInsertionListener

java.lang.Object
  extended byorg.sadun.text.ffp.BaseListener
      extended byorg.sadun.text.ffp.test.DBInsertionListener
All Implemented Interfaces:
FlatFileParser.AdvancedListener, FlatFileParser.Listener

public class DBInsertionListener
extends BaseListener
implements FlatFileParser.AdvancedListener

Version:
1.0
Author:
Cristiano Sadun

Constructor Summary
DBInsertionListener(javax.sql.DataSource ds, java.lang.String table)
           
DBInsertionListener(javax.sql.DataSource ds, java.lang.String format, java.lang.String table)
           
 
Method Summary
protected  void onFormatName(LineFormat format, int logicalLineCount, int physicalLineCount, java.lang.String[] values)
          Invoked when a line whose format name matches the name or regexp provided at construction is found.
 void parsingStarted()
          Invoked when the parser has started
 void parsingTerminated(boolean successful)
          Invoked when the parser has terminated
 
Methods inherited from class org.sadun.text.ffp.BaseListener
lineParsed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sadun.text.ffp.FlatFileParser.Listener
lineParsed
 

Constructor Detail

DBInsertionListener

public DBInsertionListener(javax.sql.DataSource ds,
                           java.lang.String table)

DBInsertionListener

public DBInsertionListener(javax.sql.DataSource ds,
                           java.lang.String format,
                           java.lang.String table)
Method Detail

onFormatName

protected void onFormatName(LineFormat format,
                            int logicalLineCount,
                            int physicalLineCount,
                            java.lang.String[] values)
                     throws AbortFFPException
Description copied from class: BaseListener
Invoked when a line whose format name matches the name or regexp provided at construction is found.

Specified by:
onFormatName in class BaseListener
Parameters:
values - the parsed values
Throws:
AbortFFPException

parsingStarted

public void parsingStarted()
                    throws AbortFFPException
Description copied from interface: FlatFileParser.AdvancedListener
Invoked when the parser has started

Specified by:
parsingStarted in interface FlatFileParser.AdvancedListener
Throws:
AbortFFPException

parsingTerminated

public void parsingTerminated(boolean successful)
Description copied from interface: FlatFileParser.AdvancedListener
Invoked when the parser has terminated

Specified by:
parsingTerminated in interface FlatFileParser.AdvancedListener
Parameters:
successful - true if the parsing has been successful

Copyright (C) 2003,2004 dr. Cristiano Sadun