Exemplo n.º 1
0
 public static void loadFromText(String text) {
   try {
     if (singleton == null) {
       // default behavior is to create a singleton for
       // an in memory dbserver
       useDBServer();
     }
     singleton.loadFromText(text);
   } catch (Exception e) {
     ExceptionWindow.getExceptionWindow(e);
   }
 }
Exemplo n.º 2
0
 public static StorageListener useDBServer() {
   // assume in memory with some initial state
   if (singleton != null) {
     return (singleton);
   }
   try {
     singleton = (StorageListener) DBServer.initInMemory();
   } catch (Exception e) {
     ExceptionWindow.getExceptionWindow(e);
   }
   return (singleton);
 }
Exemplo n.º 3
0
 public static void createEmpty() {
   try {
     if (singleton == null) {
       // default behavior is to create a singleton for
       // an in memory dbserver
       useDBServer();
     }
     singleton.createEmpty();
   } catch (Exception e) {
     ExceptionWindow.getExceptionWindow(e);
   }
 }
Exemplo n.º 4
0
 public static StorageListener useDBServer(String dbName) {
   // assumed persistent
   if (singleton != null) {
     return (singleton);
   }
   try {
     singleton = (StorageListener) DBServer.init(dbName);
   } catch (Exception e) {
     ExceptionWindow.getExceptionWindow(e);
   }
   return (singleton);
 }