BlocxCursorPaginatedUseCase<Input extends BlocxCursorPaginatedInput, Output extends BlocxBaseEntity> class abstract

Base use case for cursor-paginated list operations.

Inheritance
Implementers

Constructors

BlocxCursorPaginatedUseCase({BlocxEventHub? eventHub, BlocxCommandType? commandType, List<BlocxCommandType>? commandTypes})
const

Properties

commandType → BlocxCommandType?
Optional single CRUD command type executed by this use case.
no setterinherited
commandTypes → List<BlocxCommandType>
List of CRUD command types executed by this use case.
no setterinherited
eventHub → BlocxEventHub?
The BlocxEventHub used to broadcast entity command events when commandType or commandTypes is configured.
no setterinherited
eventOrigin → BlocxEventOrigin?
Optional origin metadata attached to emitted BlocxEntityEvents.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

execute(Input input) → Future<BlocxUseCaseResult<BlocxPage<Output>>>
Entry point for callers. Do not override.
inherited
failureResult(Object error, StackTrace stackTrace) → FutureOr<BlocxUseCaseResult<BlocxPage<Output>>>
Wraps an unhandled exception into a BlocxUseCaseResult.
inherited
handleBroadcastError(Object error, StackTrace stackTrace) → void
Optional side-effect hook for logging or reporting errors that occur during entity resolution or event broadcasting after a successful perform.
inherited
handleError(Object error, StackTrace stackTrace) → void
Optional side-effect hook for logging, analytics, or crash reporting.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
perform(Input input) → Future<BlocxUseCaseResult<BlocxPage<Output>>>
The business logic implementation.
inherited
resolveCommandEntities(Input input, BlocxPage<Output> output) → List<BlocxBaseEntity>
Resolves the affected BlocxBaseEntity instances from input and output to broadcast to eventHub.
inherited
shouldBroadcastCommandResult(Input input, BlocxPage<Output> output) → bool
Whether a successful output should trigger command event broadcasting.
inherited
success(BlocxPage<Output> data) → BlocxUseCaseResult<BlocxPage<Output>>
Shorthand for BlocxUseCaseSuccess(data).
inherited
successResult({required List<Output> items, required BlocxCursorPaginatedInput input, String? nextCursor, bool? hasNext}) → BlocxUseCaseResult<BlocxPage<Output>>
Builds a successful cursor-paginated result from items and the originating input.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited