MultidirectionalConnectionArguments

Arguments for connections that expose all four pagination args (first, after, last, before).

Forward args take precedence over backward in toOffsetLimit; passing neither returns the first page at the default size. Forward and backward args cannot be mixed in the same request.

Java equivalent of Kotlin's viaduct.api.types.MultidirectionalConnectionArguments. The direction dispatch, math, and validation are delegated to the language-neutral shared with the Kotlin Tenant API (which validates exactly once).

Prefer ForwardConnectionArguments or BackwardConnectionArguments when only one direction is needed.

Functions

Link copied to clipboard
Returns true if backward pagination is active (last/before) and requires total count.
Link copied to clipboard
open fun toOffsetLimit(defaultPageSize: Int): OffsetLimit
Converts multidirectional pagination arguments to offset/limit.
open fun toOffsetLimit(totalCount: Int, defaultPageSize: Int): OffsetLimit
Converts multidirectional pagination arguments to offset/limit when total count is known.
Link copied to clipboard
open fun validate()
Validates multidirectional pagination arguments.