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

com.dbobjekts.metadata.column.VarcharColumns.kt Maven / Gradle / Ivy

There is a newer version: 0.6.0-RC2
Show newest version
package com.dbobjekts.metadata.column

import com.dbobjekts.api.AnyTable
import java.nio.charset.Charset
import java.sql.*
import javax.sql.rowset.serial.SerialBlob
import javax.sql.rowset.serial.SerialClob

open class VarcharColumn(table: AnyTable, name: String, aggregateType: AggregateType?) :
    NonNullableColumn(table,name, String::class.java, aggregateType), IsCharacterColumn {
    constructor(table: AnyTable, name: String) : this(table, name, null)

    override fun getValue(position: Int, resultSet: ResultSet): String? = resultSet.getString(position)
    override fun setValue(position: Int, statement: PreparedStatement, value: String) =
        statement.setString(position, value)

}

open class NullableVarcharColumn(table: AnyTable, name: String, aggregateType: AggregateType?) :
    NullableColumn(table,name, Types.VARCHAR, String::class.java, aggregateType), IsCharacterColumn  {
    constructor(table: AnyTable, name: String) : this(table, name, null)

    override fun getValue(position: Int, resultSet: ResultSet): String? = resultSet.getString(position)

    override fun setValue(position: Int, statement: PreparedStatement, value: String?) =
        statement.setString(position, value)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy