/** * Loads all GROUPValueObjects through the business facade using information in the * HttpServletRequest. * * @return String as result * @exception ProcessingException */ public String loadAllGROUPs() throws ProcessingException { String sReturnValue = null; logMessage(FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::loadAllGROUPs"); try { // load the GROUPValueObject Collection coll = GROUPProxy.getGROUPs(); if (coll != null) { logMessage( FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "GROUPWorkerBean:loadAllGROUPs() - successfully loaded all GROUPValueObjects - " + coll.toString()); // assign the GROUPValueObject to the ApplicationUSOM ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); objectManager.setGROUPs(coll); } } catch (Exception exc) { throw new ProcessingException( "GROUPWorkerBean:loadAllGROUPs() - successfully loaded all GROUPValueObjects - " + exc, exc); } return (sReturnValue); }
/** * 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); }
/** * Loads a GROUPValueObject through the business facade using information in the * HttpServletRequest. * * @return String as result * @exception ProcessingException */ public String loadGROUP() throws ProcessingException { String sReturnValue = null; logMessage(FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::loadGROUP"); try { // load the GROUPValueObject GROUPPrimaryKey primaryKey = getPrimaryKeyFromServletRequest(); IGROUPValueObject valueObject = GROUPProxy.getGROUP(primaryKey); if (valueObject != null) { logMessage( FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "GROUPWorkerBean:loadGROUP() - successfully loaded - " + valueObject.toString()); // assign the GROUPValueObject to the ApplicationUSOM ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); objectManager.setCurrentGROUP(valueObject); } } catch (Exception exc) { throw new ProcessingException("GROUPWorkerBean:loadGROUP() - " + exc, exc); } return (sReturnValue); }
/** * Creates a GROUPValueObject through the business facade using information in the * HttpServletRequest. * * @return String as result * @exception ProcessingException */ public String createGROUP() throws ProcessingException { String sReturnValue = null; logMessage(FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::createGROUP"); try { // Create the GROUPValueObject by calling the // static createGROUP method on GROUPProxy IGROUPValueObject valueObject = GROUPProxy.createGROUP(this.m_GROUPValueObject); if (valueObject != null) { // logMessage( FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "GROUPWorkerBean:createGROUP() - // successfully created GROUPValueObject - " + valueObject.toString() ); ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); objectManager.setCurrentGROUP(valueObject); } String[] users = this.getHttpServletRequest().getParameterValues("selectItems"); if (users != null && users.length > 0) { for (int i = 0; i < users.length; i++) { GROUPUSERProxy.createGROUPUSER( new GROUPUSERValueObject( new GROUPUSERPrimaryKey(users[i], valueObject.getGroupid()))); } } } catch (Exception exc) { throw new ProcessingException("GROUPWorkerBean:createGROUP() - " + exc, 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); }
/** * 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(); IUSERBValueObject currentUser = objectManager.getCurrentUSERB(); if (sAction.equalsIgnoreCase(SAVE_GROUP) || sAction.equalsIgnoreCase(CREATE_GROUP)) { ///////////////////////////////////////////////////// // To Do: Post Submit Form Validation ///////////////////////////////////////////////////// try { // if creating, create an empty one first if (sAction.equalsIgnoreCase(CREATE_GROUP)) { String systemid = SequenceBaseProxy.getSystemID(currentUser.getDept()); m_GROUPValueObject = new GROUPValueObject(new GROUPPrimaryKey(systemid)); m_GROUPValueObject.setGroupname(getServletRequestParameter("groupname")); m_GROUPValueObject.setDept(getServletRequestParameter("dept")); } else // must be saving an existing one, so get it from the cache { // m_GROUPValueObject = objectManager.getCurrentGROUP(); String groupid = this.getServletRequestParameter("groupid"); m_GROUPValueObject = GROUPProxy.getGROUP(new GROUPPrimaryKey(groupid)); if (m_GROUPValueObject == null) { logMessage( FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "GROUPWorkerBean:isFormValid() - failed to acquire the Current GROUP from the Application USOM. "); return (false); } m_GROUPValueObject.setGroupname(getServletRequestParameter("groupname")); m_GROUPValueObject.setDept(getServletRequestParameter("dept")); } // AIB Generated Section - Do Not Modify Within /* m_GROUPValueObject.setSys_reserver1( getServletRequestParameter( "sys_reserver1" ) ); m_GROUPValueObject.setSys_reserver2( getServletRequestParameter( "sys_reserver2" ) ); m_GROUPValueObject.setSys_reserver3( getServletRequestParameter( "sys_reserver3" ) ); m_GROUPValueObject.setSys_reserver4( getServletRequestParameter( "sys_reserver4" ) ); m_GROUPValueObject.setSys_reserver5( getServletRequestParameter( "sys_reserver5" ) ); */ // ~AIB Generated } catch (Exception exc) { logMessage( FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "GROUPWorkerBean:isFormValid() - Exception caught - " + exc); bReturn = false; } } return bReturn; }
/** * Processes request on behalf of the provided action * * @param String strActionValue * @return String the result of processing, return null if processing went OK. * @exception ProcessingException Thrown if there was a problem executing the request. */ public String callProcessRequest(String strActionValue) throws ProcessingException { FrameworkDefaultLogger.debug("Inside S_FrameWork_Query_OperationWorkerBean::processRequest()."); m_strActionType = strActionValue; String sReturnValue = null; ApplicationUSOM usom = (ApplicationUSOM) getUSOM(); // get current Authorized user currentUser = (IUSERBValueObject) usom.getCurrentAuthorizedUser(); // delete by zht // extend interface left for later use,to check users permission based on the action String retStr = PublicFunction.beforeAction( usom, currentUser, strActionValue, "S_FrameWork_Query_Operation"); if (retStr != null) { return retStr; } // Now validate the request if (isFormValid(strActionValue) == false) { return "DATA_VALIDATION_ERROR"; } // Based on the incoming action, determine what internal method to call if (Init_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = initS_FrameWork_Query_Operation(); } else if (Create_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = createS_FrameWork_Query_Operation(); } else if (Save_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = saveS_FrameWork_Query_Operation(); } else if (Delete_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = deleteS_FrameWork_Query_Operation(); } else if (Load_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = loadS_FrameWork_Query_Operation(); } else if (LoadAll_S_FrameWork_Query_Operations.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = loadAllS_FrameWork_Query_Operations(); } else if (Query_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = queryS_FrameWork_Query_Operation(); } else if (GetXML_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = this.getS_FrameWork_Query_OperationXMLData(); } else if (CREATE_S_FrameWork_Query_Operation_XML.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = createS_FrameWork_Query_OperationXML(); } else if (SAVE_S_FrameWork_Query_Operation_XML.equalsIgnoreCase(strActionValue.trim())) { sReturnValue = saveS_FrameWork_Query_OperationXML(); } else if (QUERY_S_FrameWork_Query_Operation.equalsIgnoreCase(strActionValue.trim())) { // sReturnValue = loadS_FrameWork_Query_Operationb(); } return sReturnValue; }
/** * Helper method used to retrieve the IGROUPValueObject from the USOM. If not in the USOM, it is * obtained from the get it from the GROUPProxy * * @return IGROUPValueObject */ protected IGROUPValueObject getCurrentGROUP() throws ProcessingException { IGROUPValueObject valueObject = null; ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); // first look in the USOM if (objectManager != null) { valueObject = objectManager.getCurrentGROUP(); // if not in the cache, create it and cache it there if (valueObject == null) { valueObject = new GROUPValueObject(); objectManager.setCurrentGROUP(valueObject); } } return (valueObject); }
public String createGROUPHTM() throws ProcessingException { String sReturnValue = null; logMessage( FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::createGROUPHTM"); try { ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); IUSERBValueObject currentUser = objectManager.getCurrentUSERB(); Collection coll = USERBProxy.getOptionUser(currentUser.getUserid()); objectManager.setUSERBs(coll); } catch (Exception exc) { throw new ProcessingException("GROUPWorkerBean:saveGROUP() - " + exc, exc); } return (sReturnValue); }
public String saveGROUPHTM() throws ProcessingException { String sReturnValue = null; logMessage(FrameworkLogEventType.DEBUG_LOG_EVENT_TYPE, "Inside GROUPWorkerBean::saveGROUPHTM"); try { String groupid = this.getServletRequestParameter("groupid"); ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); IUSERBValueObject currentUser = objectManager.getCurrentUSERB(); Collection colOption = USERBProxy.getOptionUser(currentUser.getUserid()); Collection selecteduser = USERBProxy.getGroupUser(groupid); ArrayList optionArr = new ArrayList(); if (colOption != null && selecteduser != null) { ArrayList tempA = new ArrayList(colOption); ArrayList tempB = new ArrayList(selecteduser); IUSERBValueObject optionuser = null; IUSERBValueObject selectuser = null; boolean flag = false; for (int i = 0; i < tempA.size(); i++) { flag = true; optionuser = (IUSERBValueObject) tempA.get(i); for (int j = 0; j < tempB.size(); j++) { selectuser = (IUSERBValueObject) tempB.get(j); if (optionuser.getUserid().equals(selectuser.getUserid())) { flag = false; } } if (flag) { optionArr.add(optionuser); } } } this.getHttpServletRequest().setAttribute("optionusers", optionArr); if (selecteduser != null) { this.getHttpServletRequest().setAttribute("selectedusers", new ArrayList(selecteduser)); } else { this.getHttpServletRequest().setAttribute("selectedusers", new ArrayList()); } } catch (Exception exc) { throw new ProcessingException("GROUPWorkerBean:saveGROUPHTM() - " + exc, exc); } return (sReturnValue); }
/** * 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; }
/** * 一些根据业务员规则产生的数据项目在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; }
/** * 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); }
/** * 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; }
/** * Saves a S_FrameWork_Query_OperationValueObject through the business facade using information in * the HttpServletRequest. * * @return String as result * @exception ProcessingException */ public String saveS_FrameWork_Query_Operation() throws ProcessingException { String sReturnValue = null; FrameworkDefaultLogger.debug( "Inside S_FrameWork_Query_OperationWorkerBean::saveS_FrameWork_Query_Operation"); ApplicationUSOM objectManager = (ApplicationUSOM) getUSOM(); try { // save the S_FrameWork_Query_OperationValueObject this.m_S_FrameWork_Query_OperationValueObject = setDefault( (S_FrameWork_Query_OperationValueObject) this.m_S_FrameWork_Query_OperationValueObject, "CreateEdit", "save_S_FrameWork_Query_Operation"); // added by wzp IS_FrameWork_Query_OperationProxy proxy = new S_FrameWork_Query_OperationProxy(this.m_S_FrameWork_Query_OperationValueObject); IS_FrameWork_Query_OperationValueObject valueObject = proxy.saveS_FrameWork_Query_Operation(); if (valueObject != null) { FrameworkDefaultLogger.debug( "S_FrameWork_Query_OperationWorkerBean:save() - successfully saved S_FrameWork_Query_OperationValueObject - " + valueObject.toString()); // assign the S_FrameWork_Query_OperationValueObject to the ApplicationUSOM objectManager.setCurrentS_FrameWork_Query_Operation(valueObject); // write the sytem log PublicFunction.writeSystemLog( this.currentUser, new Long(3), 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(beforeSaveValueObject.getS_FrameWork_Query_OperationPrimaryKey())) { tmpColl.add(valueObject); } else { tmpColl.add(tmpObj); } } objectManager.setS_FrameWork_Query_Operations(tmpColl); } } } catch (Exception exc) { String sErrorMsg = " S_FrameWork_Query_OperationWorkerBean:saveS_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); }