KotlinTrader / com.doubleu.kotlintrader.database / RefEntity

RefEntity

abstract class RefEntity<T : RefEntity<T>> : Entity<T>

Database Entity with 2 ID Columns

Constructors

<init> RefEntity(id: Long, id2: Long, id2Property: LongProperty = SimpleLongProperty(id2))

Database Entity with 2 ID Columns

Properties

id open val id: Long
id2 val id2: Long
id2Property val id2Property: LongProperty

Inherited Properties

delegateMap val delegateMap: MutableMap<KProperty<*>, DatabaseDelegate<*>>
idProperty val idProperty: LongProperty

Inherited Functions

default fun <V> default(property: KProperty<V>): V

Retrieves the default value for the given property

delegate fun <V : Any> delegate(property: KProperty<V>, default: V): PropertyDelegate<T, V>

Returns a Delegate to the given property.

mutableReference fun <E : Entity<E>> mutableReference(key: KMutableProperty0<E>, property: KMutableProperty0<Long>): MutableReferenceDelegate<E>

Returns a Delegate to the given property.

property fun <V> property(property: KProperty<V>): Property<V>

Returns the FXProperty associated with the passed Entity-Property

reference fun <E : Entity<E>> reference(key: KProperty<E>, property: KProperty<Long>): ReferenceDelegate<E>

Returns a Delegate to the given property.

reset fun reset(): Unit

Resets this entity back to it's default values

retrieve fun retrieve(lazy: Boolean): Unit

Reloads the Entity from the database

Extension Functions

valueOf fun Any?.valueOf(): String

Inheritors

Fahrt class Fahrt : RefEntity<Fahrt>
Ort_has_Ware class Ort_has_Ware : RefEntity<Ort_has_Ware>
Schiff_has_Ware class Schiff_has_Ware : RefEntity<Schiff_has_Ware>