@Override
    public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
        if (this.versionColumn != null && this.customizedNextVersion && introspectedColumn.getActualColumnName().equals(this.versionColumn.getActualColumnName())) {
            // nextVersion 方法
            Method nextVersion = JavaElementGeneratorTools.generateMethod(
                    METHOD_NEXT_VERSION,
                    JavaVisibility.PUBLIC,
                    null,
                    new Parameter(this.versionColumn.getFullyQualifiedJavaType(), "version")
            );
            commentGenerator.addSetterComment(nextVersion, introspectedTable, this.versionColumn);
            JavaElementGeneratorTools.generateMethodBody(
                    nextVersion,
                    "this." + this.versionColumn.getJavaProperty() + " = version;"
            );

            FormatTools.addMethodWithBestPosition(topLevelClass, nextVersion);
        }

        return super.modelSetterMethodGenerated(method, topLevelClass, introspectedColumn, introspectedTable, modelClassType);
    }
@Override
    public boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType modelClassType) {
        if (this.versionColumn != null && this.customizedNextVersion && introspectedColumn.getActualColumnName().equals(this.versionColumn.getActualColumnName())) {
            
            Method nextVersion = JavaElementGeneratorTools.generateMethod(
                    METHOD_NEXT_VERSION,
                    JavaVisibility.PUBLIC,
                    null,
                    new Parameter(this.versionColumn.getFullyQualifiedJavaType(), "version")
            );
            commentGenerator.addSetterComment(nextVersion, introspectedTable, this.versionColumn);
            JavaElementGeneratorTools.generateMethodBody(
                    nextVersion,
                    "this." + this.versionColumn.getJavaProperty() + " = version;"
            );

            FormatTools.addMethodWithBestPosition(topLevelClass, nextVersion);
        }

        return super.modelSetterMethodGenerated(method, topLevelClass, introspectedColumn, introspectedTable, modelClassType);
    }
@ Override public boolean modelSetterMethodGenerated ( Method method , TopLevelClass topLevelClass , IntrospectedColumn introspectedColumn , IntrospectedTable introspectedTable , ModelClassType modelClassType ) { if ( this . versionColumn != null && this . customizedNextVersion && introspectedColumn . getActualColumnName ( ) . equals ( this . versionColumn . getActualColumnName ( ) ) ) { // nextVersion 方法 Method nextVersion = JavaElementGeneratorTools . generateMethod ( METHOD_NEXT_VERSION , JavaVisibility . PUBLIC , null , new Parameter ( this . versionColumn . getFullyQualifiedJavaType ( ) , "version" ) ) ; commentGenerator . addSetterComment ( nextVersion , introspectedTable , this . versionColumn ) ; JavaElementGeneratorTools . generateMethodBody ( nextVersion , "this." + this . versionColumn . getJavaProperty ( ) + " = version;" ) ; FormatTools . addMethodWithBestPosition ( topLevelClass , nextVersion ) ; } return super . modelSetterMethodGenerated ( method , topLevelClass , introspectedColumn , introspectedTable , modelClassType ) ; }
========================================= model 生成 ============================================
========================================= model 生成 ============================================