Search in sources :

Example 1 with RecordWithBLOBsGenerator

use of org.mybatis.generator.codegen.ibatis2.model.RecordWithBLOBsGenerator in project generator by mybatis.

the class IntrospectedTableMyBatis3Impl method calculateJavaModelGenerators.

/**
     * Calculate java model generators.
     *
     * @param warnings
     *            the warnings
     * @param progressCallback
     *            the progress callback
     */
protected void calculateJavaModelGenerators(List<String> warnings, ProgressCallback progressCallback) {
    if (getRules().generateExampleClass()) {
        AbstractJavaGenerator javaGenerator = new ExampleGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
    if (getRules().generatePrimaryKeyClass()) {
        AbstractJavaGenerator javaGenerator = new PrimaryKeyGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
    if (getRules().generateBaseRecordClass()) {
        AbstractJavaGenerator javaGenerator = new BaseRecordGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
    if (getRules().generateRecordWithBLOBsClass()) {
        AbstractJavaGenerator javaGenerator = new RecordWithBLOBsGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
}
Also used : AbstractJavaGenerator(org.mybatis.generator.codegen.AbstractJavaGenerator) RecordWithBLOBsGenerator(org.mybatis.generator.codegen.mybatis3.model.RecordWithBLOBsGenerator) PrimaryKeyGenerator(org.mybatis.generator.codegen.mybatis3.model.PrimaryKeyGenerator) ExampleGenerator(org.mybatis.generator.codegen.mybatis3.model.ExampleGenerator) BaseRecordGenerator(org.mybatis.generator.codegen.mybatis3.model.BaseRecordGenerator)

Example 2 with RecordWithBLOBsGenerator

use of org.mybatis.generator.codegen.ibatis2.model.RecordWithBLOBsGenerator in project generator by mybatis.

the class IntrospectedTableIbatis2Java2Impl method calculateJavaModelGenerators.

protected void calculateJavaModelGenerators(List<String> warnings, ProgressCallback progressCallback) {
    if (getRules().generateExampleClass()) {
        AbstractJavaGenerator javaGenerator = new ExampleGenerator(isJava5Targeted());
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
    if (getRules().generatePrimaryKeyClass()) {
        AbstractJavaGenerator javaGenerator = new PrimaryKeyGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
    if (getRules().generateBaseRecordClass()) {
        AbstractJavaGenerator javaGenerator = new BaseRecordGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
    if (getRules().generateRecordWithBLOBsClass()) {
        AbstractJavaGenerator javaGenerator = new RecordWithBLOBsGenerator();
        initializeAbstractGenerator(javaGenerator, warnings, progressCallback);
        javaModelGenerators.add(javaGenerator);
    }
}
Also used : AbstractJavaGenerator(org.mybatis.generator.codegen.AbstractJavaGenerator) RecordWithBLOBsGenerator(org.mybatis.generator.codegen.ibatis2.model.RecordWithBLOBsGenerator) PrimaryKeyGenerator(org.mybatis.generator.codegen.ibatis2.model.PrimaryKeyGenerator) ExampleGenerator(org.mybatis.generator.codegen.ibatis2.model.ExampleGenerator) BaseRecordGenerator(org.mybatis.generator.codegen.ibatis2.model.BaseRecordGenerator)

Aggregations

AbstractJavaGenerator (org.mybatis.generator.codegen.AbstractJavaGenerator)2 BaseRecordGenerator (org.mybatis.generator.codegen.ibatis2.model.BaseRecordGenerator)1 ExampleGenerator (org.mybatis.generator.codegen.ibatis2.model.ExampleGenerator)1 PrimaryKeyGenerator (org.mybatis.generator.codegen.ibatis2.model.PrimaryKeyGenerator)1 RecordWithBLOBsGenerator (org.mybatis.generator.codegen.ibatis2.model.RecordWithBLOBsGenerator)1 BaseRecordGenerator (org.mybatis.generator.codegen.mybatis3.model.BaseRecordGenerator)1 ExampleGenerator (org.mybatis.generator.codegen.mybatis3.model.ExampleGenerator)1 PrimaryKeyGenerator (org.mybatis.generator.codegen.mybatis3.model.PrimaryKeyGenerator)1 RecordWithBLOBsGenerator (org.mybatis.generator.codegen.mybatis3.model.RecordWithBLOBsGenerator)1