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

com.dbobjekts.codegen.metadata.DBAutoGeneratedKeyDefinition.kt Maven / Gradle / Ivy

There is a newer version: 0.6.0-RC2
Show newest version
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