示例#1
0
 public static DataAccess createDataAccess(String dbName) {
   if (dataAccessService == null) {
     dataAccessService = new DataAccessObject(dbName);
     dataAccessService.open(Main.getDBPathName());
   }
   return dataAccessService;
 }
示例#2
0
 public static DataAccess createDataAccess(DataAccess alternateDataAccessService) {
   if (dataAccessService == null) {
     dataAccessService = alternateDataAccessService;
     dataAccessService.open(Main.getDBPathName());
   }
   return dataAccessService;
 }
示例#3
0
 public static void closeDataAccess() {
   if (dataAccessService != null) {
     dataAccessService.close();
   }
   dataAccessService = null;
 }