Search in sources :

Example 1 with AbstractKotlinGenerator

use of org.mybatis.generator.codegen.AbstractKotlinGenerator in project generator by mybatis.

the class IntrospectedTableKotlinImpl method calculateKotlinDataClassGenerator.

protected void calculateKotlinDataClassGenerator(List<String> warnings, ProgressCallback progressCallback) {
    AbstractKotlinGenerator kotlinGenerator = new KotlinDataClassGenerator(getModelProject());
    initializeAbstractGenerator(kotlinGenerator, warnings, progressCallback);
    kotlinGenerators.add(kotlinGenerator);
}
Also used : AbstractKotlinGenerator(org.mybatis.generator.codegen.AbstractKotlinGenerator)

Example 2 with AbstractKotlinGenerator

use of org.mybatis.generator.codegen.AbstractKotlinGenerator in project generator by mybatis.

the class IntrospectedTableMyBatis3Impl method getGeneratedKotlinFiles.

@Override
public List<GeneratedKotlinFile> getGeneratedKotlinFiles() {
    List<GeneratedKotlinFile> answer = new ArrayList<>();
    for (AbstractKotlinGenerator kotlinGenerator : kotlinGenerators) {
        List<KotlinFile> kotlinFiles = kotlinGenerator.getKotlinFiles();
        for (KotlinFile kotlinFile : kotlinFiles) {
            GeneratedKotlinFile gjf = new GeneratedKotlinFile(kotlinFile, kotlinGenerator.getProject(), context.getProperty(PropertyRegistry.CONTEXT_KOTLIN_FILE_ENCODING), context.getKotlinFormatter());
            answer.add(gjf);
        }
    }
    return answer;
}
Also used : AbstractKotlinGenerator(org.mybatis.generator.codegen.AbstractKotlinGenerator) GeneratedKotlinFile(org.mybatis.generator.api.GeneratedKotlinFile) ArrayList(java.util.ArrayList) GeneratedKotlinFile(org.mybatis.generator.api.GeneratedKotlinFile) KotlinFile(org.mybatis.generator.api.dom.kotlin.KotlinFile)

Example 3 with AbstractKotlinGenerator

use of org.mybatis.generator.codegen.AbstractKotlinGenerator in project generator by mybatis.

the class IntrospectedTableKotlinImpl method calculateKotlinMapperAndExtensionsGenerator.

protected void calculateKotlinMapperAndExtensionsGenerator(List<String> warnings, ProgressCallback progressCallback) {
    AbstractKotlinGenerator kotlinGenerator = new KotlinMapperAndExtensionsGenerator(getClientProject());
    initializeAbstractGenerator(kotlinGenerator, warnings, progressCallback);
    kotlinGenerators.add(kotlinGenerator);
}
Also used : AbstractKotlinGenerator(org.mybatis.generator.codegen.AbstractKotlinGenerator)

Aggregations

AbstractKotlinGenerator (org.mybatis.generator.codegen.AbstractKotlinGenerator)3 ArrayList (java.util.ArrayList)1 GeneratedKotlinFile (org.mybatis.generator.api.GeneratedKotlinFile)1 KotlinFile (org.mybatis.generator.api.dom.kotlin.KotlinFile)1