Skip to content

[ext-fintraffic] Persist and expose parking infoLinks - #424

Open
teppope wants to merge 11 commits into
entur:masterfrom
tmfg:feat/ext-fintraffic-info-links
Open

[ext-fintraffic] Persist and expose parking infoLinks#424
teppope wants to merge 11 commits into
entur:masterfrom
tmfg:feat/ext-fintraffic-info-links

Conversation

@teppope

@teppope teppope commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Depends on #422 — This PR builds on feat/ext-fintraffic-parking-entity-factory (#422) which has not yet been merged. The diff includes all changes from that PR as well. Please review #422 first; once merged, only this PR's changes will remain in the diff.

Summary

Adds persistence for infoLinks on the Fintraffic FintrafficParking extension entity as a @ElementCollection, stored in the parking_info_links collection table. This is part of the Liipi P&R migration project (DPO-4810).

Changes:

  • New FintrafficInfoLink @Embeddable with uri (String) and typeOfInfoLink (String, first NeTEx type value)
  • FintrafficParking gains an @ElementCollection(EAGER) List<FintrafficInfoLink> infoLinks
  • Flyway migration V4__FintrafficParkingInfoLinks creates parking_info_links with CHECK constraint on type_of_info_link
  • FintrafficFlywayConfig registers V4
  • FintrafficParkingEntityFactory adds "infoLinks" to Orika exclusion list
  • FintrafficParkingMapperContributor maps NeTEx InfoLinkFintrafficInfoLink in both directions; takes first typeOfInfoLink value from the NeTEx list
  • FintrafficMergingParkingImporter.mergeExtendedFields compares and copies infoLinks alongside paymentMethods; unchanged links do not trigger a new version
  • FintrafficParkingGraphQLTypeContributor registers TypeOfInfoLinkEnum, FintrafficInfoLink output/input types, and contributes infoLinks field; uses a custom DataFetcher to read from FintrafficParking directly
  • FintrafficParkingUpdater populates and preserves infoLinks in populateExtendedFields/preserveExtendedFields
  • Tests added for mapper contributor, merging importer, and GraphQL integration

Type of change

  • New feature (non-breaking change which adds functionality)

Issue

Part of the Liipi P&R migration to Tiamat. infoLinks on Parking is currently @Transient in core; this change persists it in the Fintraffic extension layer without modifying upstream core code.

teppope and others added 9 commits July 17, 2026 08:45
Implements the extension hook infrastructure from feat/parking-extension-hooks
to persist and expose paymentMethods on the Fintraffic Parking entity:

- FintrafficParking: @entity subclass with @ElementCollection paymentMethods
- FintrafficParkingEntityFactory: produces FintrafficParking instances
- FintrafficMergingParkingImporter: copies paymentMethods into the persisted entity
- FintrafficParkingGraphQLTypeContributor: adds paymentMethods to the GraphQL schema
- FintrafficParkingUpdater: populates and preserves paymentMethods on GraphQL mutations
- FintrafficParkingMapperContributor: bridges paymentMethods between NeTEx and Tiamat enums
- V3__FintrafficParkingExtensions: Flyway migration adding dtype column and payment methods table
- Full test coverage: unit + integration tests for all components

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Factory

Orika cannot auto-map paymentMethods because the NeTEx and Tiamat enum
types differ. The FintrafficParkingMapperContributor already handles the
conversion explicitly, so including paymentMethods in the Orika classmap
was redundant and confusing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xtProvider static field

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@teppope teppope changed the title Add Fintraffic parking extension: infoLinks persistence (DPO-4810) Add Fintraffic parking extension: infoLinks persistence Jul 22, 2026
teppope and others added 2 commits July 23, 2026 13:02
…cognized JPA entity

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@teppope teppope changed the title Add Fintraffic parking extension: infoLinks persistence [ext-fintraffic] Persist and expose parking infoLinks Jul 28, 2026
@teppope
teppope marked this pull request as ready for review July 30, 2026 06:10
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.

1 participant