Package microsim.data
Class DataExport
java.lang.Object
microsim.data.DataExport
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
ConstructorsConstructorDescriptionDataExport(@NonNull Object targetSingleObject, boolean exportToDatabase, boolean exportToCSVfile) Create aDataExportobject to handle the exporting of an object to an output database and/or*.csvfiles.DataExport(@NonNull Collection<?> targetCollection, boolean exportToDatabase, boolean exportToCSVfile) Creates aDataExportobject to handle the exporting of a collection of objects to an output database and/or*.csvfiles. -
Method Summary
Modifier and TypeMethodDescriptionvoidexport()This method exports field values of an object or a collection of objects to the corresponding database or*.csvfile.
-
Constructor Details
-
DataExport
public DataExport(@NonNull @NonNull Collection<?> targetCollection, boolean exportToDatabase, boolean exportToCSVfile) Creates aDataExportobject to handle the exporting of a collection of objects to an output database and/or*.csvfiles. Note that only numbers, enums or strings are exported to*.csvfiles.- 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*.csvfiles named after the class name of thetargetCollection.- Throws:
NullPointerException- whentargetCollectionisnull.
-
DataExport
public DataExport(@NonNull @NonNull Object targetSingleObject, boolean exportToDatabase, boolean exportToCSVfile) Create aDataExportobject to handle the exporting of an object to an output database and/or*.csvfiles. Note that only numbers, enums or strings are exported to*.csvfiles.- 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*.csvfiles named after the class name of thetargetSingleObject.- Throws:
NullPointerException- whentargetSingleObjectisnull.
-
-
Method Details
-
export
public void export()This method exports field values of an object or a collection of objects to the corresponding database or*.csvfile.
-