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

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


    StringBuilder sb = new StringBuilder();
    sb.append("select * from "); //$NON-NLS-1$
    sb.append(introspectedTable
        .getAliasedFullyQualifiedTableNameAtRuntime());
    answer.addElement(new TextElement(sb.toString()));

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


          .getAliasedEscapedColumnName(introspectedColumn));
      sb.append(" = "); //$NON-NLS-1$
      sb.append(MyBatis3FormattingUtilities.getParameterClause(
          introspectedColumn, "")); //$NON-NLS-1$

      isNotNullElement.addElement(new TextElement(sb.toString()));

      whereElement.addElement(isNotNullElement);
    }
    answer.addElement(whereElement);
View Full Code Here

  public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(
      XmlElement element, IntrospectedTable introspectedTable)
  {
    XmlElement ifElement = new XmlElement("if");
    ifElement.addAttribute(new Attribute("test", "pageSize > 0"));
    ifElement.addElement(new TextElement("limit ${startIndex},${pageSize}"));
    element.addElement(ifElement);
    return true;
  }

  /**
 
View Full Code Here

  public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(
      XmlElement element, IntrospectedTable introspectedTable)
  {
    XmlElement ifElement = new XmlElement("if");
    ifElement.addAttribute(new Attribute("test", "pageSize > 0"));
    ifElement.addElement(new TextElement("limit ${startIndex},${pageSize}"));
    element.addElement(ifElement);
    return true;
  }
}
View Full Code Here

    XmlElement result = new XmlElement("result"); //$NON-NLS-1$
    result.addAttribute(new Attribute("name", "showIndex")); //$NON-NLS-1$
    TextElement text = new TextElement("/WEB-INF/jsp/"
        + recordLowerFullType + "/" + recordLowerFullType + ".jsp");
    result.addElement(text);
    action.addElement(result);

    result = new XmlElement("result"); //$NON-NLS-1$
    result.addAttribute(new Attribute("name", "showAdd")); //$NON-NLS-1$
    text = new TextElement("/WEB-INF/jsp/" + recordLowerFullType + "/add.jsp");
View Full Code Here

    action.addElement(result);

    result = new XmlElement("result"); //$NON-NLS-1$
    result.addAttribute(new Attribute("name", "showAdd")); //$NON-NLS-1$
    text = new TextElement("/WEB-INF/jsp/" + recordLowerFullType + "/add.jsp");
    result.addElement(text);
    action.addElement(result);

    result = new XmlElement("result"); //$NON-NLS-1$
    result.addAttribute(new Attribute("name", "showUpdate")); //$NON-NLS-1$
    text = new TextElement("/WEB-INF/jsp/" + recordLowerFullType + "/update.jsp");
View Full Code Here

    action.addElement(result);

    result = new XmlElement("result"); //$NON-NLS-1$
    result.addAttribute(new Attribute("name", "showUpdate")); //$NON-NLS-1$
    text = new TextElement("/WEB-INF/jsp/" + recordLowerFullType + "/update.jsp");
    result.addElement(text);
    action.addElement(result);

    parent.addElement(pkg);
  }
}
View Full Code Here

    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);

    element.addElement(new TextElement(")"));
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

    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);

    element.addElement(new TextElement(")"));
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.