Java Code Examples for org.mybatis.generator.config.SqlMapGeneratorConfiguration#setTargetProject()

The following examples show how to use org.mybatis.generator.config.SqlMapGeneratorConfiguration#setTargetProject() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyBatisGeneratorConfigurationParser.java    From mapper-generator-javafx with Apache License 2.0 6 votes vote down vote up
protected void parseSqlMapGenerator(Context context, Node node) {
    SqlMapGeneratorConfiguration sqlMapGeneratorConfiguration = new SqlMapGeneratorConfiguration();

    context.setSqlMapGeneratorConfiguration(sqlMapGeneratorConfiguration);

    Properties attributes = parseAttributes(node);
    String targetPackage = attributes.getProperty("targetPackage");
    String targetProject = attributes.getProperty("targetProject");

    sqlMapGeneratorConfiguration.setTargetPackage(targetPackage);
    sqlMapGeneratorConfiguration.setTargetProject(targetProject);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
        Node childNode = nodeList.item(i);

        if (childNode.getNodeType() != Node.ELEMENT_NODE) {
            continue;
        }

        if ("property".equals(childNode.getNodeName())) {
            parseProperty(sqlMapGeneratorConfiguration, childNode);
        }
    }
}
 
Example 2
Source File: IbatorConfigurationParser.java    From mybatis-generator-core-fix with Apache License 2.0 6 votes vote down vote up
private void parseSqlMapGenerator(Context context, Node node) {
    SqlMapGeneratorConfiguration sqlMapGeneratorConfiguration = new SqlMapGeneratorConfiguration();

    context.setSqlMapGeneratorConfiguration(sqlMapGeneratorConfiguration);

    Properties attributes = parseAttributes(node);
    String targetPackage = attributes.getProperty("targetPackage"); //$NON-NLS-1$
    String targetProject = attributes.getProperty("targetProject"); //$NON-NLS-1$

    sqlMapGeneratorConfiguration.setTargetPackage(targetPackage);
    sqlMapGeneratorConfiguration.setTargetProject(targetProject);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
        Node childNode = nodeList.item(i);

        if (childNode.getNodeType() != Node.ELEMENT_NODE) {
            continue;
        }

        if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
            parseProperty(sqlMapGeneratorConfiguration, childNode);
        }
    }
}
 
Example 3
Source File: MyBatisGeneratorConfigurationParser.java    From mybatis-generator-core-fix with Apache License 2.0 6 votes vote down vote up
private void parseSqlMapGenerator(Context context, Node node) {
    SqlMapGeneratorConfiguration sqlMapGeneratorConfiguration = new SqlMapGeneratorConfiguration();

    context.setSqlMapGeneratorConfiguration(sqlMapGeneratorConfiguration);

    Properties attributes = parseAttributes(node);
    String targetPackage = attributes.getProperty("targetPackage"); //$NON-NLS-1$
    String targetProject = attributes.getProperty("targetProject"); //$NON-NLS-1$

    sqlMapGeneratorConfiguration.setTargetPackage(targetPackage);
    sqlMapGeneratorConfiguration.setTargetProject(targetProject);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
        Node childNode = nodeList.item(i);

        if (childNode.getNodeType() != Node.ELEMENT_NODE) {
            continue;
        }

        if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
            parseProperty(sqlMapGeneratorConfiguration, childNode);
        }
    }
}
 
Example 4
Source File: IbatorConfigurationParser.java    From mybatis-generator-plus with Apache License 2.0 6 votes vote down vote up
private void parseSqlMapGenerator(Context context, Node node) {
    SqlMapGeneratorConfiguration sqlMapGeneratorConfiguration = new SqlMapGeneratorConfiguration();

    context.setSqlMapGeneratorConfiguration(sqlMapGeneratorConfiguration);

    Properties attributes = parseAttributes(node);
    String targetPackage = attributes.getProperty("targetPackage"); //$NON-NLS-1$
    String targetProject = attributes.getProperty("targetProject"); //$NON-NLS-1$

    sqlMapGeneratorConfiguration.setTargetPackage(targetPackage);
    sqlMapGeneratorConfiguration.setTargetProject(targetProject);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
        Node childNode = nodeList.item(i);

        if (childNode.getNodeType() != Node.ELEMENT_NODE) {
            continue;
        }

        if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
            parseProperty(sqlMapGeneratorConfiguration, childNode);
        }
    }
}
 
Example 5
Source File: MyBatisGeneratorConfigurationParser.java    From mybatis-generator-plus with Apache License 2.0 6 votes vote down vote up
private void parseSqlMapGenerator(Context context, Node node) {
    SqlMapGeneratorConfiguration sqlMapGeneratorConfiguration = new SqlMapGeneratorConfiguration();

    context.setSqlMapGeneratorConfiguration(sqlMapGeneratorConfiguration);

    Properties attributes = parseAttributes(node);
    String targetPackage = attributes.getProperty("targetPackage"); //$NON-NLS-1$
    String targetProject = attributes.getProperty("targetProject"); //$NON-NLS-1$

    sqlMapGeneratorConfiguration.setTargetPackage(targetPackage);
    sqlMapGeneratorConfiguration.setTargetProject(targetProject);

    NodeList nodeList = node.getChildNodes();
    for (int i = 0; i < nodeList.getLength(); i++) {
        Node childNode = nodeList.item(i);

        if (childNode.getNodeType() != Node.ELEMENT_NODE) {
            continue;
        }

        if ("property".equals(childNode.getNodeName())) { //$NON-NLS-1$
            parseProperty(sqlMapGeneratorConfiguration, childNode);
        }
    }
}