Java Code Examples for org.mybatis.generator.codegen.mybatis3.javamapper.elements.sqlprovider.AbstractJavaProviderMethodGenerator

The following examples show how to use org.mybatis.generator.codegen.mybatis3.javamapper.elements.sqlprovider.AbstractJavaProviderMethodGenerator. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
protected boolean addCountByExampleMethod(TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateCountByExample()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderCountByExampleMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 2
protected boolean addDeleteByExampleMethod(TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateDeleteByExample()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderDeleteByExampleMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 3
protected void addInsertSelectiveMethod(TopLevelClass topLevelClass) {
    if (introspectedTable.getRules().generateInsertSelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderInsertSelectiveMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
    }
}
 
Example 4
protected boolean addSelectByExampleWithBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateSelectByExampleWithBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderSelectByExampleWithBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 5
protected boolean addSelectByExampleWithoutBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateSelectByExampleWithoutBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderSelectByExampleWithoutBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 6
protected boolean addUpdateByExampleSelectiveMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleSelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderUpdateByExampleSelectiveMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 7
protected boolean addUpdateByExampleWithBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleWithBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderUpdateByExampleWithBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 8
protected boolean addUpdateByExampleWithoutBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleWithoutBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderUpdateByExampleWithoutBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 9
protected void addUpdateByPrimaryKeySelectiveMethod(
        TopLevelClass topLevelClass) {
    if (introspectedTable.getRules().generateUpdateByPrimaryKeySelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator =
                new ProviderUpdateByPrimaryKeySelectiveMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
    }
}
 
Example 10
protected void initializeAndExecuteGenerator(
        AbstractJavaProviderMethodGenerator methodGenerator,
        TopLevelClass topLevelClass) {
    methodGenerator.setContext(context);
    methodGenerator.setIntrospectedTable(introspectedTable);
    methodGenerator.setProgressCallback(progressCallback);
    methodGenerator.setWarnings(warnings);
    methodGenerator.addClassElements(topLevelClass);
}
 
Example 11
protected boolean addCountByExampleMethod(TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateCountByExample()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderCountByExampleMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 12
protected boolean addDeleteByExampleMethod(TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateDeleteByExample()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderDeleteByExampleMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 13
protected boolean addSelectByExampleWithBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateSelectByExampleWithBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderSelectByExampleWithBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 14
protected boolean addSelectByExampleWithoutBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateSelectByExampleWithoutBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderSelectByExampleWithoutBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 15
protected boolean addUpdateByExampleSelectiveMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleSelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByExampleSelectiveMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 16
protected boolean addUpdateByExampleWithBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleWithBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByExampleWithBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 17
protected boolean addUpdateByExampleWithoutBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleWithoutBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByExampleWithoutBLOBsMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 18
protected void addUpdateByPrimaryKeySelectiveMethod(
        TopLevelClass topLevelClass) {
    if (introspectedTable.getRules().generateUpdateByPrimaryKeySelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByPrimaryKeySelectiveMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
    }
}
 
Example 19
protected void initializeAndExecuteGenerator(
        AbstractJavaProviderMethodGenerator methodGenerator,
        TopLevelClass topLevelClass) {
    methodGenerator.setContext(context);
    methodGenerator.setIntrospectedTable(introspectedTable);
    methodGenerator.setProgressCallback(progressCallback);
    methodGenerator.setWarnings(warnings);
    methodGenerator.addClassElements(topLevelClass);
}
 
Example 20
protected boolean addCountByExampleMethod(TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateCountByExample()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderCountByExampleMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 21
protected boolean addDeleteByExampleMethod(TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateDeleteByExample()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderDeleteByExampleMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 22
protected boolean addSelectByExampleWithBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateSelectByExampleWithBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderSelectByExampleWithBLOBsMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 23
protected boolean addSelectByExampleWithoutBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateSelectByExampleWithoutBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderSelectByExampleWithoutBLOBsMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 24
protected boolean addUpdateByExampleSelectiveMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleSelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByExampleSelectiveMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 25
protected boolean addUpdateByExampleWithBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleWithBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByExampleWithBLOBsMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 26
protected boolean addUpdateByExampleWithoutBLOBsMethod(
        TopLevelClass topLevelClass) {
    boolean rc = false;
    if (introspectedTable.getRules().generateUpdateByExampleWithoutBLOBs()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByExampleWithoutBLOBsMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
        rc = true;
    }

    return rc;
}
 
Example 27
protected void addUpdateByPrimaryKeySelectiveMethod(
        TopLevelClass topLevelClass) {
    if (introspectedTable.getRules().generateUpdateByPrimaryKeySelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderUpdateByPrimaryKeySelectiveMethodGenerator();
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
    }
}
 
Example 28
protected void initializeAndExecuteGenerator(
        AbstractJavaProviderMethodGenerator methodGenerator,
        TopLevelClass topLevelClass) {
    methodGenerator.setContext(context);
    methodGenerator.setIntrospectedTable(introspectedTable);
    methodGenerator.setProgressCallback(progressCallback);
    methodGenerator.setWarnings(warnings);
    methodGenerator.addClassElements(topLevelClass);
}
 
Example 29
protected void addApplyWhereMethod(TopLevelClass topLevelClass) {
    AbstractJavaProviderMethodGenerator methodGenerator = new ProviderApplyWhereMethodGenerator(useLegacyBuilder);
    initializeAndExecuteGenerator(methodGenerator, topLevelClass);
}
 
Example 30
protected void addInsertSelectiveMethod(TopLevelClass topLevelClass) {
    if (introspectedTable.getRules().generateInsertSelective()) {
        AbstractJavaProviderMethodGenerator methodGenerator = new ProviderInsertSelectiveMethodGenerator(useLegacyBuilder);
        initializeAndExecuteGenerator(methodGenerator, topLevelClass);
    }
}