Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 public SqlBackend(String database, String user, String password) {
   this.persistence =
       new SqlPersistence(
           SqlPersistence.mariaDbDataSource(database, user, password),
           Application.getApplication().getEntityClasses());
 }