Examples of DOBOProperty


Examples of com.exedosoft.plat.bo.DOBOProperty

   
    /////服务的属性 原来是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(formTimeC);
        }
      } else {
        if ("".equals(aName)) {
          formM.setController(formValueTextC);
        } else {
         
          if(prop.getDbSize()!=null && prop.getDbSize().intValue()>500){
            formM.setController(formTextArea);
            formM.setIsNewLine(DOFormModel.NEWLINE_YES);
          }else{
            formM.setController(formTextC);
          }
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

      String metaName = rsMeta.getColumnName(col).toLowerCase().trim();

      String tableName = rsMeta.getTableName(col);

      DOBOProperty property = DOBOProperty.getDOBOPropertyByName(
          tableName, metaName);
      if (property == null) {
        property = new DOBOProperty();
        property.setDbType(rsMeta.getColumnType(col));
      }

      instance.putMetaProperty(metaName, property);

      if (rsMeta.getColumnType(col) == Types.BLOB
          || rsMeta.getColumnType(col) == Types.LONGVARBINARY) {
        log.info("The BLOB COLUMN::::::::::::::" + metaName);
        continue;
      }
     
      // /DOBOProperty 获取定义的DOBOProperty

      Object oValue = rs.getObject(col);

      try {
        if (oValue != null) {
          if (property.isInt()) {

            try {
              instance.putValue(metaName, new Integer(rs
                  .getInt(col)));
            } catch (Exception e) {
              instance.putValue(metaName, rs
                  .getString(col));
            }
          } else if (property.isLong()) {

            try {
              instance.putValue(metaName, new Long(rs
                  .getLong(col)));
            } catch (Exception e) {
              instance.putValue(metaName, rs
                  .getString(col));
            }
          } else if (property.isDouble()) {
            double dd = rs.getDouble(col);
            instance.putValue(metaName, new Double(dd));
          } else if (property.isDateType()) {
            instance.putValue(metaName, rs.getDate(col));
          } else if (property.isTimestampType()) {
            instance.putValue(metaName, rs.getTimestamp(col));
          } else if (property.isString() || property.isClobType()) {
            // try {
            if (rs.getString(col) != null) {
              if (ds != null && ds.getL10n().equals("---")) {

                instance.putValue(metaName, StringUtil
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

        mainSql = this.getModiSql(props, table);
        isNew = Boolean.FALSE;
        break;

      case 3:
        DOBOProperty property = DOBOProperty.getDOBOPropertyByName(bo.getName(),
            "objuid");
        System.out.println("BOBOBO::::::" + bo);
        System.out.println("Property::::::" + property);

        if (property == null) {
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

    StringBuffer insertSql = new StringBuffer();
    insertSql.append("insert into ").append(table).append("(");
    log.info("正在生成服务和参数关联SQL:");
    for (Iterator itCol = allProps.iterator(); itCol.hasNext();) {
      DOBOProperty property = (DOBOProperty) itCol.next();
      insertSql.append(property.getColName()); // /colname
      if (itCol.hasNext()) {
        insertSql.append(",");
      } else {
        insertSql.append(")");
      }
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

    StringBuffer modiSql = new StringBuffer();
    modiSql.append("update ").append(table).append(" set ");
    log.info("正在生成服务和参数关联SQL:");
    for (Iterator itCol = allProps.iterator(); itCol.hasNext();) {
      DOBOProperty property = (DOBOProperty) itCol.next();

      if (!"objuid".equals(property.getColName().toLowerCase())) {

        modiSql.append(property.getColName()); // /colname
        modiSql.append("=?");
        if (itCol.hasNext()) {
          modiSql.append(",");
        } else {
          modiSql.append(" where objuid = ? ");
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

      String serviceUid, Boolean isNew) throws SQLException {

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

      if ("objuid".equals(property.getColName()) && (isNew == null)) {// ///察看情况

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

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

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

      }
      order++;
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

        serviceType = "7";
        isNew = Boolean.FALSE;
        break;

      case 3:
        DOBOProperty property = DOBOProperty.getDOBOPropertyByName(bo
            .getName(), this.keyCol);
        if (property == null || property.getColName() == null) {
          return;
        }
        name = prefix + "_delete";
        l10n = name;
        props.add(property);
        mainSql = new StringBuffer("delete from ").append(table)
            .append(" where ").append(this.keyCol).append(" = ?");
        serviceType = "5";
        break;
      case 4:
        property = DOBOProperty.getDOBOPropertyByName(bo.getName(),
            this.keyCol);
        if (property == null || property.getColName() == null) {
          return;
        }
        name = prefix + "_browse";
        l10n = name;
        props.add(property);
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

    StringBuffer insertSql = new StringBuffer();
    insertSql.append("insert into ").append(table).append("(");
    log.info("正在生成服务和参数关联SQL:");
    for (Iterator itCol = allProps.iterator(); itCol.hasNext();) {
      DOBOProperty property = (DOBOProperty) itCol.next();
      insertSql.append(property.getColName()); // /colname
      if (itCol.hasNext()) {
        insertSql.append(",");
      } else {
        insertSql.append(")");
      }
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

    // /先确定删除的
    List list = selected.retrieveProperties();
    List propCols = new ArrayList();

    for (Iterator it = list.iterator(); it.hasNext();) {
      DOBOProperty dop = (DOBOProperty) it.next();
      if (dop.getIsPersistence() == null
          || dop.getIsPersistence().intValue() == DOBOProperty.PERSISTENCE_YES) {
        propCols.add(dop.getObjUid());
      }
    }
    List removeCols = new ArrayList(propCols);

    System.out.println("AllCols::" + removeCols);

    removeCols.removeAll(listHiddenKeys);
    // //需要删除的字段propCols

    System.out.println("RemoveCols::" + removeCols);

    for (int i = 0; i < removeCols.size(); i++) {
      String colObjuid = (String) removeCols.get(i);
      DOBOProperty dop = DOBOProperty.getDOBOPropertyByID(colObjuid);

      StringBuffer sb = new StringBuffer("alter table ");
      sb.append(selected.getSqlStr()).append(" drop column ").append(
          dop.getColName());

      listSql.add(sb.toString());

      pm.removeProperty(selected, dop);
    }

    // 先确定新增的

    for (int len = 0; len < key_hiddens.length; len++) {

      String keyHidden = key_hiddens[len];
      if (keyHidden == null || keyHidden.equals("")) {
        if (colNames[len] != null && !colNames[len].equals("")) {
          DOBOProperty dopExists =  DOBOProperty.getDOBOPropertyByName(selected.getName(),
              colNames[len]);
          if (dopExists==null || dopExists.getColName()==null) {

            StringBuffer sb = new StringBuffer("alter table ");
            sb.append(selected.getSqlStr()).append(" add  ")
                .append(colNames[len]).append(" ").append(
                    dbtypes[len]);
View Full Code Here

Examples of com.exedosoft.plat.bo.DOBOProperty

    String aField = this.actionForm.getValue("qingxuanzelianjiedeshuxing");
    log.info("Field::" + aField);

   
    DOBOProperty prop = DOBOProperty.getDOBOPropertyByID(aField);
    DOParameter propPara = DOParameter.getParameterByProperty(prop,DOParameter.TYPE_FORM);
   
    DOBOProperty parentKey = DOBOProperty.getDOBOPropertyByName(parentBO.getName(),parentBO
        .getKeyCol());
    DOParameter keyPara = DOParameter.getParameterByProperty(
        parentKey, DOParameter.TYPE_CURRENT);

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.