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
Fields inherited from class com.jbstrap.core.data.DataExporter
columnMap, params
-
Constructor Summary
ConstructorDescriptionCSVExport
(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 theExportable
interface.- 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. TheCSVWriter
object is created and the CSV header is written into the CSV file.- Specified by:
start
in classDataExporter
- Returns:
- Successful source creation
-
process
Writes the queried records into aCSVWriter
object.- Specified by:
process
in 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:
end
in classDataExporter
- Returns:
- Export successful
- Throws:
IOException
- An exception is thrown while handling a source
-