Package org.mybatis.generator.api.dom.xml

Examples of org.mybatis.generator.api.dom.xml.XmlElement.addAttribute()


    answer.addAttribute(new Attribute("id", "Oracle_Pagination_Tail")); //$NON-NLS-1$

    XmlElement dynamicElement = new XmlElement("dynamic");
    XmlElement outerisNotEmptyElement = new XmlElement("isNotNull");
    outerisNotEmptyElement.addAttribute(new Attribute("property", "limit"));
    XmlElement innerisNotEmptyElement = new XmlElement("isNotNull");
    innerisNotEmptyElement.addAttribute(new Attribute("property", "start"));
    innerisNotEmptyElement.addElement(new TextElement(
        "<![CDATA[ ) row_ where rownum <= (#limit# + #start#) ) where rownum_ > #start# ]]>"));
    outerisNotEmptyElement.addElement(innerisNotEmptyElement);
View Full Code Here


    XmlElement dynamicElement = new XmlElement("dynamic");
    XmlElement outerisNotEmptyElement = new XmlElement("isNotNull");
    outerisNotEmptyElement.addAttribute(new Attribute("property", "limit"));
    XmlElement innerisNotEmptyElement = new XmlElement("isNotNull");
    innerisNotEmptyElement.addAttribute(new Attribute("property", "start"));
    innerisNotEmptyElement.addElement(new TextElement(
        "<![CDATA[ ) row_ where rownum <= (#limit# + #start#) ) where rownum_ > #start# ]]>"));
    outerisNotEmptyElement.addElement(innerisNotEmptyElement);
    dynamicElement.addElement(outerisNotEmptyElement);
    answer.addElement(dynamicElement);
View Full Code Here

  }

  private XmlElement getMysqlLimit() {
    XmlElement answer = new XmlElement("sql"); //$NON-NLS-1$

    answer.addAttribute(new Attribute("id", "Mysql_Pagination_Limit")); //$NON-NLS-1$

    XmlElement dynamicElement = new XmlElement("dynamic");
    XmlElement outerisNotEmptyElement = new XmlElement("isNotNull");
    outerisNotEmptyElement.addAttribute(new Attribute("property", "limit"));
    XmlElement innerisNotEmptyElement = new XmlElement("isNotNull");
View Full Code Here

    answer.addAttribute(new Attribute("id", "Mysql_Pagination_Limit")); //$NON-NLS-1$

    XmlElement dynamicElement = new XmlElement("dynamic");
    XmlElement outerisNotEmptyElement = new XmlElement("isNotNull");
    outerisNotEmptyElement.addAttribute(new Attribute("property", "limit"));
    XmlElement innerisNotEmptyElement = new XmlElement("isNotNull");
    innerisNotEmptyElement.addAttribute(new Attribute("property", "start"));
    innerisNotEmptyElement.addElement(new TextElement("<![CDATA[ limit #start# , #limit# ]]>"));
    outerisNotEmptyElement.addElement(innerisNotEmptyElement);
    dynamicElement.addElement(outerisNotEmptyElement);
View Full Code Here

    XmlElement dynamicElement = new XmlElement("dynamic");
    XmlElement outerisNotEmptyElement = new XmlElement("isNotNull");
    outerisNotEmptyElement.addAttribute(new Attribute("property", "limit"));
    XmlElement innerisNotEmptyElement = new XmlElement("isNotNull");
    innerisNotEmptyElement.addAttribute(new Attribute("property", "start"));
    innerisNotEmptyElement.addElement(new TextElement("<![CDATA[ limit #start# , #limit# ]]>"));
    outerisNotEmptyElement.addElement(innerisNotEmptyElement);
    dynamicElement.addElement(outerisNotEmptyElement);
    answer.addElement(dynamicElement);
    return answer;
View Full Code Here

    }
  }

  public XmlElement toXmlElement() {
    XmlElement xmlElement = new XmlElement("columnRenamingRule"); //$NON-NLS-1$
    xmlElement.addAttribute(new Attribute("searchString", searchString)); //$NON-NLS-1$

    if (replaceString != null) {
      xmlElement.addAttribute(new Attribute("replaceString", replaceString)); //$NON-NLS-1$
    }
View Full Code Here

  public XmlElement toXmlElement() {
    XmlElement xmlElement = new XmlElement("columnRenamingRule"); //$NON-NLS-1$
    xmlElement.addAttribute(new Attribute("searchString", searchString)); //$NON-NLS-1$

    if (replaceString != null) {
      xmlElement.addAttribute(new Attribute("replaceString", replaceString)); //$NON-NLS-1$
    }

    return xmlElement;
  }
}
View Full Code Here

  }

  public XmlElement toXmlElement() {
    XmlElement answer = new XmlElement("javaTypeResolver"); //$NON-NLS-1$
    if (getConfigurationType() != null) {
      answer.addAttribute(new Attribute("type", getConfigurationType())); //$NON-NLS-1$
    }

    addPropertyXmlElements(answer);

    return answer;
View Full Code Here

    // 移除第一个
    Where_Clause.removeElement(0);

    StringBuilder sb = new StringBuilder();
    XmlElement dynamicElement = new XmlElement("trim"); //$NON-NLS-1$
    dynamicElement.addAttribute(new Attribute("prefix", "where")); //$NON-NLS-1$ //$NON-NLS-2$
    dynamicElement.addAttribute(new Attribute("prefixOverrides", "and|or")); //$NON-NLS-1$ //$NON-NLS-2$
    Where_Clause.addElement(dynamicElement);

    for (IntrospectedColumn introspectedColumn : introspectedTable.getNonPrimaryKeyColumns()) {
      XmlElement isNotNullElement = new XmlElement("if"); //$NON-NLS-1$
View Full Code Here

    Where_Clause.removeElement(0);

    StringBuilder sb = new StringBuilder();
    XmlElement dynamicElement = new XmlElement("trim"); //$NON-NLS-1$
    dynamicElement.addAttribute(new Attribute("prefix", "where")); //$NON-NLS-1$ //$NON-NLS-2$
    dynamicElement.addAttribute(new Attribute("prefixOverrides", "and|or")); //$NON-NLS-1$ //$NON-NLS-2$
    Where_Clause.addElement(dynamicElement);

    for (IntrospectedColumn introspectedColumn : introspectedTable.getNonPrimaryKeyColumns()) {
      XmlElement isNotNullElement = new XmlElement("if"); //$NON-NLS-1$
      if (isAllInOne) {
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.