|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Allows files loaded by TableLoader to be filtered before contents are loaded into the database. Loader filters are listed in the system property net.sf.colle.sql.schema.loaderFilters separated by File.pathSeparator. Each filter can register to maniplate several tables by overriding getTables. If several tables register for the same table they will be each passed each line in the order they are registered As each table is loaded, init() is called to initialize the filter. Then each line's data will be sent to filter(). If the filter wishes to keep the line from being loaded it can do so by not calling the next filter. Equally, the filter may break a line into two lines by calling the next filter twice for each line it receives. The text file may contain more (or fewer) columns than the table they are being loaded into. If this is true, a filter must add or delete columns or the TableLoader will reject the line. All implementations must have a public, no-arguement constructor. Created: 23 Jun 2003
Method Summary | |
void |
filter(List pxLine,
int pnLineCount)
Filters a line of data. |
List |
getTableNames()
Returns a list of strings identifying each table this filter works on. |
void |
init(Table pxTable,
LoaderFilter pxNextFilter,
Connection pxConnection)
Initializes the filter to work on a table. |
Method Detail |
public List getTableNames()
public void init(Table pxTable, LoaderFilter pxNextFilter, Connection pxConnection)
public void filter(List pxLine, int pnLineCount) throws TooFewFieldsException, TooManyFieldsException, ParseException, NumberFormatException, SQLException
pxLine
- list of strings, one for each field in the linepnLineCount
- line number being processed, for error reporting
TooFewFieldsException
TooManyFieldsException
ParseException
NumberFormatException
SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |