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, validateRecord
public 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.IOException
public void setFields(java.util.List<FormatField> fields) throws java.io.IOException
FormatWriter
setFields
in class FormatWriter<SQLHeader>
fields
- a Vector of FormatField instancesjava.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void addRecord(java.lang.Object[] record) throws java.io.IOException
FormatWriter
addRecord
in class FormatWriter<SQLHeader>
record
- an Array of object to be written in the output filejava.io.IOException
public FormatField convertGExportFieldDetailsToFormatField(GExportFieldDetails details)
FormatWriter
convertGExportFieldDetailsToFormatField
in class FormatWriter<SQLHeader>
details
- a GExportFieldDetails object