forked from cijber/worm
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
469 B
Kotlin
17 lines
469 B
Kotlin
4 years ago
|
package net.cijber.worm.dto
|
||
|
|
||
|
import net.cijber.worm.dsl.Entity
|
||
|
import kotlin.properties.ReadWriteProperty
|
||
|
import kotlin.reflect.KProperty
|
||
|
|
||
|
class ColumnProperty<T> : ReadWriteProperty<Entity<*>, T> {
|
||
|
var value: T? = null
|
||
|
|
||
|
override operator fun getValue(thisRef: Entity<*>, property: KProperty<*>): T {
|
||
|
return this.value!!
|
||
|
}
|
||
|
|
||
|
override operator fun setValue(thisRef: Entity<*>, property: KProperty<*>, value: T) {
|
||
|
this.value = value
|
||
|
}
|
||
|
}
|