Package org.mybatis.generator.api.dom.java

Examples of org.mybatis.generator.api.dom.java.Parameter


      } else {
        type.addTypeArgument(introspectedColumn.getFullyQualifiedJavaType());
      }
    }

    method.addParameter(new Parameter(type, "values")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append(introspectedColumn.getJavaProperty());
    sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
    sb.insert(0, "and"); //$NON-NLS-1$
    if (inMethod) {
View Full Code Here


    topLevelClass.addField(field);

    method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("setOrderByClause"); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "orderByClause")); //$NON-NLS-1$
    method.addBodyLine("this.orderByClause = orderByClause;"); //$NON-NLS-1$
    commentGenerator.addGeneralMethodComment(method, introspectedTable);
    topLevelClass.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.setName("getOrderByClause"); //$NON-NLS-1$
    method.addBodyLine("return orderByClause;"); //$NON-NLS-1$
    commentGenerator.addGeneralMethodComment(method, introspectedTable);
    topLevelClass.addMethod(method);

    // add field, getter, setter for distinct
    field = new Field();
    field.setVisibility(JavaVisibility.PROTECTED);
    field.setType(FullyQualifiedJavaType.getBooleanPrimitiveInstance());
    field.setName("distinct"); //$NON-NLS-1$
    commentGenerator.addFieldComment(field, introspectedTable);
    topLevelClass.addField(field);

    method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("setDistinct"); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getBooleanPrimitiveInstance(), "distinct")); //$NON-NLS-1$
    method.addBodyLine("this.distinct = distinct;"); //$NON-NLS-1$
    commentGenerator.addGeneralMethodComment(method, introspectedTable);
    topLevelClass.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getBooleanPrimitiveInstance());
    method.setName("isDistinct"); //$NON-NLS-1$
    method.addBodyLine("return distinct;"); //$NON-NLS-1$
    commentGenerator.addGeneralMethodComment(method, introspectedTable);
    topLevelClass.addMethod(method);

    // add field and methods for the list of ored criteria
    field = new Field();
    field.setVisibility(JavaVisibility.PROTECTED);

    FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType("java.util.List<Criteria>"); //$NON-NLS-1$
    field.setType(fqjt);
    field.setName("oredCriteria"); //$NON-NLS-1$
    commentGenerator.addFieldComment(field, introspectedTable);
    topLevelClass.addField(field);

    method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(fqjt);
    method.setName("getOredCriteria"); //$NON-NLS-1$
    method.addBodyLine("return oredCriteria;"); //$NON-NLS-1$
    commentGenerator.addGeneralMethodComment(method, introspectedTable);
    topLevelClass.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("or"); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getCriteriaInstance(), "criteria")); //$NON-NLS-1$
    method.addBodyLine("oredCriteria.add(criteria);"); //$NON-NLS-1$
    commentGenerator.addGeneralMethodComment(method, introspectedTable);
    topLevelClass.addMethod(method);

    method = new Method();
View Full Code Here

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("Criterion"); //$NON-NLS-1$
    method.setConstructor(true);
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addBodyLine("super();"); //$NON-NLS-1$
    method.addBodyLine("this.condition = condition;"); //$NON-NLS-1$
    method.addBodyLine("this.typeHandler = null;"); //$NON-NLS-1$
    method.addBodyLine("this.noValue = true;"); //$NON-NLS-1$
    answer.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("Criterion"); //$NON-NLS-1$
    method.setConstructor(true);
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "typeHandler")); //$NON-NLS-1$
    method.addBodyLine("super();"); //$NON-NLS-1$
    method.addBodyLine("this.condition = condition;"); //$NON-NLS-1$
    method.addBodyLine("this.value = value;"); //$NON-NLS-1$
    method.addBodyLine("this.typeHandler = typeHandler;"); //$NON-NLS-1$
    method.addBodyLine("if (value instanceof List<?>) {"); //$NON-NLS-1$
    method.addBodyLine("this.listValue = true;"); //$NON-NLS-1$
    method.addBodyLine("} else {"); //$NON-NLS-1$
    method.addBodyLine("this.singleValue = true;"); //$NON-NLS-1$
    method.addBodyLine("}"); //$NON-NLS-1$
    answer.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("Criterion"); //$NON-NLS-1$
    method.setConstructor(true);
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value")); //$NON-NLS-1$
    method.addBodyLine("this(condition, value, null);"); //$NON-NLS-1$
    answer.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("Criterion"); //$NON-NLS-1$
    method.setConstructor(true);
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "secondValue")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "typeHandler")); //$NON-NLS-1$
    method.addBodyLine("super();"); //$NON-NLS-1$
    method.addBodyLine("this.condition = condition;"); //$NON-NLS-1$
    method.addBodyLine("this.value = value;"); //$NON-NLS-1$
    method.addBodyLine("this.secondValue = secondValue;"); //$NON-NLS-1$
    method.addBodyLine("this.typeHandler = typeHandler;"); //$NON-NLS-1$
    method.addBodyLine("this.betweenValue = true;"); //$NON-NLS-1$
    answer.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("Criterion"); //$NON-NLS-1$
    method.setConstructor(true);
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "secondValue")); //$NON-NLS-1$
    method.addBodyLine("this(condition, value, secondValue, null);"); //$NON-NLS-1$
    answer.addMethod(method);

    return answer;
  }
View Full Code Here

    // now add the methods for simplifying the individual field set methods
    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("addCriterion"); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addBodyLine("if (condition == null) {"); //$NON-NLS-1$
    method.addBodyLine("throw new RuntimeException(\"Value for condition cannot be null\");"); //$NON-NLS-1$
    method.addBodyLine("}"); //$NON-NLS-1$
    method.addBodyLine("criteria.add(new Criterion(condition));"); //$NON-NLS-1$
    if (criteriaLists.size() > 1) {
      method.addBodyLine("allCriteria = null;"); //$NON-NLS-1$
    }
    answer.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("addCriterion"); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
    method.addBodyLine("if (value == null) {"); //$NON-NLS-1$
    method.addBodyLine("throw new RuntimeException(\"Value for \" + property + \" cannot be null\");"); //$NON-NLS-1$
    method.addBodyLine("}"); //$NON-NLS-1$
    method.addBodyLine("criteria.add(new Criterion(condition, value));"); //$NON-NLS-1$
    if (criteriaLists.size() > 1) {
      method.addBodyLine("allCriteria = null;"); //$NON-NLS-1$
    }
    answer.addMethod(method);

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName("addCriterion"); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value1")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value2")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
    method.addBodyLine("if (value1 == null || value2 == null) {"); //$NON-NLS-1$
    method.addBodyLine("throw new RuntimeException(\"Between values for \" + property + \" cannot be null\");"); //$NON-NLS-1$
    method.addBodyLine("}"); //$NON-NLS-1$
    method.addBodyLine("criteria.add(new Criterion(condition, value1, value2));"); //$NON-NLS-1$
    if (criteriaLists.size() > 1) {
      method.addBodyLine("allCriteria = null;"); //$NON-NLS-1$
    }
    answer.addMethod(method);

    FullyQualifiedJavaType listOfDates = new FullyQualifiedJavaType("java.util.List<java.util.Date>"); //$NON-NLS-1$

    if (introspectedTable.hasJDBCDateColumns()) {
      topLevelClass.addImportedType(FullyQualifiedJavaType.getDateInstance());
      topLevelClass.addImportedType(FullyQualifiedJavaType.getNewIteratorInstance());
      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setName("addCriterionForJDBCDate"); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getDateInstance(), "value")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
      method.addBodyLine("if (value == null) {"); //$NON-NLS-1$
      method.addBodyLine("throw new RuntimeException(\"Value for \" + property + \" cannot be null\");"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("addCriterion(condition, new java.sql.Date(value.getTime()), property);"); //$NON-NLS-1$
      answer.addMethod(method);

      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setName("addCriterionForJDBCDate"); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
      method.addParameter(new Parameter(listOfDates, "values")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
      method.addBodyLine("if (values == null || values.size() == 0) {"); //$NON-NLS-1$
      method.addBodyLine("throw new RuntimeException(\"Value list for \" + property + \" cannot be null or empty\");"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();"); //$NON-NLS-1$
      method.addBodyLine("Iterator<Date> iter = values.iterator();"); //$NON-NLS-1$
      method.addBodyLine("while (iter.hasNext()) {"); //$NON-NLS-1$
      method.addBodyLine("dateList.add(new java.sql.Date(iter.next().getTime()));"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("addCriterion(condition, dateList, property);"); //$NON-NLS-1$
      answer.addMethod(method);

      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setName("addCriterionForJDBCDate"); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getDateInstance(), "value1")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getDateInstance(), "value2")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
      method.addBodyLine("if (value1 == null || value2 == null) {"); //$NON-NLS-1$
      method.addBodyLine("throw new RuntimeException(\"Between values for \" + property + \" cannot be null\");"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);"); //$NON-NLS-1$
      answer.addMethod(method);
    }

    if (introspectedTable.hasJDBCTimeColumns()) {
      topLevelClass.addImportedType(FullyQualifiedJavaType.getDateInstance());
      topLevelClass.addImportedType(FullyQualifiedJavaType.getNewIteratorInstance());
      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setName("addCriterionForJDBCTime"); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getDateInstance(), "value")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
      method.addBodyLine("if (value == null) {"); //$NON-NLS-1$
      method.addBodyLine("throw new RuntimeException(\"Value for \" + property + \" cannot be null\");"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("addCriterion(condition, new java.sql.Time(value.getTime()), property);"); //$NON-NLS-1$
      answer.addMethod(method);

      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setName("addCriterionForJDBCTime"); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
      method.addParameter(new Parameter(listOfDates, "values")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
      method.addBodyLine("if (values == null || values.size() == 0) {"); //$NON-NLS-1$
      method.addBodyLine("throw new RuntimeException(\"Value list for \" + property + \" cannot be null or empty\");"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("List<java.sql.Time> timeList = new ArrayList<java.sql.Time>();"); //$NON-NLS-1$
      method.addBodyLine("Iterator<Date> iter = values.iterator();"); //$NON-NLS-1$
      method.addBodyLine("while (iter.hasNext()) {"); //$NON-NLS-1$
      method.addBodyLine("timeList.add(new java.sql.Time(iter.next().getTime()));"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("addCriterion(condition, timeList, property);"); //$NON-NLS-1$
      answer.addMethod(method);

      method = new Method();
      method.setVisibility(JavaVisibility.PROTECTED);
      method.setName("addCriterionForJDBCTime"); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getDateInstance(), "value1")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getDateInstance(), "value2")); //$NON-NLS-1$
      method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
      method.addBodyLine("if (value1 == null || value2 == null) {"); //$NON-NLS-1$
      method.addBodyLine("throw new RuntimeException(\"Between values for \" + property + \" cannot be null\");"); //$NON-NLS-1$
      method.addBodyLine("}"); //$NON-NLS-1$
      method.addBodyLine("addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property);"); //$NON-NLS-1$
      answer.addMethod(method);
View Full Code Here

  }

  private Method getSingleValueMethod(IntrospectedColumn introspectedColumn, String nameFragment, String operator) {
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.addParameter(new Parameter(introspectedColumn.getFullyQualifiedJavaType(), "value")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append(introspectedColumn.getJavaProperty());
    sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
    sb.insert(0, "and"); //$NON-NLS-1$
    sb.append(nameFragment);
View Full Code Here

  private Method getSetBetweenOrNotBetweenMethod(IntrospectedColumn introspectedColumn, boolean betweenMethod) {
    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    FullyQualifiedJavaType type = introspectedColumn.getFullyQualifiedJavaType();

    method.addParameter(new Parameter(type, "value1")); //$NON-NLS-1$
    method.addParameter(new Parameter(type, "value2")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append(introspectedColumn.getJavaProperty());
    sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
    sb.insert(0, "and"); //$NON-NLS-1$
    if (betweenMethod) {
View Full Code Here

      type.addTypeArgument(introspectedColumn.getFullyQualifiedJavaType().getPrimitiveTypeWrapper());
    } else {
      type.addTypeArgument(introspectedColumn.getFullyQualifiedJavaType());
    }

    method.addParameter(new Parameter(type, "values")); //$NON-NLS-1$
    StringBuilder sb = new StringBuilder();
    sb.append(introspectedColumn.getJavaProperty());
    sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
    sb.insert(0, "and"); //$NON-NLS-1$
    if (inMethod) {
View Full Code Here

    sb.append(introspectedColumn.getJavaProperty());
    sb.setCharAt(3, Character.toUpperCase(sb.charAt(3)));
    sb.append("Criterion"); //$NON-NLS-1$

    method.setName(sb.toString());
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getObjectInstance(), "value")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
    method.addBodyLine("if (value == null) {"); //$NON-NLS-1$
    method.addBodyLine("throw new RuntimeException(\"Value for \" + property + \" cannot be null\");"); //$NON-NLS-1$
    method.addBodyLine("}"); //$NON-NLS-1$

    method.addBodyLine(String.format("%s.add(new Criterion(condition, value, \"%s\"));", //$NON-NLS-1$
        field.getName(), introspectedColumn.getTypeHandler()));
    method.addBodyLine("allCriteria = null;"); //$NON-NLS-1$
    innerClass.addMethod(method);

    sb.setLength(0);
    sb.append("add"); //$NON-NLS-1$
    sb.append(introspectedColumn.getJavaProperty());
    sb.setCharAt(3, Character.toUpperCase(sb.charAt(3)));
    sb.append("Criterion"); //$NON-NLS-1$

    method = new Method();
    method.setVisibility(JavaVisibility.PROTECTED);
    method.setName(sb.toString());
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "condition")); //$NON-NLS-1$
    method.addParameter(new Parameter(introspectedColumn.getFullyQualifiedJavaType(), "value1")); //$NON-NLS-1$
    method.addParameter(new Parameter(introspectedColumn.getFullyQualifiedJavaType(), "value2")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getStringInstance(), "property")); //$NON-NLS-1$
    method.addBodyLine("if (value1 == null || value2 == null) {"); //$NON-NLS-1$
    method.addBodyLine("throw new RuntimeException(\"Between values for \" + property + \" cannot be null\");"); //$NON-NLS-1$
    method.addBodyLine("}"); //$NON-NLS-1$

    method.addBodyLine(String.format("%s.add(new Criterion(condition, value1, value2, \"%s\"));", //$NON-NLS-1$
View Full Code Here

    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getIntInstance());
    method.setName(introspectedTable.getUpdateByExampleSelectiveStatementId());

    FullyQualifiedJavaType parameterType = introspectedTable.getRules().calculateAllFieldsClass();
    method.addParameter(new Parameter(parameterType, "record", "@Param(\"record\")")); //$NON-NLS-1$ //$NON-NLS-2$
    importedTypes.add(parameterType);

    FullyQualifiedJavaType exampleType = new FullyQualifiedJavaType(introspectedTable.getExampleType());
    method.addParameter(new Parameter(exampleType, "example", "@Param(\"example\")")); //$NON-NLS-1$ //$NON-NLS-2$
    importedTypes.add(exampleType);

    importedTypes.add(new FullyQualifiedJavaType("org.apache.ibatis.annotations.Param")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable,"根据条件更新属性不为空的记录");
View Full Code Here

    Method method = new Method();
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getIntInstance());
    method.setName(introspectedTable.getUpdateByPrimaryKeyStatementId());
    method.addParameter(new Parameter(parameterType, "record")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable, "根据主键更新记录");

    addMapperAnnotations(interfaze, method);
View Full Code Here

TOP

Related Classes of org.mybatis.generator.api.dom.java.Parameter

Copyright © 2018 www.massapicom. 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.