com.dbobjekts.codegen.metadata.DBAutoGeneratedKeyDefinition.kt Maven / Gradle / Ivy
package com.dbobjekts.codegen.metadata
import com.dbobjekts.api.AnyColumn
import com.dbobjekts.api.ColumnName
import com.dbobjekts.api.SchemaName
import com.dbobjekts.api.TableName
class DBAutoGeneratedKeyDefinition(
schema: SchemaName,
table: TableName,
columnName: ColumnName,
columnType: AnyColumn,
jdbcType: String,
comment: String? = null
) : DBColumnDefinition(
schemaName = schema,
tableName = table,
columnName = columnName,
column = columnType,
jdbcType = jdbcType,
isSinglePrimaryKey = true,
isCompositePrimaryKey = false,
comment = comment
), DBGeneratedPrimaryKeyDefinition, DBGeneratedPrimaryKey {
override fun prettyPrint(): String =
" Auto-generated column $tableName.$columnName maps to ${fullyQualifiedClassName()}."
override fun toString(): String = columnName.value
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy