Skip to content

feat: 1165 activity search endpoint#1186

Merged
craigyu merged 22 commits intomainfrom
feat/1165-activity-search-endpoint
Feb 18, 2026
Merged

feat: 1165 activity search endpoint#1186
craigyu merged 22 commits intomainfrom
feat/1165-activity-search-endpoint

Conversation

@craigyu
Copy link
Collaborator

@craigyu craigyu commented Feb 17, 2026

Description

Adds an activity search endpoint with the ability to search over postgres and oracle DBs.


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

Introduce ActivitySearchFiltersDto to model activity search filters, add an ActivityService interface with an activitySearch method, and extend SearchEndpoint with a new GET /activities handler wired to accept the filters via @ModelAttribute/@ParameterObject. The endpoint currently returns an empty placeholder; the service signature uses existing OpeningSearch DTOs and should be implemented to perform the actual search.
@craigyu craigyu self-assigned this Feb 17, 2026
Copilot AI review requested due to automatic review settings February 17, 2026 17:14
@craigyu craigyu linked an issue Feb 17, 2026 that may be closed by this pull request
@craigyu craigyu changed the title Feat/1165 activity search endpoint feat: 1165 activity search endpoint Feb 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “activity search” API and supporting service/repository layer so searches can run against either PostgreSQL or Oracle, with shared contract tests for both DB modes.

Changes:

  • Introduces /api/search/activities endpoint with filter DTOs and response DTO mapping.
  • Adds DB-specific repositories/services and native queries (Postgres + Oracle) for activity search.
  • Adds unit + integration test contracts and DB-specific integration test runners.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
backend/src/main/java/ca/bc/gov/restapi/results/common/endpoint/SearchEndpoint.java Adds the new activity search HTTP endpoint and wires it to ActivityService.
backend/src/main/java/ca/bc/gov/restapi/results/common/service/ActivityService.java Introduces the service interface for activity search.
backend/src/main/java/ca/bc/gov/restapi/results/common/service/impl/AbstractActivityService.java Implements shared activity search logic (query, client enrichment, DTO mapping).
backend/src/main/java/ca/bc/gov/restapi/results/postgres/service/ActivityPostgresService.java Provides Postgres-specific ActivityService bean via conditional configuration.
backend/src/main/java/ca/bc/gov/restapi/results/oracle/service/ActivityOracleService.java Provides Oracle-specific ActivityService bean via conditional configuration.
backend/src/main/java/ca/bc/gov/restapi/results/common/repository/ActivityTreatmentUnitRepository.java Adds the cross-DB repository contract method activitySearch(...).
backend/src/main/java/ca/bc/gov/restapi/results/postgres/repository/ActivityTreatmentUnitPostgresRepository.java Implements native activity search query for Postgres repository.
backend/src/main/java/ca/bc/gov/restapi/results/oracle/repository/ActivityTreatmentUnitOracleRepository.java Implements native activity search query for Oracle repository.
backend/src/main/java/ca/bc/gov/restapi/results/postgres/SilvaPostgresQueryConstants.java Adds the Postgres native SQL for activity search.
backend/src/main/java/ca/bc/gov/restapi/results/oracle/SilvaOracleQueryConstants.java Adds the Oracle native SQL for activity search.
backend/src/main/java/ca/bc/gov/restapi/results/common/projection/ActivitySearchProjection.java Defines projection used by native activity search queries.
backend/src/main/java/ca/bc/gov/restapi/results/common/dto/activity/ActivitySearchFiltersDto.java Adds filters DTO with NOVALUE defaulting and “hasAnyFilter” logic.
backend/src/main/java/ca/bc/gov/restapi/results/common/dto/activity/ActivitySearchResponseDto.java Adds response DTO for activity search results.
backend/src/main/java/ca/bc/gov/restapi/results/common/util/DateUtil.java Centralizes date range validation used by search services.
backend/src/main/java/ca/bc/gov/restapi/results/common/service/impl/AbstractOpeningSearchService.java Switches opening search date-range validation to DateUtil.
backend/src/test/java/ca/bc/gov/restapi/results/common/service/impl/AbstractActivityServiceTest.java Adds unit tests for shared activity search mapping/enrichment logic.
backend/src/test/java/ca/bc/gov/restapi/results/common/service/AbstractActivityServiceIntegrationTest.java Adds DB-agnostic integration contract tests for activity search service.
backend/src/test/java/ca/bc/gov/restapi/results/common/endpoint/AbstractSearchEndpointActivitySearchIntegrationTest.java Adds DB-agnostic integration contract tests for activity search endpoint.
backend/src/test/java/ca/bc/gov/restapi/results/common/util/DateUtilTest.java Adds unit tests for date-range validation helper.
backend/src/test/java/ca/bc/gov/restapi/results/postgres/service/ActivityServicePostgresIntegrationTest.java Runs the abstract activity-service contract tests against Postgres.
backend/src/test/java/ca/bc/gov/restapi/results/oracle/service/ActivityServiceOracleIntegrationTest.java Runs the abstract activity-service contract tests against Oracle.
backend/src/test/java/ca/bc/gov/restapi/results/postgres/endpoint/SearchEndpointActivitySearchPostgresIntegrationTest.java Runs the abstract endpoint contract tests against Postgres.
backend/src/test/java/ca/bc/gov/restapi/results/oracle/endpoint/SearchEndpointActivitySearchOracleIntegrationTest.java Runs the abstract endpoint contract tests against Oracle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@Abradat Abradat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@craigyu craigyu merged commit 1e0a9a5 into main Feb 18, 2026
24 checks passed
@craigyu craigyu deleted the feat/1165-activity-search-endpoint branch February 18, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity search endpoint

3 participants