java公用信息
Document document = new Document("-//mybatis.org//DTD Mapper 3.0//EN", "http://mybatis.org/dtd/mybatis-3-mapper.dtd");
XmlElement answer = new XmlElement("mapper");
String namespace = "com.github.codegenerator.Mapper";
answer.addAttribute(new Attribute("namespace", namespace));
document.setRootElement(answer);
- 实例: Field field = new Field("age", new JavaTypeInfo("java.lang.Integer"));
- 初始值: setInitializationString(String initializationString);
- transient: setTransient(boolean transient);
- volatile: setVolatile(boolean volatile);
XmlElement xmlElement = new XmlElement("select");
Attribute attribute = new Attribute("id", "findAll");
xmlElement.addAttribute(attribute);
TextElement textElement = new TextElement("select * from table");
xmlElement.addElement(textElement);
TextElement textElement = new TextElement("select * from table");
Attribute attribute = new Attribute("id", "update");