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

Examples of org.mybatis.generator.api.dom.java.Method.addParameter()


    importedTypes.add(type);
    Method method = new Method();
    method.setReturnType(new FullyQualifiedJavaType("int"));
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("delete");
    method.addParameter(new Parameter(type, "entity"))
    method.addJavaDocLine("/**\n" + "* @Description:\n" + "* @param entity\n" + "*/");
    interfaze.addImportedTypes(importedTypes);
    interfaze.addMethod(method);
  }

 
View Full Code Here


    importedTypes.add(returnType);
    Method method = new Method();
    method.setReturnType(returnType);
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("findPagination");
    method.addParameter(new Parameter(type, "queryMap"))
    method.addParameter(new Parameter(FullyQualifiedJavaType
        .getIntInstance(), "currentPage"));// int currentPage
    method.addParameter(new Parameter(FullyQualifiedJavaType
        .getIntInstance(), "pageSize"));// int pageSize
    method.addJavaDocLine("/**\n" + "* @Description:\n" + "* @param queryMap 查询参数\n"
View Full Code Here

    Method method = new Method();
    method.setReturnType(returnType);
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("findPagination");
    method.addParameter(new Parameter(type, "queryMap"))
    method.addParameter(new Parameter(FullyQualifiedJavaType
        .getIntInstance(), "currentPage"));// int currentPage
    method.addParameter(new Parameter(FullyQualifiedJavaType
        .getIntInstance(), "pageSize"));// int pageSize
    method.addJavaDocLine("/**\n" + "* @Description:\n" + "* @param queryMap 查询参数\n"
        + "* @param currentPage 当前页\n" + "* @param pageSize 每页大小\n" + "*/");
 
View Full Code Here

    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("findPagination");
    method.addParameter(new Parameter(type, "queryMap"))
    method.addParameter(new Parameter(FullyQualifiedJavaType
        .getIntInstance(), "currentPage"));// int currentPage
    method.addParameter(new Parameter(FullyQualifiedJavaType
        .getIntInstance(), "pageSize"));// int pageSize
    method.addJavaDocLine("/**\n" + "* @Description:\n" + "* @param queryMap 查询参数\n"
        + "* @param currentPage 当前页\n" + "* @param pageSize 每页大小\n" + "*/");
    interfaze.addImportedTypes(importedTypes);
    interfaze.addMethod(method);
 
View Full Code Here

    importedTypes.add(returnType);
    Method method = new Method();
    method.setReturnType(returnType);
    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("findById");
    method.addParameter(new Parameter(
        new FullyQualifiedJavaType("long"), "id"))
    method.addJavaDocLine("/**\n" + "* @Description:\n" + "* @param id\n" + "*/");
    interfaze.addImportedTypes(importedTypes);
    interfaze.addMethod(method);
  }
 
View Full Code Here

    method.setVisibility(JavaVisibility.PUBLIC);
    method.setName("findByCriteria");
    FullyQualifiedJavaType pType = new FullyQualifiedJavaType(
        introspectedTable.getExampleType());
    importedTypes.add(pType);
    method.addParameter(new Parameter(pType, "criteria"));
    method.addJavaDocLine("/**\n" + "* @Description:\n" + "*/");
    interfaze.addImportedTypes(importedTypes);
    interfaze.addMethod(method);
  }
 
 
View Full Code Here

    Method method = new Method();
    method.setVisibility(getExampleMethodVisibility());
    method.setReturnType(FullyQualifiedJavaType.getIntInstance());
    method.setName(getDAOMethodNameCalculator().getDeleteByExampleMethodName(introspectedTable));
    method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$

    for (FullyQualifiedJavaType fqjt : daoTemplate.getCheckedExceptions()) {
      method.addException(fqjt);
      importedTypes.add(fqjt);
    }
View Full Code Here

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

    for (FullyQualifiedJavaType fqjt : daoTemplate.getCheckedExceptions()) {
      method.addException(fqjt);
      importedTypes.add(fqjt);
    }
View Full Code Here

      returnType.addTypeArgument(fqjt);
    }
    method.setReturnType(returnType);

    method.setName(getDAOMethodNameCalculator().getSelectByExampleWithBLOBsMethodName(introspectedTable));
    method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$

    for (FullyQualifiedJavaType fqjt : daoTemplate.getCheckedExceptions()) {
      method.addException(fqjt);
      importedTypes.add(fqjt);
    }
View Full Code Here

    Method method = new Method();
    method.setVisibility(getExampleMethodVisibility());
    method.setReturnType(FullyQualifiedJavaType.getIntInstance());
    method.setName(getDAOMethodNameCalculator().getCountByExampleMethodName(introspectedTable));
    method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$

    for (FullyQualifiedJavaType fqjt : daoTemplate.getCheckedExceptions()) {
      method.addException(fqjt);
      importedTypes.add(fqjt);
    }
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.