public SqlBackend() { String databaseFile = System.getProperty("MjBackendDatabaseFile", null); boolean createTables = databaseFile == null || !new File(databaseFile).exists(); this.persistence = new SqlPersistence( SqlPersistence.embeddedDataSource(databaseFile), createTables, Application.getApplication().getEntityClasses()); }
public SqlBackend(String database, String user, String password) { this.persistence = new SqlPersistence( SqlPersistence.mariaDbDataSource(database, user, password), Application.getApplication().getEntityClasses()); }