Package microsim.data

Class DataExport


  • public class DataExport
    extends java.lang.Object
    DataExport is a class that handles the exporting to data to an output database and/or .csv files. Note that only numbers, enums or strings are exported to .csv files.
    Author:
    Ross Richardson
    • Constructor Summary

      Constructors 
      Constructor Description
      DataExport​(java.lang.Object targetSingleObject, boolean exportToDatabase, boolean exportToCSVfile)
      Create a DataExport object to handle the exporting of an object to an output database and/or .csv files.
      DataExport​(java.util.Collection<?> targetCollection, boolean exportToDatabase, boolean exportToCSVfile)
      Create a DataExport object to handle the exporting of a collection of objects to an output database and/or .csv files.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void export()
      Export the values of the fields.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataExport

        public DataExport​(java.util.Collection<?> targetCollection,
                          boolean exportToDatabase,
                          boolean exportToCSVfile)
        Create a DataExport object to handle the exporting of a collection of objects to an output database and/or .csv files. Note that only numbers, enums or strings are exported to .csv files.
        Parameters:
        targetCollection - - a collection of objects whose fields (including private and inherited) will be exported
        exportToDatabase - - set to true if the user wants to export to an output database
        exportToCSVfile - - set to true if the user wants to export to .csv files named after the class name of the targetCollection
      • DataExport

        public DataExport​(java.lang.Object targetSingleObject,
                          boolean exportToDatabase,
                          boolean exportToCSVfile)
        Create a DataExport object to handle the exporting of an object to an output database and/or .csv files. Note that only numbers, enums or strings are exported to .csv files.
        Parameters:
        targetSingleObject - - an object whose fields (including private and inherited) will be exported
        exportToDatabase - - set to true if the user wants to export to an output database
        exportToCSVfile - - set to true if the user wants to export to .csv files named after the class name of the targetCollection
    • Method Detail

      • export

        public void export()
        Export the values of the fields.