Examples of TableConfig


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

    gf.getGenerator().addTemplateRootDir(FileHelper.getFileByClassLoader("for_generate_by_table_config_set"));
    gf.generateByMap(map);
  }
 
  public void testload() throws IOException {
      TableConfig config = new TableConfigXmlBuilder().parseFromXML(FileHelper.getFileByClassLoader("for_test_table_config_xml_builder/pdc_card.xml"));
      OperationConfig oc = config.getOperation("getRealNameCardsByParentCardNo");
      assertTrue(oc.getSql().indexOf("WHERE parent_card_no = ?  AND status = ? AND type = 'R'") >= 0);
      assertFalse(oc.getSql(),oc.getSql().indexOf("<dynamic>") >= 0);
      assertTrue(oc.getSqlmap().indexOf("<dynamic>") >= 0);
      assertFalse(oc.getSqlmap().indexOf("WHERE parent_card_no = ?  AND status = ? AND type = 'R'") >= 0);
      for(Object item : config.getOperations()) {
      }
  }
View Full Code Here

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

    }
  }
 
    public TableConfig parseFromXML(InputStream inputStream) throws SAXException, IOException {
        NodeData nodeData = new XMLHelper().parseXML(inputStream);
        TableConfig config = new TableConfig();
       
        // table
        BeanHelper.copyProperties(config, nodeData.attributes,true);
       
        for(NodeData child : nodeData.childs) {
            // table/operation
            if("operation".equals(child.nodeName)) {
                OperationConfig target = new OperationConfig();
                BeanHelper.copyProperties(target, child.attributes,true);
                for(NodeData opChild : child.childs) {
                    // table/operation/extraparams
                    if("extraparams".equals(opChild.nodeName)) {
                        // table/operation/extraparams/param
                        for(NodeData paramNode : opChild.childs) {
                            ParamConfig mp = new ParamConfig();
                            BeanHelper.copyProperties(mp, paramNode.attributes,true);
                            target.extraparams.add(mp);
                        }
                    }else {
                        BeanHelper.setProperty(target, opChild.nodeName, getNodeValue(opChild));
                    }
                }
                config.operations.add(target);
            }
            // table/column
            if("column".equals(child.nodeName)) {
                ColumnConfig target = new ColumnConfig();
                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);
View Full Code Here

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

  @Override
    protected List<Map> getGeneratorContexts() {
        if("*".equals(tableSqlName)) {
            return toMaps(tableConfigSet.getTableConfigs());
        }else {
            TableConfig tableConfig = tableConfigSet.getBySqlName(tableSqlName);
            if(tableConfig == null) {
                log("根据表名"+tableSqlName+"没有找到配置文件");
                return null;
            }
            Map map = toMap(tableConfig);
View Full Code Here

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

            for(TableConfig tableConfig : tableConfigSet.getTableConfigs()) {
                result.addAll(toMaps(tableConfig));
            }
            return result;
        }else {
            TableConfig tableConfig = tableConfigSet.getBySqlName(tableSqlName);
            if(tableConfig == null) {
                log("根据表名"+tableSqlName+"没有找到配置文件");
                return null;
            }
            List<Map> result = toMaps(tableConfig);
View Full Code Here

Examples of com.threerings.parlor.data.TableConfig

    /**
     * Create the table config object that will be used.
     */
    protected TableConfig createTableConfig ()
    {
        return new TableConfig();
    }
View Full Code Here

Examples of org.drools.guvnor.client.rpc.TableConfig

    @Test
    @Deprecated
    public void testRuleTableLoad() throws Exception {
        ServiceImplementation impl = getServiceImplementation();
        RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
        TableConfig conf = impl.loadTableConfig( ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertNotNull( conf.headers );
        assertNotNull( conf.headerTypes );

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testRuleTableLoad",
View Full Code Here

Examples of org.drools.guvnor.client.rpc.TableConfig

   
    }

    public void testRuleTableLoad() throws Exception {
        ServiceImplementation impl = getService();
        TableConfig conf = impl.loadTableConfig( AssetItemGrid.RULE_LIST_TABLE_ID );
        assertNotNull( conf.headers );
        assertNotNull( conf.headerTypes );

        CategoryItem cat = impl.repository.loadCategory( "/" );
        cat.addCategory( "testRuleTableLoad",
View Full Code Here

Examples of org.drools.guvnor.client.rpc.TableConfig

        return localFormat.format(cal.getTime());
    }

    public TableConfig loadTableConfig() {
        final TableConfig config = new TableConfig();

        config.headers = ASSET_LIST.getHeaders();
        config.headerTypes = ASSET_LIST.getHeaderTypes();
        config.rowsPerPage = ROWS_PER_PAGE;
        return config;
View Full Code Here

Examples of org.drools.guvnor.client.rpc.TableConfig

    @Test
    @Deprecated
    public void testRuleTableLoad() throws Exception {
        ServiceImplementation impl = getServiceImplementation();
        RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
        TableConfig conf = impl.loadTableConfig( ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertNotNull( conf.headers );
        assertNotNull( conf.headerTypes );

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testRuleTableLoad",
View Full Code Here

Examples of org.drools.guvnor.client.rpc.TableConfig

    @Test
    @Deprecated
    public void testRuleTableLoad() throws Exception {
        ServiceImplementation impl = getServiceImplementation();
        RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
        TableConfig conf = impl.loadTableConfig( ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertNotNull( conf.headers );
        assertNotNull( conf.headerTypes );

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testRuleTableLoad",
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.