Beispiel #1
0
  private static synchronized void doLoad() {
    if (loaded) return;

    try {
      Display.masterLog("Loading Manufacturers...");
      RcopiaDb manufacturerDb =
          DatabaseFactory.instance().get(MANUFACTURER, Display.getMasterLogger());

      manufacturers = manufacturerDb.getAll();
      createMap();
    } catch (Exception e) {
      e.printStackTrace();
      ErrorMailServer.instance().mail("Cannot load manufacturer list: " + e.getMessage());
      throw new RuntimeException("Cannot load manufacturer list: " + e.getMessage());
    }

    loaded = true;
  }
  private void doLoad() {
    if (logger == null) logger = new Logger();

    if (loaded) return;

    try {
      logger.log("Loading State Prescription Variances...");
      RcopiaDb db = DatabaseFactory.instance().get(STATE_PHARMACY_VARIANCES, logger);

      ArrayList variances = db.getAll();
      createMap(variances);
    } catch (Exception e) {
      logger.log(e);
      ErrorMailServer.instance()
          .mail("Cannot load State Prescription Variances: " + e.getMessage());
      throw new SystemErrorException(
          "Cannot load  State Prescription Variances: " + e.getMessage());
    }

    loaded = true;
  }