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

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


  protected XmlElement getBlobColumnListElement(
      IntrospectedTable introspectedTable)
  {
    XmlElement answer = new XmlElement("include"); //$NON-NLS-1$
    answer.addAttribute(new Attribute("refid", //$NON-NLS-1$
        introspectedTable.getBlobColumnListId()));
    return answer;
  }

  /**
 
View Full Code Here


        "select * from (select a.*, rownum rn from ("));
    element.addElement(new TextElement(") a"));

    XmlElement whereElement_1 = new XmlElement("where");
    XmlElement ifElement_1 = new XmlElement("if");
    ifElement_1.addAttribute(new Attribute("test",
        "startIndex != null and pageSize != null"));
    ifElement_1.addElement(new TextElement(
        "rownum <= (${startIndex} + ${pageSize})"));
    whereElement_1.addElement(ifElement_1);
    element.addElement(whereElement_1);
View Full Code Here

    element.addElement(new TextElement(")"));

    XmlElement whereElement_2 = new XmlElement("where");
    XmlElement ifElement_2 = new XmlElement("if");
    ifElement_2.addAttribute(new Attribute("test", "startIndex != null"));
    ifElement_2.addElement(new TextElement("rn >= ${startIndex}"));
    whereElement_2.addElement(ifElement_2);
    element.addElement(whereElement_2);

    return true;
View Full Code Here

        "select * from (select a.*, rownum rn from ("));
    element.addElement(new TextElement(") a"));

    XmlElement whereElement_1 = new XmlElement("where");
    XmlElement ifElement_1 = new XmlElement("if");
    ifElement_1.addAttribute(new Attribute("test",
        "startIndex != null and pageSize != null"));
    ifElement_1.addElement(new TextElement(
        "rownum <= (${startIndex} + ${pageSize})"));
    whereElement_1.addElement(ifElement_1);
    element.addElement(whereElement_1);
View Full Code Here

    element.addElement(new TextElement(")"));

    XmlElement whereElement_2 = new XmlElement("where");
    XmlElement ifElement_2 = new XmlElement("if");
    ifElement_2.addAttribute(new Attribute("test", "startIndex != null"));
    ifElement_2.addElement(new TextElement("rn >= ${startIndex}"));
    whereElement_2.addElement(ifElement_2);
    element.addElement(whereElement_2);

    return true;
View Full Code Here

    try
    {
      props.load(new FileInputStream(new File(this.getClass()
          .getResource("/com/eatle/persistent/generator/generatorConfig.properties").toURI())));
      XmlElement selectKeyElement = new XmlElement("selectKey");
      selectKeyElement.addAttribute(new Attribute("resultType", "long"));
      selectKeyElement.addAttribute(new Attribute("keyProperty", "id"));
      selectKeyElement.addAttribute(new Attribute("order", "BEFORE"));
      selectKeyElement.addElement(new TextElement("select "
          + props.getProperty("sequenceName")
          + ".NEXTVAL as ID from dual "));
View Full Code Here

    {
      props.load(new FileInputStream(new File(this.getClass()
          .getResource("/com/eatle/persistent/generator/generatorConfig.properties").toURI())));
      XmlElement selectKeyElement = new XmlElement("selectKey");
      selectKeyElement.addAttribute(new Attribute("resultType", "long"));
      selectKeyElement.addAttribute(new Attribute("keyProperty", "id"));
      selectKeyElement.addAttribute(new Attribute("order", "BEFORE"));
      selectKeyElement.addElement(new TextElement("select "
          + props.getProperty("sequenceName")
          + ".NEXTVAL as ID from dual "));
View Full Code Here

      props.load(new FileInputStream(new File(this.getClass()
          .getResource("/com/eatle/persistent/generator/generatorConfig.properties").toURI())));
      XmlElement selectKeyElement = new XmlElement("selectKey");
      selectKeyElement.addAttribute(new Attribute("resultType", "long"));
      selectKeyElement.addAttribute(new Attribute("keyProperty", "id"));
      selectKeyElement.addAttribute(new Attribute("order", "BEFORE"));
      selectKeyElement.addElement(new TextElement("select "
          + props.getProperty("sequenceName")
          + ".NEXTVAL as ID from dual "));

      element.addElement(selectKeyElement);
View Full Code Here

    if (!updateByExampleStatementEnabled) {
      xmlElement.addAttribute(new Attribute("enableUpdateByExample", "false")); //$NON-NLS-1$ //$NON-NLS-2$
    }

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

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

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

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

    if (configuredModelType != null) {
      xmlElement.addAttribute(new Attribute("modelType", configuredModelType)); //$NON-NLS-1$
    }
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.