/**
   * Helper method used to retrieve the IS_FrameWork_Query_OperationValueObject from the USOM. If
   * not in the USOM, it is obtained from the get it from the S_FrameWork_Query_OperationProxy
   *
   * @return IS_FrameWork_Query_OperationValueObject
   */
  protected IS_FrameWork_Query_OperationValueObject getCurrentS_FrameWork_Query_Operation()
      throws ProcessingException {
    IS_FrameWork_Query_OperationValueObject valueObject = null;
    ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();

    // first look in the USOM
    if (objectManager != null) {
      valueObject = objectManager.getCurrentS_FrameWork_Query_Operation();

      // if not in the cache, create it and cache it there
      if (valueObject == null) {
        valueObject = new S_FrameWork_Query_OperationValueObject();
        objectManager.setCurrentS_FrameWork_Query_Operation(valueObject);
      }
    }

    return (valueObject);
  }
  public String getS_FrameWork_Query_OperationXMLData() throws ProcessingException {
    String sReturnValue = null;
    FrameworkDefaultLogger.debug(
        "Inside S_FrameWork_Query_OperationWorkerBean.getS_FrameWork_Query_OperationXMLData() - get XML for S_FrameWork_Query_Operation.");
    Document doc = null;
    String formName = null;
    formName = "CreateEdit";
    ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
    S_FrameWork_Query_OperationValueObject tempVO =
        (S_FrameWork_Query_OperationValueObject)
            objectManager.getCurrentS_FrameWork_Query_Operation();
    if (tempVO != null) {
      DomBuilder domBuilder = new DomBuilder("S_FrameWork_Query_Operation", formName);
      doc = domBuilder.createDomByValueObect(tempVO);
    } else {
      doc = DomService.getXMLDocFromEntity("S_FrameWork_Query_Operation", formName);
    }

    // 所有的保存到attribute中的dom都命名为:dom
    this.getHttpServletRequest().setAttribute("dom", doc);
    return sReturnValue;
  }
  /**
   * Validates whether the the form values are valid.
   *
   * @param String sAction
   * @return boolean
   */
  private boolean isFormValid(String sAction) {
    boolean bReturn = true;
    ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM();
    if (sAction.equalsIgnoreCase(Save_S_FrameWork_Query_Operation)
        || sAction.equalsIgnoreCase(Create_S_FrameWork_Query_Operation)) {
      /////////////////////////////////////////////////////
      // To Do:  Post Submit Form Validation
      /////////////////////////////////////////////////////

      try {
        // if creating, create an empty one first
        if (sAction.equalsIgnoreCase(Create_S_FrameWork_Query_Operation)) {
          m_S_FrameWork_Query_OperationValueObject = new S_FrameWork_Query_OperationValueObject();
        } else // must be saving an existing one, so get it from the cache
        {

          m_S_FrameWork_Query_OperationValueObject =
              objectManager.getCurrentS_FrameWork_Query_Operation();

          // for update the cache usom
          beforeSaveValueObject = m_S_FrameWork_Query_OperationValueObject;

          if (m_S_FrameWork_Query_OperationValueObject == null) {
            logMessage(
                FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE,
                "S_FrameWork_Query_OperationWorkerBean:isFormValid() - failed to acquire the Current S_FrameWork_Query_Operation from the Application USOM. ");
            return (false);
          }
        }

        // AIB Generated Section - Do Not Modify Within

        m_S_FrameWork_Query_OperationValueObject.setOPERATION_CODE(
            StringService.strToStr(getServletRequestParameter("oPERATION_CODE")));

        m_S_FrameWork_Query_OperationValueObject.setFORMSN(
            StringService.strToStr(getServletRequestParameter("fORMSN")));

        m_S_FrameWork_Query_OperationValueObject.setOPERATION_NAME(
            StringService.strToStr(getServletRequestParameter("oPERATION_NAME")));

        m_S_FrameWork_Query_OperationValueObject.setOPERATION_VALUE(
            StringService.strToStr(getServletRequestParameter("oPERATION_VALUE")));

        m_S_FrameWork_Query_OperationValueObject.setOPERATION_ORDER(
            StringService.strToStr(getServletRequestParameter("oPERATION_ORDER")));

        m_S_FrameWork_Query_OperationValueObject.setEXT1(
            StringService.strToStr(getServletRequestParameter("eXT1")));

        m_S_FrameWork_Query_OperationValueObject.setEXT2(
            StringService.strToStr(getServletRequestParameter("eXT2")));

        m_S_FrameWork_Query_OperationValueObject.setEXT3(
            StringService.strToStr(getServletRequestParameter("eXT3")));

        m_S_FrameWork_Query_OperationValueObject.setEXT4(
            StringService.strToStr(getServletRequestParameter("eXT4")));

        m_S_FrameWork_Query_OperationValueObject.setEXT5(
            StringService.strToStr(getServletRequestParameter("eXT5")));

        m_S_FrameWork_Query_OperationValueObject.setDepartmentCode(
            StringService.strToStr(getServletRequestParameter("departmentCode")));

        m_S_FrameWork_Query_OperationValueObject.setCreator(
            StringService.strToStr(getServletRequestParameter("creator")));

        m_S_FrameWork_Query_OperationValueObject.setSecurityGrade(
            StringService.strToStr(getServletRequestParameter("securityGrade")));

        m_S_FrameWork_Query_OperationValueObject.setCreatedTime(
            formatToTimestamp(getServletRequestParameter("createdTime")));

        m_S_FrameWork_Query_OperationValueObject.setLastUpdatedBy(
            StringService.strToStr(getServletRequestParameter("lastUpdatedBy")));

        m_S_FrameWork_Query_OperationValueObject.setLastUpdatedTime(
            formatToTimestamp(getServletRequestParameter("lastUpdatedTime")));

        m_S_FrameWork_Query_OperationValueObject.setRefreshTime(
            formatToTimestamp(getServletRequestParameter("refreshTime")));

        m_S_FrameWork_Query_OperationValueObject.setUploadFlag(
            StringService.strToStr(getServletRequestParameter("uploadFlag")));

        m_S_FrameWork_Query_OperationValueObject.setDownloadFlag(
            StringService.strToStr(getServletRequestParameter("downloadFlag")));

        m_S_FrameWork_Query_OperationValueObject.setDeleteFlag(
            StringService.strToStr(getServletRequestParameter("deleteFlag")));

        // ~AIB Generated

      } catch (Exception exc) {
        logMessage(
            FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE,
            "S_FrameWork_Query_OperationWorkerBean:isFormValid() - Exception caught - " + exc);
        exc.printStackTrace();
        bReturn = false;
      }
    }

    return bReturn;
  }