com.vladsch.kotlin.jdbc.ModelNoData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jdbc Show documentation
Show all versions of kotlin-jdbc Show documentation
A thin library that exposes JDBC API with the convenience of Kotlin and gets out of the way when not needed.
The newest version!
package com.vladsch.kotlin.jdbc
import java.lang.IllegalStateException
@Suppress("MemberVisibilityCanBePrivate", "UNCHECKED_CAST", "PropertyName")
abstract class ModelNoData>(session: Session?, sqlTable: String, dbCase: Boolean, allowSetAuto: Boolean = true, quote: String? = null) :
Model(session, sqlTable, dbCase, allowSetAuto, quote) {
data class DummyData(val dummy: Int)
// create a data of this
override fun toData(): DummyData = throw IllegalStateException("ModelNoData derived ${this::class.simpleName} for ${_db.tableName} should not try to convert to a non-existent data class")
}