/**
   * Loads all S_FrameWork_Query_OperationValueObjects through the business facade using information
   * in the HttpServletRequest.
   *
   * @return String as result
   * @exception ProcessingException
   */
  public String loadAllS_FrameWork_Query_Operations() throws ProcessingException {
    String sReturnValue = null;

    FrameworkDefaultLogger.debug(
        "Inside S_FrameWork_Query_OperationWorkerBean::loadAllS_FrameWork_Query_Operations");

    try {
      // load the PADJBValueObject
      //			Collection coll = S_FrameWork_Query_OperationProxy.getS_FrameWork_Query_Operations();
      Collection coll =
          S_FrameWork_Query_OperationProxy.getS_FrameWork_Query_OperationsInSelectSql(
              "select * from S_FrameWork_Query_Operation", null);

      ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
      objectManager.setS_FrameWork_Query_Operations(coll);
    } catch (Exception exc) {
      FrameworkDefaultLogger.error(
          "Inside S_FrameWork_Query_OperationWorkerBean:loadS_FrameWork_Query_Operations() - "
              + ErrorService.errorStackToString(exc));
      throw new ProcessingException(
          "PADJBWorkerBean:loadAllS_FrameWork_Query_Operations() - successfully loaded all S_FrameWork_Query_OperationValueObjects - "
              + exc);
    }

    return (sReturnValue);
  }
  /**
   * Deletes a S_FrameWork_Query_OperationValueObject through the business facade using information
   * in the HttpServletRequest.
   *
   * @return String as result
   * @exception ProcessingException
   */
  public String deleteS_FrameWork_Query_Operation() throws ProcessingException {
    String sReturnValue = null;

    FrameworkDefaultLogger.debug(
        "Inside S_FrameWork_Query_OperationWorkerBean::deleteS_FrameWork_Query_Operation");
    ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();

    try {
      // S_FrameWork_Query_OperationPrimaryKey primaryKey    = getPrimaryKeyFromServletRequest();
      S_FrameWork_Query_OperationPrimaryKey primaryKey =
          new S_FrameWork_Query_OperationPrimaryKey(
              this.getServletRequestParameter("queryoperationid"));
      IS_FrameWork_Query_OperationValueObject valueObject =
          S_FrameWork_Query_OperationProxy.getS_FrameWork_Query_Operation(primaryKey);

      // delete the S_FrameWork_Query_OperationValueObject
      if (valueObject != null) {
        new S_FrameWork_Query_OperationProxy(valueObject).delete();
        FrameworkDefaultLogger.debug(
            "S_FrameWork_Query_OperationWorkerBean:deleteS_FrameWork_Query_Operation() - successfully delete S_FrameWork_Query_OperationValueObject with key field(s) - "
                + primaryKey.toString());

        // write the log
        PublicFunction.writeSystemLog(
            this.currentUser, new Long(2), valueObject, this.beforeSaveValueObject);

        // update the cached list
        ValueObjectListProxy voList = objectManager.getS_FrameWork_Query_Operations();
        if (voList != null) {
          Collection coll = voList.getDataValues();
          Iterator tempIterator = coll.iterator();
          ArrayList tmpColl = new ArrayList();
          while (tempIterator.hasNext()) {
            S_FrameWork_Query_OperationValueObject tmpObj =
                (S_FrameWork_Query_OperationValueObject) tempIterator.next();
            if (!(tmpObj.getS_FrameWork_Query_OperationPrimaryKey())
                .equals(valueObject.getS_FrameWork_Query_OperationPrimaryKey())) {
              tmpColl.add(tmpObj);
            }
          }
          objectManager.setS_FrameWork_Query_Operations(tmpColl);
        }
      }
    } catch (Exception exc) {
      String sErrorMsg =
          " S_FrameWork_Query_OperationWorkerBean:deleteS_FrameWork_Query_Operation() - " + exc;
      FrameworkDefaultLogger.error(sErrorMsg);
      PublicFunction.CustomProcessingException(objectManager, "删除记录时出错,请重新操作!", sErrorMsg, exc);
      // throw new
      // ProcessingException("S_FrameWork_Query_OperationWorkerBean:saveS_FrameWork_Query_Operation() - " +
      //    sErrorMsg);
    }

    return (sReturnValue);
  }
  /**
   * Creates a S_FrameWork_Query_OperationValueObject through the business facade using information
   * in the HttpServletRequest.
   *
   * @return String as result
   * @exception ProcessingException
   */
  public String createS_FrameWork_Query_Operation() throws ProcessingException {
    String sReturnValue = null;

    FrameworkDefaultLogger.debug(
        "Inside S_FrameWork_Query_OperationWorkerBean::createS_FrameWork_Query_Operation");
    ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();

    try {
      // Create the S_FrameWork_Query_OperationValueObject by calling the
      // static createS_FrameWork_Query_Operation method on S_FrameWork_Query_OperationProxy

      this.m_S_FrameWork_Query_OperationValueObject =
          setDefault(
              (S_FrameWork_Query_OperationValueObject)
                  this.m_S_FrameWork_Query_OperationValueObject,
              "CreateEdit",
              "CREATE_S_FrameWork_Query_Operation");

      IS_FrameWork_Query_OperationValueObject valueObject =
          S_FrameWork_Query_OperationProxy.createS_FrameWork_Query_Operation(
              this.m_S_FrameWork_Query_OperationValueObject);

      if (valueObject != null) {
        FrameworkDefaultLogger.debug(
            "S_FrameWork_Query_OperationWorkerBean:createS_FrameWork_Query_Operation() - successfully created S_FrameWork_Query_OperationValueObject - "
                + valueObject.toString());

        // assign the S_FrameWork_Query_OperationValueObject to the ApplicationUSOM
        objectManager.setCurrentS_FrameWork_Query_Operation(valueObject);

        // update the cached usom
        ValueObjectListProxy voList = objectManager.getS_FrameWork_Query_Operations();
        if (voList != null) {
          Collection coll = voList.getDataValues();
          coll.add(valueObject);
          objectManager.setS_FrameWork_Query_Operations(coll);
        }

        // log the action
        PublicFunction.writeSystemLog(
            this.currentUser, new Long(1), valueObject, this.beforeSaveValueObject);
        sReturnValue = loadAllS_FrameWork_Query_Operations();
      }
    } catch (Exception exc) {
      String sErrorMsg = " Inside WorkerBean:createS_FrameWork_Query_Operation() - " + exc;
      FrameworkDefaultLogger.error(sErrorMsg);
      PublicFunction.CustomProcessingException(objectManager, "保存新增记录时出错,请重新操作!", sErrorMsg, exc);
      // throw new
      // ProcessingException("S_FrameWork_Query_OperationWorkerBean:createS_FrameWork_Query_Operation() - " +
      //    sErrorMsg);
    }

    return (sReturnValue);
  }
  /**
   * Loads a S_FrameWork_Query_OperationValueObject through the business facade using information in
   * the HttpServletRequest.
   *
   * @return String as result
   * @exception ProcessingException
   */
  public String loadS_FrameWork_Query_Operation() throws ProcessingException {
    String sReturnValue = null;

    FrameworkDefaultLogger.debug(
        "Inside S_FrameWork_Query_OperationWorkerBean::loadS_FrameWork_Query_Operation");

    ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
    IS_FrameWork_Query_OperationValueObject valueObject = null;

    try {
      // load the S_FrameWork_Query_OperationValueObject
      S_FrameWork_Query_OperationPrimaryKey primaryKey = getPrimaryKeyFromServletRequest();
      valueObject = S_FrameWork_Query_OperationProxy.getS_FrameWork_Query_Operation(primaryKey);

      if (valueObject != null) {
        FrameworkDefaultLogger.debug(
            "S_FrameWork_Query_OperationWorkerBean:loadS_FrameWork_Query_Operation() - successfully loaded - "
                + valueObject.toString());

        // assign the S_FrameWork_Query_OperationValueObject to the ApplicationUSOM
        objectManager.setCurrentS_FrameWork_Query_Operation(valueObject);

        // write the log
        PublicFunction.writeSystemLog(
            this.currentUser, new Long(5), valueObject, this.beforeSaveValueObject);
      }

    } catch (Exception exc) {
      String sErrorMsg =
          " S_FrameWork_Query_OperationWorkerBean:loadS_FrameWork_Query_Operation() - " + exc;
      FrameworkDefaultLogger.error(sErrorMsg);
      PublicFunction.CustomProcessingException(objectManager, "读取记录时出错,请重新操作!", sErrorMsg, exc);
      throw new ProcessingException(
          "S_FrameWork_Query_OperationWorkerBean:saveS_FrameWork_Query_Operation() - " + sErrorMsg);
    }

    return (sReturnValue);
  }
  /**
   * 一些根据业务员规则产生的数据项目在initS_FrameWork_Query_Operation()赋值
   *
   * @return
   * @throws ProcessingException
   */
  public String initS_FrameWork_Query_Operation() throws ProcessingException {
    String sReturnValue = null;

    FrameworkDefaultLogger.debug(
        "Inside S_FrameWork_Query_OperationWorkerBean.initS_FrameWork_Query_Operation(...).");

    S_FrameWork_Query_OperationValueObject tempVO = new S_FrameWork_Query_OperationValueObject();

    // 存储过程初始化
    String objID1 = getServletRequestParameter("ID"); // 只针对主键
    if (objID1 != null && !objID1.trim().equalsIgnoreCase("")) {
      Vector vPara = new Vector(); // 存储过程参数
      Parameter para = null; // 存储过程传入传出参数
      Collection coll = null; // 返回集合	
      para = new Parameter(objID1, true);
      vPara.addElement(para);
      coll =
          S_FrameWork_Query_OperationProxy.executeStoredProcedure(
              "i_S_FrameWork_Query_Operation", vPara, true);
      if (coll != null) {
        if (coll.size() > 0) {
          Iterator it = coll.iterator();
          while (it.hasNext()) {
            tempVO = (S_FrameWork_Query_OperationValueObject) it.next();
          }
        }
      }
    }

    tempVO = setDefault(tempVO, "CreateEdit", "INIT_S_FrameWork_Query_Operation");

    if (tempVO != null) {
      ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
      objectManager.setCurrentS_FrameWork_Query_Operation(tempVO);
    }

    return sReturnValue;
  }