Examples of DOParameterService


Examples of com.exedosoft.plat.bo.DOParameterService

      biService.putValue("l10n", biService.getValue("l10n") + "_copy");
      BOInstance biNewService = thisService.invokeUpdate(biService);

      for (Iterator<DOParameterService> it = dos
          .retrieveParaServiceLinks().iterator(); it.hasNext();) {
        DOParameterService dps = it.next();
        BOInstance bi = boServicePara.getInstance(dps.getObjUid());
        bi.setUid(null);
        boServicePara.getDInsertService().invokeUpdate(bi);
      }
      for (Iterator<DOServiceRule> it = dos.retrieveServiceRules()
          .iterator(); it.hasNext();) {
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

    for (Iterator<DOParameter> it = paras.iterator(); it.hasNext(); i = i + 5) {
      DOParameter dop = it.next();
      if (dop.getProperty().isKeyCol()) {
        continue;
      }
      DOParameterService dps = new DOParameterService();
      dps.setDop(dop);
      dps.setDos(rService);
      dps.setOrderNum(Integer.valueOf(i));
      if (dop.getProperty().isString()) {
        dps.setPatterm("#col# like ?;%#value#%");
      }

      DOService aService = DOService
          .getService("DO_Parameter_Service_Copy_Batch");
      DAOUtil.INSTANCE().store(dps, aService);
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

        String newKeyValue = null;

        int i = 1;
        for (Iterator it = this.service.retrieveParaServiceLinks()
            .iterator(); it.hasNext();) {
          DOParameterService dops = (DOParameterService) it.next();
          DOParameter dop = dops.getDop();

          String value = null;

          if (dop.getType() != null
              && dop.getType().intValue() == DOParameter.TYPE_FORM
              && dop.getDefaultValue() == null) {
            log.info("Parameter Name:::" + dop.getName());

            String[] valueArray = this.actionForm.getValueArray(dop
                .getName());
            value = valueArray[len];
            if ("".equals(value)) {
              value = null;
            }
          } else {
            value = dop.getValue();

          }

          if (dop.getType() != null
              && dop.getType().intValue() == DOParameter.TYPE_KEY) {
            newKeyValue = value;
          }

          value = dops.getAfterPattermValue(value);
          this.service.putStatementAValue(pstmt, i, dops, value);
          i++;
        }
        batchSize++;
        if (oldInstance != null) {
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

        List<String> newIds = new ArrayList<String>();
        for (int len = 0; len < inputValues.length; len++) {
          int i = 1;
          for (Iterator it = insertService.retrieveParaServiceLinks()
              .iterator(); it.hasNext();) {
            DOParameterService dops = (DOParameterService) it
                .next();
            DOParameter dop = dops.getDop();

            String value = null;

            if (dop.getType() != null
                && dop.getType().intValue() == DOParameter.TYPE_FORM
                && dop.getDefaultValue() == null) {// //form类型直接从节目获取
              log.info("Batch Parameter Name:::" + dop.getName());
              String[] valueArray = uiForm.getValueArray(dop
                  .getName());
              value = valueArray[len];
              if ("".equals(value)) {
                value = null;
              }
            } else {
              value = dop.getValue();
            }
           
            if (dop.getType() != null
                && dop.getType().intValue() == DOParameter.TYPE_KEY) {
              newIds.add(value);
            }
            value = dops.getAfterPattermValue(value);
            insertService.putStatementAValue(pstmt, i, dops, value);
            i++;
          }
          batchSize++;
          pstmt.addBatch();
        }
        log.info("::batchSize:::" + batchSize);
        pstmt.executeBatch();
       
        /////多租户的处理
        for(String anID : newIds){
          insertService.dealMultiTenancy(null, con, anID);
        }
      }
      // ////////////////////////////////////end 新增=====================

      // ////////////修改   begin==============================================
      DOBO refreshBO = aFm.getGridModel().getService().getBo();

      String[] ids = uiForm.getValueArray("id");
      if (ids != null && ids.length > 0) {

        PreparedStatement pstmt = con.prepareStatement(updateService
            .getTempSql());
        for (int ii = 0; ii < ids.length; ii++) {
          String idstr = ids[ii];
          System.out.println("one isstr::" + idstr);
          if (idstr != null) {
            String[] vals = idstr.split(";﹕#");
            HashMap<String, String> paras = new HashMap<String, String>();
            String id = "";
            if (vals != null && vals.length > 0) {
              id = vals[0];
              for (int j = 1; j < vals.length; j++) {
                String aKeyValue = vals[j];
                System.out.println("aKeyValue::::::" + aKeyValue);
                String[] arrayKV = aKeyValue.split("﹕﹕");
                String aValue = null;
                if(arrayKV.length > 1){
                   aValue = arrayKV[1];
                }
                paras.put(arrayKV[0],aValue);
              }
            }
           
            System.out.println("paras:::::" + paras);

            BOInstance oldInstance = refreshBO.refreshContext(id);
            String newKeyValue = null;
            int i = 1;
            for (Iterator it = updateService
                .retrieveParaServiceLinks().iterator(); it
                .hasNext();) {
              DOParameterService dops = (DOParameterService) it
                  .next();
              DOParameter dop = dops.getDop();
              String value = null;
              if (dop.getType() != null
                  && dop.getType().intValue() == DOParameter.TYPE_FORM
                  && dop.getDefaultValue() == null) {
                log.info("批量修改参数的名称:::" + dop.getName());
                value = paras.get(dop.getName());
                if ("".equals(value)) {
                  value = null;
                }
              } else {
                value = dop.getValue();
              }

              if (dop.getType() != null
                  && dop.getType().intValue() == DOParameter.TYPE_KEY) {
                newKeyValue = value;
              }
              value = dops.getAfterPattermValue(value);
              updateService.putStatementAValue(pstmt, i, dops,
                  value);
              i++;
            }
            batchSize++;
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

//    HbmDAO dao = new HbmDAO();
//    dao.setAutoClose(false);
    try {

      for (Iterator it = dops.iterator(); it.hasNext();) {
        DOParameterService aDop = (DOParameterService) it.next();
        boolean isLeft = false;
        for (int i = 0; i < paras.length; i++) {
          if (aDop.getDop().getName().equalsIgnoreCase(paras[i])) {
            isLeft = true;
            break;
          }
        }
        if (!isLeft) {
          String aPara = aDop.getDop().getName().toLowerCase() + ",";
          theSql = theSql.replaceAll(aPara, "");
          theSql = theSql.replaceAll("(\\,\\?\\))", ")");
          DAOUtil.INSTANCE().delete(aDop);
        }
      }
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

  private void setTempPara(String instanceUid, DOTreeModel treeModel,
      DOTreeModel selfLinkModel) {

    for (Iterator it = selfLinkModel.getService()
        .retrieveParaServiceLinks().iterator(); it.hasNext();) {
      DOParameterService dops = (DOParameterService) it.next();
      DOParameter dop = dops.getDop();
      if (dop.getParaBO().getObjUid()
          .equals(treeModel.getService().getBo().getObjUid())) {
        selfLinkModel.getService().addTempParaValue(dops, instanceUid);
        return;
      }
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

  private void setTempPara(String instanceUid, DOTreeModel treeModel,
      DOTreeModel selfLinkModel) {

    for (Iterator it = selfLinkModel.getService()
        .retrieveParaServiceLinks().iterator(); it.hasNext();) {
      DOParameterService dops = (DOParameterService) it.next();
      DOParameter dop = dops.getDop();
      if (dop.getParaBO().getObjUid().equals(
          treeModel.getService().getBo().getObjUid())) {
        selfLinkModel.getService().addTempParaValue(dops, instanceUid);
        return;
      }
View Full Code Here

Examples of com.exedosoft.plat.bo.DOParameterService

      aService.setMainSql(aServiceSql.toString());
      aService.setName(parentBO.getName() + "have" + curBO.getName());
      aService.setL10n(parentBO.getL10n() + "拥有的" + curBO.getL10n());
      DAOUtil.INSTANCE().store(aService);

      DOParameterService dps = new DOParameterService();
      dps.setDop(keyPara);
      dps.setDos(aService);
      dps.setOrderNum(new Integer(5));
      DAOUtil.INSTANCE().store(dps);

      DOService sInsert = DOService.getService(curBO.getName()
          + ".insert");
      log.info("Find the insert Service::" + sInsert.getName());
      DOParameterService paraInsert = DOParameterService
          .getDOParaService(propPara.getObjUid(), sInsert.getObjUid());
      if (paraInsert != null) {
        paraInsert.setDop(keyPara);
        DAOUtil.INSTANCE().store(paraInsert);
      }

      DOService sUpdate = DOService.getService(curBO.getName()
          + ".update");
      log.info("Find the update Service::" + sUpdate.getName());
      DOParameterService paraUpdate = DOParameterService
          .getDOParaService(propPara.getObjUid(), sUpdate.getObjUid());
      if (paraUpdate != null) {
        paraUpdate.setDop(keyPara);
        DAOUtil.INSTANCE().store(paraUpdate);
      }
     
   
      //////////////////////////////////////////end Business
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.