All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dbobjekts.codegen.parsers.ParserConfig.kt Maven / Gradle / Ivy

There is a newer version: 0.6.0-RC2
Show newest version
package com.dbobjekts.codegen.parsers

import com.dbobjekts.api.ColumnTypeMapper
import com.dbobjekts.api.CustomColumnTypeMapper
import com.dbobjekts.api.PackageName
import com.dbobjekts.api.SequenceForPrimaryKeyResolver
import com.dbobjekts.codegen.configbuilders.CodeGeneratorConfig
import com.dbobjekts.codegen.configbuilders.ObjectNamingConfigurer
import com.dbobjekts.codegen.exclusionfilters.ExclusionConfigurer
import com.dbobjekts.vendors.Vendor


data class ParserConfig(
    val vendor: Vendor,
    val exclusionConfigurer: ExclusionConfigurer,
    val basePackage: PackageName,
    val objectNamingConfigurer: ObjectNamingConfigurer,
    val customColumnMappers: List = listOf(),
    val sequenceMappers: List = listOf()
) {
    companion object {
        fun fromCodeGeneratorConfig(
            vendor: Vendor,
            codeGeneratorConfig: CodeGeneratorConfig
        ): ParserConfig =
            ParserConfig(
                vendor = vendor,
                exclusionConfigurer = codeGeneratorConfig.exclusionConfigurer,
                basePackage = codeGeneratorConfig.basePackage,
                objectNamingConfigurer = codeGeneratorConfig.objectNamingConfigurer,
                customColumnMappers = codeGeneratorConfig.customColumnMappers,
                sequenceMappers = codeGeneratorConfig.sequenceResolvers
            )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy