org.jetbrains.exposed.dao.InnerTableLink.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exposed-dao Show documentation
Show all versions of exposed-dao Show documentation
Exposed, an ORM framework for Kotlin
package org.jetbrains.exposed.dao
import org.jetbrains.exposed.dao.id.EntityID
import org.jetbrains.exposed.dao.id.IdTable
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.SqlExpressionBuilder.notInList
import org.jetbrains.exposed.sql.transactions.TransactionManager
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
/**
* Class responsible for implementing property delegates of the read-write properties involved in a many-to-many
* relation, which uses an intermediate (join) table.
*
* @param table The intermediate table containing reference columns to both child and parent entities.
* @param sourceTable The [IdTable] associated with the source child entity.
* @param target The [EntityClass] for the target parent entity.
* @param _sourceColumn The intermediate table's reference column for the child entity class. If left `null`,
* this will be inferred from the provided intermediate [table] columns.
* @param _targetColumn The intermediate table's reference column for the parent entity class. If left `null`,
* this will be inferred from the provided intermediate [table] columns.
*/
@Suppress("UNCHECKED_CAST")
class InnerTableLink, Source : Entity, ID : Comparable, Target : Entity>(
val table: Table,
sourceTable: IdTable,
val target: EntityClass,
_sourceColumn: Column>? = null,
_targetColumn: Column>? = null,
) : ReadWriteProperty
© 2015 - 2024 Weber Informatics LLC | Privacy Policy