activemodel / kales.activemodel

Package kales.activemodel

Types

Association

interface Association

BelongsToAssociation

interface BelongsToAssociation<T : ApplicationRecord> : Association

Represents an association where a model A's table contains a foreign key to another model B's ApplicationRecord object, in a "A belongs to B" fashion.

BelongsToAssociationImpl

abstract class BelongsToAssociationImpl<T : ApplicationRecord> : BelongsToAssociation<T>

HasManyAssociation

interface HasManyAssociation<F : ApplicationRecord, T : ApplicationRecord> : MutableCollection<T>, Association

Represents a one-to-many association between models F and T respectively

HasManyAssociationImpl

abstract class HasManyAssociationImpl<F : ApplicationRecord, T : ApplicationRecord> : HasManyAssociation<F, T>

MaybeRecordId

sealed class MaybeRecordId

Data type that represents ApplicationRecord.id. Can be either NoneId or RecordId to represent the fact that an ID may or may not exist depending on whether the record has been previously persisted to the DB or not.

NoneId

object NoneId : MaybeRecordId

ID for records that are only in-memory and not persisted in the database yet (or at all) Since ApplicationRecord IDs are generated (auto-increment), they should not be set when instantiating an object and instead auto assigned when persisting it to the database.

RecordId

data class RecordId : MaybeRecordId

ID for records that have been previously persisted to the database and have an auto generated value.

Extensions for External Classes

org.jdbi.v3.core.Jdbi