AbstractThe query type
The result type
ProtectedvalidateValidates the query before handling. Override this method to add custom validation logic.
Success if valid, Failure with error if invalid
Protected AbstractexecuteMain handler logic. Override this method to implement the query handling.
The query to execute
Result with success value or domain error
Base class for query handlers with built-in validation and error handling.
Provides a template method pattern similar to BaseCommandHandler but for queries.
Example