Examples of SQLConfig


Examples of cn.org.rapid_framework.generator.ext.tableconfig.model.TableConfig.SqlConfig

    public void test_include_sql_by_refid() throws Exception {
        g.setTemplateRootDir(FileHelper.getFileByClassLoader("for_generate_by_sql"));
        File file = FileHelper.getFileByClassLoader("cn/org/rapid_framework/generator/ext/tableconfig/user_info.xml");
        TableConfig t = new TableConfigXmlBuilder().parseFromXML(file);
        System.out.println(t.getIncludeSqls());
        SqlConfig metaSql = t.getIncludeSqls().get(0);
        assertEquals(metaSql.sql.trim(),"<![CDATA[ USER_ID ,USERNAME ,PASSWORD ,BIRTH_DATE ,SEX ,AGE  ]]>");
    }
View Full Code Here

Examples of cn.org.rapid_framework.generator.ext.tableconfig.model.TableConfig.SqlConfig

                BeanHelper.copyProperties(target, child.attributes,true);
                config.columns.add(target);
            }
            // table/sql
            if("sql".equals(child.nodeName)) {
                SqlConfig target = new SqlConfig();
                BeanHelper.copyProperties(target, child.attributes,true);
                target.setSql(getNodeValue(child));
                config.addSqlConfig(target);
            }
            // table/resultmap
            if("resultmap".equals(child.nodeName)) {
                ResultMapConfig target = new ResultMapConfig();
                BeanHelper.copyProperties(target, child.attributes,true);
                // table/resultmap/column
                for(NodeData c : child.childs) {
                    if("column".equals(c.nodeName)) {
                        ColumnConfig column = new ColumnConfig();
                        BeanHelper.copyProperties(column, c.attributes,true);
                        target.getColumns().add(column);
                    }
                }
                config.resultMaps.add(target);
            }
        }
View Full Code Here

Examples of org.wso2.carbon.dataservices.core.description.config.SQLConfig

  }
 
  public boolean isDatabaseConnectionStatsAvailable(String configId) {
    Config config = this.getDataService().getConfig(configId);
    if (config instanceof SQLConfig) {
      SQLConfig sqlConfig = (SQLConfig) config;
      return sqlConfig.isStatsAvailable();
    } else {
      return false;
    }
  }
View Full Code Here

Examples of org.wso2.carbon.dataservices.core.description.config.SQLConfig

  }
 
  public int getOpenDatabaseConnectionsCount(String configId) {
    Config config = this.getDataService().getConfig(configId);
    if (config instanceof SQLConfig) {
      SQLConfig sqlConfig = (SQLConfig) config;
      return sqlConfig.getActiveConnectionCount();
    } else {
      return -1;
    }
  }
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.