KSaver

interface KSaver

Functions

Link copied to clipboard
open fun <E : Any> insert(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Insert an entity object

open fun <E : Any> insert(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Insert an input DTO

Link copied to clipboard
open fun <E : Any> insertEntities(entities: Iterable<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> insertEntitiesIfAbsent(entities: Iterable<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> insertIfAbsent(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Insert an entity object if necessary, if the entity object exists in database, ignore it.

open fun <E : Any> insertIfAbsent(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Insert an input DTO if necessary, that means to convert the input DTO to entity object and save it. If the entity object exists in database, ignore it.

Link copied to clipboard
open fun <E : Any> insertInputs(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> insertInputsIfAbsent(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.APPEND_IF_ABSENT, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> merge(entity: E, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Merge an entity object

open fun <E : Any> merge(input: Input<E>, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Merge an input DTO

Link copied to clipboard
open fun <E : Any> mergeEntities(entities: Iterable<E>, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> mergeInputs(inputs: Iterable<Input<E>>, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
abstract fun <E : Any> save(entity: E, con: Connection? = null, block: KSaveCommandDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(entity: E, associatedMode: AssociatedSaveMode, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(entity: E, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Save an entity object

open fun <E : Any> save(input: Input<E>, con: Connection? = null, block: KSaveCommandDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(input: Input<E>, associatedMode: AssociatedSaveMode, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>
open fun <E : Any> save(input: Input<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Save an input DTO

Link copied to clipboard
abstract fun <E : Any> saveEntities(entities: Iterable<E>, con: Connection? = null, block: KSaveCommandDsl.() -> Unit? = null): KBatchSaveResult<E>
open fun <E : Any> saveEntities(entities: Iterable<E>, associatedMode: AssociatedSaveMode, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
open fun <E : Any> saveEntities(entities: Iterable<E>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>

Save some entity objects

Link copied to clipboard
open fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, con: Connection? = null, block: KSaveCommandDsl.() -> Unit? = null): KBatchSaveResult<E>
open fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
open fun <E : Any> saveInputs(inputs: Iterable<Input<E>>, mode: SaveMode, associatedMode: AssociatedSaveMode = AssociatedSaveMode.REPLACE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>

Save some input DTOs

Link copied to clipboard
open fun <E : Any> update(entity: E, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Update an entity object

open fun <E : Any> update(input: Input<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KSimpleSaveResult<E>

Update an input DTO

Link copied to clipboard
open fun <E : Any> updateEntities(entities: Iterable<E>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>
Link copied to clipboard
open fun <E : Any> updateInputs(inputs: Iterable<Input<E>>, associatedMode: AssociatedSaveMode = AssociatedSaveMode.UPDATE, con: Connection? = null, block: KSaveCommandPartialDsl.() -> Unit? = null): KBatchSaveResult<E>

Inheritors

Link copied to clipboard
Link copied to clipboard