910111213141516171819
private static ConnectionHelper instance; private Msgs msgs; private String url; private ConnectionHelper() { msgs = new Msgs(); String driver = "org.hsqldb.jdbcDriver"; try { Class.forName(driver); url = "jdbc:hsqldb:file:mp3db/mp3db";
132133134135136137138139140141142
mp3Dir=mp3Directory; deleteFile = null; insertFile = null; folders = refreshFolders; genres = refreshGenres; msgs = new Msgs(); rs = null; totalFiles = 0; try { stmt = conn.createStatement();
43444546474849505152
// constructors public ApplicationService() { totalGenres = 0; totalSeconds = 0; totalFolders = 0; msgs = new Msgs(); System.out.println("ApplicationService: Starting mp3dj-" + appVersion + "."); refresh = new Refresh(); refreshDatabase(); }
31323334353637
* Refresh (recreate) database by reading and parsing id3 tag * information from mp3 files subordinate to 'mp3Dir'. */ protected Refresh() { files = null; msgs = new Msgs(); }