Package com.exedosoft.plat.bo

Examples of com.exedosoft.plat.bo.DOBOProperty


    BOInstance propertyInstance = boProperty.getCorrInstance();
    if(propertyInstance==null){
      this.setEchoValue(I18n.instance().get("没有数据!"));
      return NO_FORWARD;
    }
    DOBOProperty dop = DOBOProperty.getDOBOPropertyByID(propertyInstance.getUid());
    DOBO thisBO = DOBO.getDOBOByID(instance.getUid());
   
    PropertyManager pm = new PropertyManager();
    pm.removeProperty(thisBO, dop);
    return DEFAULT_FORWARD;
View Full Code Here


   
    /////服务的属性 原来是aService.retrieveProperties
    for (Iterator itProp = aService.getBo().retrieveProperties().iterator(); itProp
        .hasNext();) {

      DOBOProperty prop = (DOBOProperty) itProp.next();
      if (prop.isKeyCol()) {
        continue;
      }
      DOFormModel formM = new DOFormModel();
      formM.setRelationProperty(prop);
     
      ///// 这一块从,multi_tenancy_column 这个表中取
     

      formM.setL10n("");
     
      /**
       *  * 客户端验证配置,分为3部分,以;隔开 1,类型:Integer RealNumber EMail Text Others 2, 长度 3,
         * 其他Script 约束
         *
       */
       
     
      if (prop.isNumberType()) {
        String  exedoType = "RealNumber";
        formM.setExedojoType(exedoType);
      }else if(!prop.isDateOrTimeType()){
        formM.setExedojoType(";"+ prop.getDbSize().intValue());
      }

      if(multiL10ns.get(prop.getColName())!=null){
        formM.setL10n(multiL10ns.get(prop.getColName()));
      }else{
        formM.setL10n(prop.getColName());
      }
      formM.setGridModel(gridM);

     
      formM.setOrderNum(Integer.valueOf(i * 5));
      if (prop.isDateOrTimeType()) {
        if (aName.endsWith("browse") || aName.endsWith("list")) {
          formM.setController(formValueDate);
        } else {
          formM.setController(formDateMy97);
        }
      } else {
        if (aName.endsWith("browse") || aName.endsWith("list")) {
          formM.setController(formValueSimple);
        } else {
         
          if(prop.getDbSize()!=null && prop.getDbSize().intValue()>500){
            formM.setController(formTextArea);
            formM.setIsNewLine(DOFormModel.NEWLINE_YES);
          }else{
            formM.setController(formInputText);
          }
        }

      }
     
      if(prop.getColName().equalsIgnoreCase("eversion")){
        formM.setController(formHidden);
          formM.setIsHidden(DOFormModel.HIDDEN_YES);
        formM.setDefaultValue("1");
        formM.setIsOutGridAction(DOFormModel.OUTGRID_LEFT);
      }
View Full Code Here

    pmCondition.setLinkUID(conditionGrid.getObjUid());
    DAOUtil.INSTANCE().store(pmCondition);

    int i = 1;
    for (Iterator<DOBOProperty> it = properties.iterator(); it.hasNext(); i = i + 5) {
      DOBOProperty p = it.next();
      if (!p.isKeyCol()) {
        DOFormModel fm = new DOFormModel();
        DOFormModel old = DOFormModel.getFormModelByProperty(p
            .getObjUid());
        if (old != null) {
          fm.setL10n(old.getL10n());
        } else {
          fm.setL10n(p.getL10n());
        }
        fm.setRelationProperty(p);
        fm.setGridModel(conditionGrid);
        fm.setOrderNum(Integer.valueOf(i));
        fm.setIsNull(DOFormModel.NULL_YES);
        if (p.isDateOrTimeType()) {
          fm.setController(formDateMy97);
        } else {
          fm.setController(formInputText);
        }

        if (p.isInt() || p.isLong()) {
          fm.setExedojoType("Integer");
        } else if (p.isNumberType()) {
          fm.setExedojoType("RealNumber");
        }
        DAOUtil.INSTANCE().store(fm);
      }
    }
View Full Code Here

    pmResult.setLinkUID(gmResult.getObjUid());
    pmResult = DAOUtil.INSTANCE().store(pmResult);

    i = 1;
    for (Iterator<DOBOProperty> it = properties.iterator(); it.hasNext(); i = i + 5) {
      DOBOProperty p = it.next();
      if (!p.isKeyCol()) {
        DOFormModel fm = new DOFormModel();
        DOFormModel old = DOFormModel.getFormModelByProperty(p
            .getObjUid());
        if (old != null) {
          fm.setL10n(old.getL10n());
        } else {
          fm.setL10n(p.getL10n());
        }
        fm.setRelationProperty(p);
        fm.setGridModel(gmResult);
        fm.setIsNull(DOFormModel.NULL_YES);
        fm.setOrderNum(Integer.valueOf(i));

        if (p.isDateOrTimeType()) {
          fm.setController(formValueDate);
        } else {
          fm.setController(formValueSimple);
        }
        DAOUtil.INSTANCE().store(fm);
View Full Code Here

    // ///服务的属性 原来是aService.retrieveProperties
    for (Iterator itProp = aService.getBo().retrieveProperties().iterator(); itProp
        .hasNext();) {

      DOBOProperty prop = (DOBOProperty) itProp.next();
      if (prop.isKeyCol()) {
        continue;
      }
      DOFormModel formM = new DOFormModel();
      formM.setRelationProperty(prop);

      /**
       * * 客户端验证配置,分为3部分,以;隔开 1,类型:Integer RealNumber EMail Text Others 2,
       * 长度 3, 其他Script 约束
       *
       */

      if (prop.isNumberType()) {

        String exedoType = "RealNumber";
        formM.setExedojoType(exedoType);
      } else if (!prop.isDateOrTimeType()) {
        formM.setExedojoType(";"
            + (int) (prop.getDbSize().intValue() / 2));
      }

      formM.setL10n(prop.getColName());
      formM.setGridModel(gridM);

      formM.setOrderNum(Integer.valueOf(i * 5));
      if (prop.isDateOrTimeType()) {
        if ("".equals(aName)) {
          formM.setController(formValueDate);
        } else {
          formM.setController(formDateMy97);
        }
      } else {
        if ("".equals(aName)) {
          formM.setController(formValueSimple);
        } else {

          if (prop.getDbSize() != null
              && prop.getDbSize().intValue() > 500) {
            formM.setController(formTextArea);
            formM.setIsNewLine(DOFormModel.NEWLINE_YES);
          } else {
            formM.setController(formInputText);
          }
View Full Code Here

    log.info("正在生成服务和参数关联SQL:");

    List<String> list = new ArrayList<String>();

    for (Iterator itCol = allProps.iterator(); itCol.hasNext();) {
      DOBOProperty property = (DOBOProperty) itCol.next();
      if (!this.keyCol.equals(property.getColName().toLowerCase())) {
        list.add(property.getColName());
      }
    }

    boolean hasEversion = false;
    for (Iterator<String> itCol = list.iterator(); itCol.hasNext();) {

      String property = itCol.next();
      modiSql.append(property); // /colname
      if (property.equalsIgnoreCase("eversion")) {
        hasEversion = true;
        modiSql.append("=eversion+1");
      } else {
        modiSql.append("=?");
      }
View Full Code Here

    int order = 1;
    String modiParaUid = null;
    String eversionUid = null;
    for (Iterator itCol = allProps.iterator(); itCol.hasNext();) {
      DOBOProperty property = (DOBOProperty) itCol.next();

      if (this.keyCol.equals(property.getColName().toLowerCase())
          && (isNew == null)) {// ///察看情况

        String paraUid = this.getParaUidByProp(property.getObjUid(),
            DOParameter.TYPE_CURRENT);
        addParaRelationStr(stmt2, serviceUid, order, paraUid);

      } else if (this.keyCol.equals(property.getColName().toLowerCase())
          && (isNew != null) && !isNew.booleanValue()) {// /修改情况
        // /////////这句话的意思是放到最后执行
        modiParaUid = this.getParaUidByProp(property.getObjUid(),
            DOParameter.TYPE_CURRENT);
        continue;
      } else if (this.keyCol.equals(property.getColName().toLowerCase())
          && (isNew != null) && isNew.booleanValue()) {// /新增的情况
        String paraUid = this.getParaUidByProp(property.getObjUid(),
            DOParameter.TYPE_KEY);
        addParaRelationStr(stmt2, serviceUid, order, paraUid);
      } else if (property.getColName().equalsIgnoreCase("eversion")
          && (isNew != null) && isNew.booleanValue()) {
        eversionUid = this.getParaUidByProp(property.getObjUid(),
            DOParameter.TYPE_FORM);
        continue;
      } else {

        String paraUid = this.getParaUidByProp(property.getObjUid(),
            DOParameter.TYPE_FORM);
        addParaRelationStr(stmt2, serviceUid, order, paraUid);

      }
      order++;
View Full Code Here

   * @param type
   */
  public void addProperty(DOBO aDOBO, String colName, String l10n,int type,int size) {

    // 增加属性
    DOBOProperty pro = new DOBOProperty();
    try {
      pro.setColName(colName);
      pro.setL10n(l10n);
      pro.setDbType(type);
      pro.setDbSize(size);
      pro.setDoBO(aDOBO);
      pro.setPropName(colName);
      DAOUtil.INSTANCE().store(pro);

      // 增加参数

      DOParameter dop = new DOParameter();
View Full Code Here

    List<DOBOProperty> lists = DAOUtil.INSTANCE().select(DOBOProperty.class, "select * from DO_BO_Property  where col_name = ?", propertyName);
   
    ////可以根据外键关系创建主子表的关联关系
    try {
      for(Iterator<DOBOProperty> it = lists.iterator(); it.hasNext();){
        DOBOProperty dop = it.next();
        if(dop.getLinkBO()==null){
          dop.setLinkBO(aBO);
          DAOUtil.INSTANCE().store(dop);
        }
        List<DOFormModel>  forms = DAOUtil.INSTANCE().select(DOFormModel.class, "select * from DO_UI_FormModel  where relationPropertyUid = ?", dop.getObjUid());
        for(Iterator<DOFormModel>  itFm = forms.iterator(); itFm.hasNext();){
          DOFormModel fm = itFm.next();
          if(fm.getLinkService()==null){
            if(fm.getGridModel().getName().toLowerCase().contains("browse") || fm.getGridModel().getName().toLowerCase().contains("_list") || fm.getGridModel().getName().toLowerCase().contains("_result") ){
              fm.setLinkService(aBO.getDSeleByIdService());
View Full Code Here

    } else {

      List<StringLengthSort> list = new ArrayList<StringLengthSort>();
      // /////////////////////业务对象表单的值替换
      for (Iterator it = boProperties.iterator(); it.hasNext();) {
        DOBOProperty property = (DOBOProperty) it.next();
        String varName = property.getColName();
        list.add(new StringLengthSort(varName));
      }
      Collections.sort(list);

      for (Iterator<StringLengthSort> it = list.iterator(); it.hasNext();) {
View Full Code Here

TOP

Related Classes of com.exedosoft.plat.bo.DOBOProperty

Copyright © 2018 www.massapicom. 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.