org.mybatis.generator.api.dom.java.Method.addSuppressTypeWarningsAnnotation()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.8k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中org.mybatis.generator.api.dom.java.Method.addSuppressTypeWarningsAnnotation()方法的一些代码示例,展示了Method.addSuppressTypeWarningsAnnotation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Method.addSuppressTypeWarningsAnnotation()方法的具体详情如下:
包路径:org.mybatis.generator.api.dom.java.Method
类名称:Method
方法名:addSuppressTypeWarningsAnnotation

Method.addSuppressTypeWarningsAnnotation介绍

暂无

代码示例

代码示例来源:origin: roncoo/roncoo-mybatis-generator

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable
      .getIbatis2SqlMapNamespace(), introspectedTable
      .getSelectByExampleWithBLOBsStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithBLOBsMethodGenerated(method,
          topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: handosme/mybatis-generator-plus

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable
      .getIbatis2SqlMapNamespace(), introspectedTable
      .getSelectByExampleStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithoutBLOBsMethodGenerated(method,
          topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: cxjava/mybatis-generator-core

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable.getIbatis2SqlMapNamespace(),
      introspectedTable.getSelectByExampleWithBLOBsStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithBLOBsMethodGenerated(method, topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: roncoo/roncoo-mybatis-generator

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable
      .getIbatis2SqlMapNamespace(), introspectedTable
      .getSelectByExampleStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithoutBLOBsMethodGenerated(method,
          topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: cxjava/mybatis-generator-core

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable.getIbatis2SqlMapNamespace(),
      introspectedTable.getSelectByExampleStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins().clientSelectByExampleWithoutBLOBsMethodGenerated(method, topLevelClass,
      introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: org.mybatis.generator/mybatis-generator-core

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addAnnotation("@Override"); //$NON-NLS-1$
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable
      .getIbatis2SqlMapNamespace(), introspectedTable
      .getSelectByExampleWithBLOBsStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithBLOBsMethodGenerated(method,
          topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: handosme/mybatis-generator-plus

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable
      .getIbatis2SqlMapNamespace(), introspectedTable
      .getSelectByExampleWithBLOBsStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithBLOBsMethodGenerated(method,
          topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

代码示例来源:origin: org.mybatis.generator/mybatis-generator-core

@Override
public void addImplementationElements(TopLevelClass topLevelClass) {
  Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
  Method method = getMethodShell(importedTypes);
  if (generateForJava5) {
    method.addSuppressTypeWarningsAnnotation();
    method.addAnnotation("@Override"); //$NON-NLS-1$
  }
  StringBuilder sb = new StringBuilder();
  sb.append(method.getReturnType().getShortName());
  sb.append(" list = "); //$NON-NLS-1$
  sb.append(daoTemplate.getQueryForListMethod(introspectedTable
      .getIbatis2SqlMapNamespace(), introspectedTable
      .getSelectByExampleStatementId(), "example")); //$NON-NLS-1$
  method.addBodyLine(sb.toString());
  method.addBodyLine("return list;"); //$NON-NLS-1$
  if (context.getPlugins()
      .clientSelectByExampleWithoutBLOBsMethodGenerated(method,
          topLevelClass, introspectedTable)) {
    topLevelClass.addImportedTypes(importedTypes);
    topLevelClass.addMethod(method);
  }
}

相关文章