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

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


    this.driverClass = driverClass;
  }

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

    if (stringHasValue(userId)) {
      xmlElement.addAttribute(new Attribute("userId", userId)); //$NON-NLS-1$
    }
View Full Code Here


  }

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

    if (stringHasValue(userId)) {
      xmlElement.addAttribute(new Attribute("userId", userId)); //$NON-NLS-1$
    }
View Full Code Here

    XmlElement xmlElement = new XmlElement("jdbcConnection"); //$NON-NLS-1$
    xmlElement.addAttribute(new Attribute("driverClass", driverClass)); //$NON-NLS-1$
    xmlElement.addAttribute(new Attribute("connectionURL", connectionURL)); //$NON-NLS-1$

    if (stringHasValue(userId)) {
      xmlElement.addAttribute(new Attribute("userId", userId)); //$NON-NLS-1$
    }

    if (stringHasValue(password)) {
      xmlElement.addAttribute(new Attribute("password", password)); //$NON-NLS-1$
    }
View Full Code Here

    if (stringHasValue(userId)) {
      xmlElement.addAttribute(new Attribute("userId", userId)); //$NON-NLS-1$
    }

    if (stringHasValue(password)) {
      xmlElement.addAttribute(new Attribute("password", password)); //$NON-NLS-1$
    }

    addPropertyXmlElements(xmlElement);

    return xmlElement;
View Full Code Here

  }

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

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

    XmlElement outerisNotEmptyElement = new XmlElement("if");
    outerisNotEmptyElement.addAttribute(new Attribute("test", "limit != null and start != null"));
    outerisNotEmptyElement.addElement(new TextElement("<![CDATA[ select * from ( select row_.*, rownum rownum_ from ( ]]>"));
    answer.addElement(outerisNotEmptyElement);
View Full Code Here

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

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

    XmlElement outerisNotEmptyElement = new XmlElement("if");
    outerisNotEmptyElement.addAttribute(new Attribute("test", "limit != null and start != null"));
    outerisNotEmptyElement.addElement(new TextElement("<![CDATA[ select * from ( select row_.*, rownum rownum_ from ( ]]>"));
    answer.addElement(outerisNotEmptyElement);
    return answer;
  }

View Full Code Here

  }

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

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

    XmlElement outerisNotEmptyElement = new XmlElement("if");
    outerisNotEmptyElement.addAttribute(new Attribute("test", "limit != null and start != null"));
    outerisNotEmptyElement.addElement(new TextElement(
        "<![CDATA[ ) row_ where rownum <= (#{limit} + #{start}) ) where rownum_ > #{start} ]]>"));
View Full Code Here

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

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

    XmlElement outerisNotEmptyElement = new XmlElement("if");
    outerisNotEmptyElement.addAttribute(new Attribute("test", "limit != null and start != null"));
    outerisNotEmptyElement.addElement(new TextElement(
        "<![CDATA[ ) row_ where rownum <= (#{limit} + #{start}) ) where rownum_ > #{start} ]]>"));
    answer.addElement(outerisNotEmptyElement);
    return answer;
  }
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 outerisNotEmptyElement = new XmlElement("if");
    outerisNotEmptyElement.addAttribute(new Attribute("test", "limit != null and start != null"));
    outerisNotEmptyElement.addElement(new TextElement("<![CDATA[ limit #{start} , #{limit} ]]>"));
    answer.addElement(outerisNotEmptyElement);
View Full Code Here

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

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

    XmlElement outerisNotEmptyElement = new XmlElement("if");
    outerisNotEmptyElement.addAttribute(new Attribute("test", "limit != null and start != null"));
    outerisNotEmptyElement.addElement(new TextElement("<![CDATA[ limit #{start} , #{limit} ]]>"));
    answer.addElement(outerisNotEmptyElement);
    return answer;
  }
}
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.