Package com.jbstrap.core.data.export
Class CSVExport
java.lang.Object
com.jbstrap.core.data.DataExporter
com.jbstrap.core.data.export.CSVExport
This class handles the exporting of data into a textual format (CSV Exporting class)
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
FieldsFields inherited from class com.jbstrap.core.data.DataExporter
columnMap, params -
Constructor Summary
ConstructorsConstructorDescriptionCSVExport(Parameters params) Creates a CSVExport instance with the specified export settings (parameters). -
Method Summary
Methods inherited from class com.jbstrap.core.data.DataExporter
addColumnMapping, addColumnMapping, getColumnMapping, getExtension, removeColumnMapping
-
Field Details
-
SEPARATOR
- See Also:
-
-
Constructor Details
-
CSVExport
Creates a CSVExport instance with the specified export settings (parameters). Parameters are described in theExportableinterface.- Parameters:
params- Additional CSVExport parametersParameter name Parameter value Default parameter value Parameter description separator* Char ',' Column separator character
-
-
Method Details
-
start
public boolean start()Starts the CSV export process. TheCSVWriterobject is created and the CSV header is written into the CSV file.- Specified by:
startin classDataExporter- Returns:
- Successful source creation
-
process
Writes the queried records into aCSVWriterobject.- Specified by:
processin classDataExporter- Parameters:
data- Records retrieved using lazy fetch- Returns:
- Successful record processing
-
end
Export completed, no more records to be processed. Closes the created sources and returns them in a byte array.- Specified by:
endin classDataExporter- Returns:
- Export successful
- Throws:
IOException- An exception is thrown while handling a source
-