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

com.dbobjekts.metadata.column.XMLColumns.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.sql.PreparedStatement
import java.sql.ResultSet
import java.sql.SQLXML
import java.sql.Types

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

    //override //override fun distinct() = XMLColumn(table, nameInTable, AggregateType.DISTINCT)

    override fun getValue(position: Int, resultSet: ResultSet): SQLXML? = resultSet.getSQLXML(position)
    override fun setValue(position: Int, statement: PreparedStatement, value: SQLXML) =
        statement.setSQLXML(position, value)

}

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

    //override //override fun distinct() = NullableXMLColumn(table, nameInTable, AggregateType.DISTINCT)

    override fun getValue(position: Int, resultSet: ResultSet): SQLXML? = resultSet.getSQLXML(position)

    override fun setValue(position: Int, statement: PreparedStatement, value: SQLXML?) =
        statement.setSQLXML(position, value)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy