Search in sources :

Example 1 with GeneratedJavaFile

use of org.mybatis.generator.api.GeneratedJavaFile in project generator by mybatis.

the class IntrospectedTableIbatis2Java2Impl method getGeneratedJavaFiles.

@Override
public List<GeneratedJavaFile> getGeneratedJavaFiles() {
    List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();
    for (AbstractJavaGenerator javaGenerator : javaModelGenerators) {
        List<CompilationUnit> compilationUnits = javaGenerator.getCompilationUnits();
        for (CompilationUnit compilationUnit : compilationUnits) {
            GeneratedJavaFile gjf = new GeneratedJavaFile(compilationUnit, context.getJavaModelGeneratorConfiguration().getTargetProject(), context.getProperty(PropertyRegistry.CONTEXT_JAVA_FILE_ENCODING), context.getJavaFormatter());
            answer.add(gjf);
        }
    }
    for (AbstractJavaGenerator javaGenerator : daoGenerators) {
        List<CompilationUnit> compilationUnits = javaGenerator.getCompilationUnits();
        for (CompilationUnit compilationUnit : compilationUnits) {
            GeneratedJavaFile gjf = new GeneratedJavaFile(compilationUnit, context.getJavaClientGeneratorConfiguration().getTargetProject(), context.getProperty(PropertyRegistry.CONTEXT_JAVA_FILE_ENCODING), context.getJavaFormatter());
            answer.add(gjf);
        }
    }
    return answer;
}
Also used : CompilationUnit(org.mybatis.generator.api.dom.java.CompilationUnit) AbstractJavaGenerator(org.mybatis.generator.codegen.AbstractJavaGenerator) ArrayList(java.util.ArrayList) GeneratedJavaFile(org.mybatis.generator.api.GeneratedJavaFile)

Example 2 with GeneratedJavaFile

use of org.mybatis.generator.api.GeneratedJavaFile in project generator by mybatis.

the class IntrospectedTableMyBatis3Impl method getGeneratedJavaFiles.

/* (non-Javadoc)
     * @see org.mybatis.generator.api.IntrospectedTable#getGeneratedJavaFiles()
     */
@Override
public List<GeneratedJavaFile> getGeneratedJavaFiles() {
    List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();
    for (AbstractJavaGenerator javaGenerator : javaModelGenerators) {
        List<CompilationUnit> compilationUnits = javaGenerator.getCompilationUnits();
        for (CompilationUnit compilationUnit : compilationUnits) {
            GeneratedJavaFile gjf = new GeneratedJavaFile(compilationUnit, context.getJavaModelGeneratorConfiguration().getTargetProject(), context.getProperty(PropertyRegistry.CONTEXT_JAVA_FILE_ENCODING), context.getJavaFormatter());
            answer.add(gjf);
        }
    }
    for (AbstractJavaGenerator javaGenerator : clientGenerators) {
        List<CompilationUnit> compilationUnits = javaGenerator.getCompilationUnits();
        for (CompilationUnit compilationUnit : compilationUnits) {
            GeneratedJavaFile gjf = new GeneratedJavaFile(compilationUnit, context.getJavaClientGeneratorConfiguration().getTargetProject(), context.getProperty(PropertyRegistry.CONTEXT_JAVA_FILE_ENCODING), context.getJavaFormatter());
            answer.add(gjf);
        }
    }
    return answer;
}
Also used : CompilationUnit(org.mybatis.generator.api.dom.java.CompilationUnit) AbstractJavaGenerator(org.mybatis.generator.codegen.AbstractJavaGenerator) ArrayList(java.util.ArrayList) GeneratedJavaFile(org.mybatis.generator.api.GeneratedJavaFile)

Aggregations

ArrayList (java.util.ArrayList)2 GeneratedJavaFile (org.mybatis.generator.api.GeneratedJavaFile)2 CompilationUnit (org.mybatis.generator.api.dom.java.CompilationUnit)2 AbstractJavaGenerator (org.mybatis.generator.codegen.AbstractJavaGenerator)2