public static DataAccess createDataAccess(String dbName) { if (dataAccessService == null) { dataAccessService = new DataAccessObject(dbName); dataAccessService.open(Main.getDBPathName()); } return dataAccessService; }
public static DataAccess createDataAccess(DataAccess alternateDataAccessService) { if (dataAccessService == null) { dataAccessService = alternateDataAccessService; dataAccessService.open(Main.getDBPathName()); } return dataAccessService; }
public static void closeDataAccess() { if (dataAccessService != null) { dataAccessService.close(); } dataAccessService = null; }