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

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


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

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

    if (wildcardEscapingEnabled) {
      xmlElement.addAttribute(new Attribute("escapeWildcards", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here


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

    if (wildcardEscapingEnabled) {
      xmlElement.addAttribute(new Attribute("escapeWildcards", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    if (isAllColumnDelimitingEnabled) {
      xmlElement.addAttribute(new Attribute("delimitAllColumns", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

    if (wildcardEscapingEnabled) {
      xmlElement.addAttribute(new Attribute("escapeWildcards", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    if (isAllColumnDelimitingEnabled) {
      xmlElement.addAttribute(new Attribute("delimitAllColumns", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }

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

    if (isAllColumnDelimitingEnabled) {
      xmlElement.addAttribute(new Attribute("delimitAllColumns", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    if (delimitIdentifiers) {
      xmlElement.addAttribute(new Attribute("delimitIdentifiers", "true")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    addPropertyXmlElements(xmlElement);

    if (generatedKey != null) {
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$
        String va = introspectedColumn.getJavaProperty("condition.") + " != null";
View Full Code Here

    Where_Clause.addElement(dynamicElement);

    for (IntrospectedColumn introspectedColumn : introspectedTable.getNonPrimaryKeyColumns()) {
      XmlElement isNotNullElement = new XmlElement("if"); //$NON-NLS-1$
        String va = introspectedColumn.getJavaProperty("condition.") + " != null";
        isNotNullElement.addAttribute(new Attribute("test", va)); //$NON-NLS-1$ //$NON-NLS-2$
      dynamicElement.addElement(isNotNullElement);

      sb.setLength(0);
      sb.append(" and "); //$NON-NLS-1$
      sb.append(Ibatis2FormattingUtilities.getEscapedColumnName(introspectedColumn));
View Full Code Here

  @Override
  public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element,
      IntrospectedTable introspectedTable) {
    if (databaseType.contains("oracle")) {
      XmlElement oracleHeadIncludeElement = new XmlElement("include");
      oracleHeadIncludeElement.addAttribute(new Attribute("refid", "common.Oracle_Pagination_Head"));
      // 在第一个地方增加
      element.addElement(0, oracleHeadIncludeElement);

      XmlElement oracleTailIncludeElement = new XmlElement("include");
      oracleTailIncludeElement.addAttribute(new Attribute("refid", "common.Oracle_Pagination_Tail"));
View Full Code Here

      oracleHeadIncludeElement.addAttribute(new Attribute("refid", "common.Oracle_Pagination_Head"));
      // 在第一个地方增加
      element.addElement(0, oracleHeadIncludeElement);

      XmlElement oracleTailIncludeElement = new XmlElement("include");
      oracleTailIncludeElement.addAttribute(new Attribute("refid", "common.Oracle_Pagination_Tail"));
      // 在最后增加
      element.addElement(element.getElements().size(), oracleTailIncludeElement);
    } else if (databaseType.contains("mysql")) {
      XmlElement mysqlLimitIncludeElement = new XmlElement("include");
      mysqlLimitIncludeElement.addAttribute(new Attribute("refid", "common.Mysql_Pagination_Limit"));
View Full Code Here

      oracleTailIncludeElement.addAttribute(new Attribute("refid", "common.Oracle_Pagination_Tail"));
      // 在最后增加
      element.addElement(element.getElements().size(), oracleTailIncludeElement);
    } else if (databaseType.contains("mysql")) {
      XmlElement mysqlLimitIncludeElement = new XmlElement("include");
      mysqlLimitIncludeElement.addAttribute(new Attribute("refid", "common.Mysql_Pagination_Limit"));
      // 在最后增加
      element.addElement(element.getElements().size(), mysqlLimitIncludeElement);
    }
    return true;
  }
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.