本文整理汇总了Java中org.mybatis.generator.api.dom.java.Interface.addMethod方法的典型用法代码示例。如果您正苦于以下问题:Java Interface.addMethod方法的具体用法?Java Interface.addMethod怎么用?Java Interface.addMethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mybatis.generator.api.dom.java.Interface
的用法示例。
在下文中一共展示了Interface.addMethod方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clientUpdateByPrimaryKeySelectiveMethodGenerated
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(
Method method, Interface interfaze,
IntrospectedTable introspectedTable) {
if (ignore(introspectedTable)) {
return true;
}
Method m = new Method();
m.setName("updateByPrimaryKeySelectiveWithVersion");
copyMethod(m, method, null);
m.addParameter(new Parameter(new FullyQualifiedJavaType(
"java.lang.Integer"), "version", "@Param(\"version\")"));
m.addException(new FullyQualifiedJavaType(optimisticLockException));
interfaze.addMethod(m);
interfaze.addImportedType(new FullyQualifiedJavaType(optimisticLockException));
return true;
}
示例2: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = new Method();
method.setReturnType(FullyQualifiedJavaType.getIntInstance());
method.setVisibility(JavaVisibility.PUBLIC);
method.setName(introspectedTable.getInsertSelectiveStatementId());
FullyQualifiedJavaType parameterType = introspectedTable.getRules()
.calculateAllFieldsClass();
importedTypes.add(parameterType);
method.addParameter(new Parameter(parameterType, "record")); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodComment(method,
introspectedTable);
addMapperAnnotations(interfaze, method);
if (context.getPlugins().clientInsertSelectiveMethodGenerated(
method, interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
开发者ID:xiachengwei5,项目名称:org.mybatis.generator.core-1.3.5,代码行数:27,代码来源:InsertSelectiveMethodGenerator.java
示例3: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
FullyQualifiedJavaType fqjt = new FullyQualifiedJavaType(
introspectedTable.getExampleType());
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
importedTypes.add(fqjt);
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setReturnType(new FullyQualifiedJavaType("long")); //$NON-NLS-1$
method.setName(introspectedTable.getCountByExampleStatementId());
method.addParameter(new Parameter(fqjt, "example")); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodComment(method,
introspectedTable);
addMapperAnnotations(method);
if (context.getPlugins().clientCountByExampleMethodGenerated(method,
interfaze, introspectedTable)) {
addExtraImports(interfaze);
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
示例4: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
FullyQualifiedJavaType type = new FullyQualifiedJavaType(
introspectedTable.getExampleType());
importedTypes.add(type);
Method method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setReturnType(FullyQualifiedJavaType.getIntInstance());
method.setName(introspectedTable.getDeleteByExampleStatementId());
method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$
context.getCommentGenerator().addGeneralMethodComment(method,
introspectedTable);
addMapperAnnotations(method);
if (context.getPlugins().clientDeleteByExampleMethodGenerated(
method, interfaze, introspectedTable)) {
addExtraImports(interfaze);
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
示例5: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
FullyQualifiedJavaType parameterType = new FullyQualifiedJavaType(
introspectedTable.getBaseRecordType());
importedTypes.add(parameterType);
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(method);
if (context.getPlugins()
.clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method,
interfaze, introspectedTable)) {
addExtraImports(interfaze);
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:27,代码来源:UpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java
示例6: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins().clientInsertMethodGenerated(method,
interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
示例7: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins()
.clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(method,
interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
开发者ID:nextyu,项目名称:summer-mybatis-generator,代码行数:13,代码来源:UpdateByPrimaryKeyWithBLOBsMethodGenerator.java
示例8: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins().clientSelectByPrimaryKeyMethodGenerated(
method, interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
开发者ID:xiachengwei5,项目名称:org.mybatis.generator.core-1.3.5,代码行数:12,代码来源:SelectByPrimaryKeyMethodGenerator.java
示例9: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins()
.clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(method,
interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
开发者ID:nextyu,项目名称:summer-mybatis-generator,代码行数:13,代码来源:UpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java
示例10: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
if (getExampleMethodVisibility() == JavaVisibility.PUBLIC) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins()
.clientSelectByExampleWithoutBLOBsMethodGenerated(method,
interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
}
示例11: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = new Method();
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);
addMapperAnnotations(interfaze, method);
if (context.getPlugins()
.clientUpdateByExampleSelectiveMethodGenerated(method, interfaze,
introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
示例12: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
if (getExampleMethodVisibility() == JavaVisibility.PUBLIC) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins()
.clientUpdateByExampleWithoutBLOBsMethodGenerated(method,
interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
}
开发者ID:xiachengwei5,项目名称:org.mybatis.generator.core-1.3.5,代码行数:15,代码来源:UpdateByExampleWithoutBLOBsMethodGenerator.java
示例13: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = new Method();
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);
addMapperAnnotations(method);
if (context.getPlugins()
.clientUpdateByExampleSelectiveMethodGenerated(method, interfaze,
introspectedTable)) {
addExtraImports(interfaze);
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
示例14: addInterfaceElements
import org.mybatis.generator.api.dom.java.Interface; //导入方法依赖的package包/类
@Override
public void addInterfaceElements(Interface interfaze) {
if (getExampleMethodVisibility() == JavaVisibility.PUBLIC) {
Set<FullyQualifiedJavaType> importedTypes = new TreeSet<FullyQualifiedJavaType>();
Method method = getMethodShell(importedTypes);
if (context.getPlugins().clientCountByExampleMethodGenerated(
method, interfaze, introspectedTable)) {
interfaze.addImportedTypes(importedTypes);
interfaze.addMethod(method);
}
}
}