Class CsvExport


  • public class CsvExport
    extends Object
    • Constructor Detail

      • CsvExport

        public CsvExport()
    • 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 file
        rs - 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 file
        rs - the result set that holds the data to export
        baseDR - 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 export
        baseDR - 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
      • exportToFile

        public static void exportToFile​(File outputFile,
                                        String exportString)
        Method to export the export string to the given file
        Parameters:
        outputFile - the ouput file
        exportString - the export string