Class SQLiteWriter
- java.lang.Object
-
- org.eclipse.mosaic.lib.database.persistence.SQLiteWriter
-
public class SQLiteWriter extends Object
This stores all objects from the given object database to a persistent SQLite database.
-
-
Constructor Summary
Constructors Constructor Description SQLiteWriter()
Constructor for theSQLiteWriter
reading the properties to retrieve the stable database version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearDb()
Clears the database of all known/used tables.void
saveToFile(Database database, String fileName)
Save the database to the filename.
-
-
-
Constructor Detail
-
SQLiteWriter
public SQLiteWriter()
Constructor for theSQLiteWriter
reading the properties to retrieve the stable database version.
-
-
Method Detail
-
saveToFile
public void saveToFile(@Nonnull Database database, @Nonnull String fileName)
Save the database to the filename.- Parameters:
database
- Database to save.fileName
- Name of the saved database.
-
clearDb
public void clearDb() throws SQLException
Clears the database of all known/used tables.- Throws:
SQLException
- Exception that provides information on a database access error or other errors.
-
-