private ExpansionRepository() { File file = new File("db"); if (!file.exists()) { file.mkdirs(); } try { ConnectionSource connectionSource = new JdbcConnectionSource(JDBC_URL); boolean obsolete = RepositoryUtil.isDatabaseObsolete( connectionSource, VERSION_ENTITY_NAME, EXPANSION_DB_VERSION); if (obsolete) { TableUtils.dropTable(connectionSource, ExpansionInfo.class, true); } TableUtils.createTableIfNotExists(connectionSource, ExpansionInfo.class); expansionDao = DaoManager.createDao(connectionSource, ExpansionInfo.class); } catch (SQLException ex) { } }