Package microsim.data

Class DataExport

java.lang.Object
microsim.data.DataExport

public class DataExport extends 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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataExport(@NonNull 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(@NonNull Collection<?> targetCollection, boolean exportToDatabase, boolean exportToCSVfile)
    Creates a DataExport object to handle the exporting of a collection of objects to an output database and/or *.csv files.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method exports field values of an object or a collection of objects to the corresponding database or *.csv file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataExport

      public DataExport(@NonNull @NonNull Collection<?> targetCollection, boolean exportToDatabase, boolean exportToCSVfile)
      Creates 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.
      Throws:
      NullPointerException - when targetCollection is null.
    • DataExport

      public DataExport(@NonNull @NonNull 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 targetSingleObject.
      Throws:
      NullPointerException - when targetSingleObject is null.
  • Method Details

    • export

      public void export()
      This method exports field values of an object or a collection of objects to the corresponding database or *.csv file.