本文整理汇总了Java中org.mybatis.generator.api.dom.java.Method.addSuppressTypeWarningsAnnotation方法的典型用法代码示例。如果您正苦于以下问题:Java Method.addSuppressTypeWarningsAnnotation方法的具体用法?Java Method.addSuppressTypeWarningsAnnotation怎么用?Java Method.addSuppressTypeWarningsAnnotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mybatis.generator.api.dom.java.Method
的用法示例。
在下文中一共展示了Method.addSuppressTypeWarningsAnnotation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addImplementationElements
import org.mybatis.generator.api.dom.java.Method; //导入方法依赖的package包/类
@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);
}
}
示例2: addImplementationElements
import org.mybatis.generator.api.dom.java.Method; //导入方法依赖的package包/类
@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);
}
}
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:26,代码来源:SelectByExampleWithoutBLOBsMethodGenerator.java
示例3: addImplementationElements
import org.mybatis.generator.api.dom.java.Method; //导入方法依赖的package包/类
@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);
}
}
开发者ID:nextyu,项目名称:summer-mybatis-generator,代码行数:27,代码来源:SelectByExampleWithBLOBsMethodGenerator.java
示例4: addImplementationElements
import org.mybatis.generator.api.dom.java.Method; //导入方法依赖的package包/类
@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);
}
}
开发者ID:nextyu,项目名称:summer-mybatis-generator,代码行数:27,代码来源:SelectByExampleWithoutBLOBsMethodGenerator.java