コード例 #1
0
  public void OKbuttonActionPerformed() throws KExceptionClass {

    try {

      KMetaUtilsClass.cursorWait((JDialog) dialog);

      KMetaUtilsClass.setProgressBarValue1(25);
      dialog.saveBrowserChanges();

      if (dialogMode == KDialogInterface.CREATE_NEW_MODE) {

        KMetaUtilsClass.setProgressBarValue1(50);
        pushBack();

        KMetaUtilsClass.setProgressBarValue1(75);
        dialog.setupTables(businessObjectOID);

      } else if (dialogMode == KDialogInterface.EDIT_MODE) {

        KMetaUtilsClass.setProgressBarValue1(75);
        update();
      }

    } finally {

      KMetaUtilsClass.setProgressBarValue1(100);
      KMetaUtilsClass.cursorNormal((JDialog) dialog);
    }
  }
コード例 #2
0
  /** Execute the query and get the results. */
  public void load(int startRow, int length) throws KExceptionClass {
    bindDBtransaction(
        dbTransactionClient,
        " SELECT " + selectSQL + " FROM " + tableName + finalWhere + finalOrder);

    // Query DB
    try {

      KMetaUtilsClass.cursorWait(parentWindow);
      KMetaUtilsClass.setProgressBarValue1(60);

      dbTransactionClient.executeQuery(startRow, length);

      KMetaUtilsClass.setProgressBarValue1(100);

    } finally {
      KMetaUtilsClass.cursorNormal(parentWindow);
    }

    if (!dbTransactionClient.columnNamesList.contains(keyField)) {
      throw new KExceptionClass(
          "*** Could not load data **** \n"
              + "Key field ["
              + keyField
              + "] was not found in result set",
          null);
    }

    firstLoadReady = true;

    log.log(this, "dbTransactionClient rowCount = " + dbTransactionClient.rowCount());
    log.log(this, "dbTransactionClient startRow = " + dbTransactionClient.resultSetStart());
  }