本文整理汇总了Java中org.mybatis.generator.codegen.XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID属性的典型用法代码示例。如果您正苦于以下问题:Java XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID属性的具体用法?Java XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID怎么用?Java XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.mybatis.generator.codegen.XmlConstants
的用法示例。
在下文中一共展示了XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: contextGenerateAdditionalXmlFiles
@Override
public List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles(IntrospectedTable introspectedTable) {
Document document = new Document(XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID, XmlConstants.IBATIS2_SQL_MAP_SYSTEM_ID);
XmlElement answer = new XmlElement("sqlMap"); //$NON-NLS-1$
document.setRootElement(answer);
answer.addAttribute(new Attribute("namespace", //$NON-NLS-1$
"common"));
if (databaseType.contains("oracle")) {
answer.addElement(getOracleHead());
answer.addElement(getOracleTail());
} else if (databaseType.contains("mysql")) {
answer.addElement(getMysqlLimit());
}
GeneratedXmlFile gxf = new GeneratedXmlFile(document, properties.getProperty("fileName", "common_SqlMap.xml"), //$NON-NLS-1$ //$NON-NLS-2$
context.getSqlMapGeneratorConfiguration().getTargetPackage(), //$NON-NLS-1$
context.getSqlMapGeneratorConfiguration().getTargetProject(), //$NON-NLS-1$
false);
List<GeneratedXmlFile> files = new ArrayList<GeneratedXmlFile>(1);
files.add(gxf);
return files;
}
示例2: getDocument
@Override
public Document getDocument() {
Document document = new Document(
XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID,
XmlConstants.IBATIS2_SQL_MAP_SYSTEM_ID);
document.setRootElement(getSqlMapElement());
if (!context.getPlugins().sqlMapDocumentGenerated(document,
introspectedTable)) {
document = null;
}
return document;
}
示例3: getDocument
@Override
public Document getDocument() {
Document document = new Document(XmlConstants.IBATIS2_SQL_MAP_PUBLIC_ID, XmlConstants.IBATIS2_SQL_MAP_SYSTEM_ID);
document.setRootElement(getSqlMapElement());
if (!context.getPlugins().sqlMapDocumentGenerated(document, introspectedTable)) {
document = null;
}
return document;
}