KotlinTrader / com.doubleu.kotlintrader.delegates / DatabaseDelegate

DatabaseDelegate

abstract class DatabaseDelegate<X>

Super class for all Delegates that delegate Entity fields to the database. Implementations of this also must provide a Property.

Constructors

<init> DatabaseDelegate()

Super class for all Delegates that delegate Entity fields to the database. Implementations of this also must provide a Property.

Properties

_value var _value: X
retrieveFromDb var retrieveFromDb: Boolean
valueProperty val valueProperty: SimpleObjectProperty<X>

Functions

getValue operator fun getValue(ignore: Entity<*>, ignore2: KProperty<*>): X
process abstract fun process(value: X): Unit
retrieve abstract fun retrieve(): X
setValue operator fun setValue(ignore: Entity<*>, ignore2: KProperty<*>, newValue: X): Unit

Extension Functions

valueOf fun Any?.valueOf(): String

Inheritors

MutableReferenceDelegate class MutableReferenceDelegate<T : Entity<T>> : DatabaseDelegate<T>

Delegates mutable Entity-References to the database

PropertyDelegate class PropertyDelegate<T, V> : DatabaseDelegate<V>

Delegates simple properties to the database

ReferenceDelegate class ReferenceDelegate<T : Entity<T>> : DatabaseDelegate<T>

Delegates an immutable Entity-Reference to the database