Package com.basiscomponents.db.export
Class CsvExport
- java.lang.Object
-
- com.basiscomponents.db.export.CsvExport
-
public class CsvExport extends Object
-
-
Constructor Summary
Constructors Constructor Description CsvExport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringbuildExportString(ResultSet rs)Method to build the CSV export Stringstatic StringbuildExportString(ResultSet rs, DataRow baseDR, boolean useLabel)Method to build the CSV export Stringstatic voidexportToCSV(File outputFile, ResultSet rs)Method to export a result set to a CSV filestatic voidexportToCSV(File outputFile, ResultSet rs, DataRow baseDR, boolean useLabel)Method to export a result set to a CSV filestatic voidexportToFile(File outputFile, String exportString)Method to export the export string to the given file
-
-
-
Method Detail
-
exportToCSV
public static void exportToCSV(File outputFile, ResultSet rs)
Method to export a result set to a CSV file- Parameters:
outputFile- the ouput filers- the result set that holds the data to export
-
buildExportString
public static String buildExportString(ResultSet rs)
Method to build the CSV export String- Parameters:
rs- the result set that holds the data to export
-
exportToCSV
public static void exportToCSV(File outputFile, ResultSet rs, DataRow baseDR, boolean useLabel)
Method to export a result set to a CSV file- Parameters:
outputFile- the ouput filers- the result set that holds the data to exportbaseDR- the data row, that holds the column sequence and the column labels (if available)useLabel- indicates if the label instead of the field name should be used
-
buildExportString
public static String buildExportString(ResultSet rs, DataRow baseDR, boolean useLabel)
Method to build the CSV export String- Parameters:
rs- the result set that holds the data to exportbaseDR- the data row, that holds the column sequence and the column labels (if available)useLabel- indicates if the label instead of the field name should be used
-
-