Package-level declarations

An Exkt module providing handy utilities for managing Data Transfer Objects.

Types

Link copied to clipboard
interface DtoConverter<TEntity : Any, TDto : Any>

A converter supposed to convert Business Objects to Data Transfer Objects and vice versa.

Link copied to clipboard
typealias EntityWithOptionalDto<E, D> = Pair<E, D?>
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun <TEntity : Any, TDto : Any> DtoConverter<TEntity, TDto>.convertToDtoIf(entity: TEntity, predicate: () -> Boolean): TDto?

Converts given entity to DTO if the given predicate matches. Returns null otherwise.

Link copied to clipboard

Converts given entities to DTO list.

Link copied to clipboard
suspend fun <TEntity : Any, TDto : Any> DtoConverter<TEntity, TDto>.convertToDtoListIf(entities: List<TEntity>, predicate: () -> Boolean): List<TDto>?

Converts given entities to DTO list if the given predicate matches. Returns null otherwise.

Link copied to clipboard

Converts given DTO list to entities.