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

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


    method.setConstructor(true);
    method.setName(topLevelClass.getType().getShortName());
    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    for (IntrospectedColumn introspectedColumn : introspectedTable.getAllColumns()) {
      method.addParameter(new Parameter(introspectedColumn.getFullyQualifiedJavaType(), introspectedColumn
          .getJavaProperty()));
    }

    boolean comma = false;
    StringBuilder sb = new StringBuilder();
View Full Code Here


    importedTypes.add(fqjt);

    Method method = new Method(introspectedTable.getUpdateByPrimaryKeySelectiveStatementId());
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.addParameter(new Parameter(fqjt, "record")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    method.addBodyLine("BEGIN();"); //$NON-NLS-1$
View Full Code Here

    importedTypes.add(fqjt);

    Method method = new Method(introspectedTable.getCountByExampleStatementId());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.addParameter(new Parameter(fqjt, "example")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    method.addBodyLine("BEGIN();"); //$NON-NLS-1$
    method.addBodyLine("SELECT(\"count(*)\");"); //$NON-NLS-1$
View Full Code Here

    method.setName(topLevelClass.getType().getShortName());
    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    StringBuilder sb = new StringBuilder();
    for (IntrospectedColumn introspectedColumn : introspectedTable.getPrimaryKeyColumns()) {
      method.addParameter(new Parameter(introspectedColumn.getFullyQualifiedJavaType(), introspectedColumn
          .getJavaProperty()));
      sb.setLength(0);
      sb.append("this."); //$NON-NLS-1$
      sb.append(introspectedColumn.getJavaProperty());
      sb.append(" = "); //$NON-NLS-1$
View Full Code Here

    importedTypes.add(fqjt);

    Method method = new Method(introspectedTable.getInsertSelectiveStatementId());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.addParameter(new Parameter(fqjt, "record")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    method.addBodyLine("BEGIN();"); //$NON-NLS-1$
    method.addBodyLine(String.format("INSERT_INTO(\"%s\");", //$NON-NLS-1$
View Full Code Here

    importedTypes.add(new FullyQualifiedJavaType("java.util.Map")); //$NON-NLS-1$

    Method method = new Method(introspectedTable.getUpdateByExampleSelectiveStatementId());
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.addParameter(new Parameter(new FullyQualifiedJavaType(
        "java.util.Map<java.lang.String, java.lang.Object>"), //$NON-NLS-1$
        "parameter")); //$NON-NLS-1$

    FullyQualifiedJavaType record = introspectedTable.getRules().calculateAllFieldsClass();
    importedTypes.add(record);
View Full Code Here

    importedTypes.add(fqjt);

    Method method = new Method(getMethodName());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.addParameter(new Parameter(fqjt, "example")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    method.addBodyLine("BEGIN();"); //$NON-NLS-1$
View Full Code Here

    importedTypes.add(new FullyQualifiedJavaType("java.util.Map")); //$NON-NLS-1$

    Method method = new Method(getMethodName());
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.addParameter(new Parameter(new FullyQualifiedJavaType(
        "java.util.Map<java.lang.String, java.lang.Object>"), //$NON-NLS-1$
        "parameter")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);
View Full Code Here

    importedTypes.add(new FullyQualifiedJavaType(String.format("%s.Criteria", fqjt.getFullyQualifiedName()))); //$NON-NLS-1$
    importedTypes.add(new FullyQualifiedJavaType(String.format("%s.Criterion", fqjt.getFullyQualifiedName()))); //$NON-NLS-1$

    Method method = new Method("applyWhere"); //$NON-NLS-1$
    method.setVisibility(JavaVisibility.PROTECTED);
    method.addParameter(new Parameter(fqjt, "example")); //$NON-NLS-1$
    method.addParameter(new Parameter(FullyQualifiedJavaType.getBooleanPrimitiveInstance(), "includeExamplePhrase")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    for (String methodLine : methodLines) {
      method.addBodyLine(methodLine);
View Full Code Here

    importedTypes.add(fqjt);

    Method method = new Method(introspectedTable.getDeleteByExampleStatementId());
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setReturnType(FullyQualifiedJavaType.getStringInstance());
    method.addParameter(new Parameter(fqjt, "example")); //$NON-NLS-1$

    context.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);

    method.addBodyLine("BEGIN();"); //$NON-NLS-1$
    method.addBodyLine(String.format("DELETE_FROM(\"%s\");", //$NON-NLS-1$
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.