当前位置: 首页>>代码示例>>Java>>正文


Java SqlMapGeneratorConfiguration类代码示例

本文整理汇总了Java中org.mybatis.generator.config.SqlMapGeneratorConfiguration的典型用法代码示例。如果您正苦于以下问题:Java SqlMapGeneratorConfiguration类的具体用法?Java SqlMapGeneratorConfiguration怎么用?Java SqlMapGeneratorConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SqlMapGeneratorConfiguration类属于org.mybatis.generator.config包,在下文中一共展示了SqlMapGeneratorConfiguration类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: calculateSqlMapPackage

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
/**
 * Calculate sql map package.
 *
 * @return the string
 */
protected String calculateSqlMapPackage() {
    StringBuilder sb = new StringBuilder();
    SqlMapGeneratorConfiguration config = context
            .getSqlMapGeneratorConfiguration();
    
    // config can be null if the Java client does not require XML
    if (config != null) {
        sb.append(config.getTargetPackage());
        sb.append(fullyQualifiedTable.getSubPackageForClientOrSqlMap(isSubPackagesEnabled(config)));
        if (stringHasValue(tableConfiguration.getMapperName())) {
            String mapperName = tableConfiguration.getMapperName();
            int ind = mapperName.lastIndexOf('.');
            if (ind != -1) {
                sb.append('.').append(mapperName.substring(0, ind));
            }
        }
    }

    return sb.toString();
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:26,代码来源:IntrospectedTable.java

示例2: parseSqlMapGenerator

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
protected 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);
        }
    }
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:26,代码来源:MyBatisGeneratorConfigurationParser.java

示例3: parseSqlMapGenerator

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:backkoms,项目名称:mybatis-generator-comments,代码行数:26,代码来源:IbatorConfigurationParser.java

示例4: parseSqlMapGenerator

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
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);
		}
	}
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:26,代码来源:IbatorConfigurationParser.java

示例5: calculateSqlMapPackage

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
/**
 * Calculate sql map package.
 *
 * @return the string
 */
protected String calculateSqlMapPackage() {
    StringBuilder sb = new StringBuilder();
    SqlMapGeneratorConfiguration config = context
            .getSqlMapGeneratorConfiguration();
    
    // config can be null if the Java client does not require XML
    if (config != null) {
        sb.append(config.getTargetPackage());
        sb.append(fullyQualifiedTable.getSubPackage(isSubPackagesEnabled(config)));
    }

    return sb.toString();
}
 
开发者ID:backkoms,项目名称:mybatis-generator-comments,代码行数:19,代码来源:IntrospectedTable.java

示例6: calculateSqlMapPackage

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
protected String calculateSqlMapPackage() {
    StringBuilder sb = new StringBuilder();
    SqlMapGeneratorConfiguration config = context
            .getSqlMapGeneratorConfiguration();
    
    // config can be null if the Java client does not require XML
    if (config != null) {
        sb.append(config.getTargetPackage());
        sb.append(fullyQualifiedTable.getSubPackage(isSubPackagesEnabled(config)));
    }

    return sb.toString();
}
 
开发者ID:funny5258,项目名称:autocode,代码行数:14,代码来源:IntrospectedTable.java

示例7: sqlMapGenerated

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
@Override
public boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable) {
  SqlMapGeneratorConfiguration smgc = context.getSqlMapGeneratorConfiguration();
  try {
    Document document = (Document) FieldUtils.readDeclaredField(sqlMap, "document", true);
    File targetFile = getTargetFile(smgc.getTargetPackage(), sqlMap.getFileName());
    if (!targetFile.exists()) { // 第一次生成直接使用当前生成的文件
      return true;
    }
    visitAndMerge(document, targetFile);
  } catch (ShellException | IOException | IllegalAccessException | DocumentException e) {
    e.printStackTrace();
  }
  return true;
}
 
开发者ID:beihaifeiwu,项目名称:dolphin,代码行数:16,代码来源:ContentMergePlugin.java

示例8: calculateIbatis2SqlMapPackage

import org.mybatis.generator.config.SqlMapGeneratorConfiguration; //导入依赖的package包/类
protected String calculateIbatis2SqlMapPackage() {
	StringBuilder sb = new StringBuilder();
	SqlMapGeneratorConfiguration config = context.getSqlMapGeneratorConfiguration();

	// config can be null if the Java client does not require XML
	if (config != null) {
		sb.append(config.getTargetPackage());
		if (isTrue(config.getProperty(PropertyRegistry.ANY_ENABLE_SUB_PACKAGES))) {
			sb.append(fullyQualifiedTable.getSubPackage());
		}
	}

	return sb.toString();
}
 
开发者ID:fnyexx,项目名称:mybator,代码行数:15,代码来源:IntrospectedTable.java


注:本文中的org.mybatis.generator.config.SqlMapGeneratorConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。