As a Developer I want to expose a candidate-based text search method in the UserFacade so that other modules can filter specific subsets of users by name or email without violating Modulith database boundaries.
Assumptions & Constraints
- To prevent scanning the entire database, the search must be restricted to a provided list of
candidateIds.
- Search inputs must be heavily sanitized to prevent SQL Wildcard Injection (e.g., treating % and _ as literal characters, not wildcards).
Preconditions
The User database entity contains firstName, surname, and email.
Acceptance Criteria
- The UserFacade defines the method: Optional<List> findUserIdsBySearch(String search, List candidateIds).
- If the search string is null, empty, or only whitespace, the method returns Optional.empty(). (This signals to the caller that no filtering occurred).
- The service normalizes the search string by trimming it, collapsing multiple spaces into a single space, and escaping SQL wildcards (, %, _).
As a Developer I want to expose a candidate-based text search method in the UserFacade so that other modules can filter specific subsets of users by name or email without violating Modulith database boundaries.
Assumptions & Constraints
candidateIds.Preconditions
The User database entity contains firstName, surname, and email.
Acceptance Criteria