public class SQLWriter extends FormatWriter<SQLHeader>
appendFile| Constructor and Description |
|---|
SQLWriter(java.io.File dataBaseFile,
java.lang.String table,
boolean appendTable)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRecord(java.lang.Object[] record)
This method writes a record in the output file.
|
void |
close() |
FormatField |
convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
This method generates the appropriate FormatField given a GExportFieldDetails instance.
|
void |
setFields(java.util.List<FormatField> fields)
This method sets the fields in the header.
|
createFormatWriter, getFilename, getHeader, setFields, setFormatHeader, validateRecordpublic SQLWriter(java.io.File dataBaseFile,
java.lang.String table,
boolean appendTable)
throws java.io.IOException
dataBaseFile - the file that represents the databasetable - the table in which the data are to be writtenappendTable - a boolean, with true meaning that the new record is appended to previous recordjava.io.IOExceptionpublic void setFields(java.util.List<FormatField> fields) throws java.io.IOException
FormatWritersetFields in class FormatWriter<SQLHeader>fields - a Vector of FormatField instancesjava.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void addRecord(java.lang.Object[] record)
throws java.io.IOException
FormatWriteraddRecord in class FormatWriter<SQLHeader>record - an Array of object to be written in the output filejava.io.IOExceptionpublic FormatField convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
FormatWriterconvertGExportFieldDetailsToFormatField in class FormatWriter<SQLHeader>details - a GExportFieldDetails object