org.sadun.text.ffp.test
Class DBInsertionListener
java.lang.Object
org.sadun.text.ffp.BaseListener
org.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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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