Package-level declarations

Types

Link copied to clipboard
data class Condition(val field: String = EMPTY_VALUE, val operator: Operator = Operator.ALL, val value: Any = EMPTY_VALUE, val children: List<Condition> = emptyList(), val options: Map<String, Any> = emptyMap()) : ICondition<Condition> , RewritableCondition<Condition>

Represents a concrete query condition with support for various comparison operators and logical combinations.

Link copied to clipboard

Interface for query objects that can have conditions applied to them.

Link copied to clipboard

Marker interface for condition options. Implementations can define additional configuration options for query conditions.

Link copied to clipboard

Enumeration representing the possible states of deletion for entities in the system.

Link copied to clipboard

Interface representing a dynamic document that can store arbitrary key-value pairs.

Link copied to clipboard
interface ICondition<C : ICondition<C>>

Represents a generic condition interface for building query criteria.

Link copied to clipboard

Interface for list queries that retrieve multiple items with a limit.

Link copied to clipboard

Interface for materialized snapshots that contain state data and metadata.

Link copied to clipboard
interface IPagedList<out T>

Interface representing a paginated list of items with total count information.

Link copied to clipboard

Interface for paginated queries that retrieve items in pages.

Link copied to clipboard

Interface for single-item queries that retrieve at most one result.

Link copied to clipboard
data class ListQuery(val condition: Condition, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList(), val limit: Int = Pagination.DEFAULT.size) : IListQuery

Data class representing a query for retrieving a list of items with optional filtering, projection, sorting, and limiting.

Link copied to clipboard
data class MaterializedSnapshot<S : Any>(val contextName: String, val aggregateName: String, val tenantId: String, val ownerId: String = OwnerId.DEFAULT_OWNER_ID, val aggregateId: String, val version: Int, val eventId: String, val firstOperator: String, val operator: String, val firstEventTime: Long, val eventTime: Long, val state: S, val snapshotTime: Long, val deleted: Boolean) : IMaterializedSnapshot<MaterializedSnapshot<S>, S> , NamedAggregate, TenantId, OwnerId, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable, SnapshotTimeCapable, DeletedCapable

Data class representing a complete materialized snapshot of an aggregate's state.

Link copied to clipboard
data class MediumMaterializedSnapshot<S : Any>(val tenantId: String, val ownerId: String, val version: Int, val eventId: String, val firstOperator: String, val operator: String, val firstEventTime: Long, val eventTime: Long, val state: S) : IMaterializedSnapshot<MediumMaterializedSnapshot<S>, S> , TenantId, OwnerId, Version, EventIdCapable, FirstOperatorCapable, OperatorCapable, FirstEventTimeCapable, EventTimeCapable

Represents a materialized snapshot for medium data, implementing multiple capabilities through inheritance. This class is designed to be generic, capable of holding state data of any type. Each snapshot corresponds to a specific version of the state within a tenant and owner context, and records information such as event IDs and operation times to support tracing and auditing.

Link copied to clipboard

Enumeration of query operators used for building database query conditions.

Link copied to clipboard
data class PagedList<out T>(val total: Long, val list: List<T>) : IPagedList<T>

Data class implementing a paginated list of items.

Link copied to clipboard
data class PagedQuery(val condition: Condition, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList(), val pagination: Pagination = Pagination.DEFAULT) : IPagedQuery

Data class representing a paginated query with filtering, projection, sorting, and pagination.

Link copied to clipboard
data class Pagination(val index: Int, val size: Int)

Data class representing pagination settings for queries.

Link copied to clipboard
data class Projection(val include: List<String> = emptyList(), val exclude: List<String> = emptyList())

Data class representing field projection settings for queries.

Link copied to clipboard

Interface for query objects that support field projection.

Link copied to clipboard

Interface for query objects that support comprehensive querying capabilities.

Link copied to clipboard

Interface for query objects that support condition rewriting and modification.

Link copied to clipboard

Interface for query objects that support projection rewriting and modification.

Link copied to clipboard

A simple implementation of DynamicDocument that delegates to a MutableMap.

Link copied to clipboard
data class SingleQuery(val condition: Condition, val projection: Projection = Projection.ALL, val sort: List<Sort> = emptyList()) : ISingleQuery

Data class representing a query for retrieving a single item with optional filtering, projection, and sorting.

Link copied to clipboard
data class SmallMaterializedSnapshot<S : Any>(val version: Int, val firstEventTime: Long, val state: S) : Version, FirstEventTimeCapable, IMaterializedSnapshot<SmallMaterializedSnapshot<S>, S>

Represents a simplified materialized snapshot with generic state. This data class implements multiple interfaces to provide version, materialization, first event time, and state information.

Link copied to clipboard
data class Sort(val field: String, val direction: Sort.Direction)

Data class representing a sorting criterion for query results.

Link copied to clipboard
interface SortCapable

Interface for query objects that support sorting capabilities.

Functions

Link copied to clipboard

Checks if this projection has no field filtering (includes all fields).

Link copied to clipboard
Link copied to clipboard
fun <S : Any, D : Any> MaterializedSnapshot<S>.toSmall(materialize: (S) -> D): SmallMaterializedSnapshot<D>

Converts a materialized snapshot into a simplified snapshot form. This function is used to transform a full snapshot into a simplified snapshot with transformed state.