[ext-fintraffic] Persist and expose parking lighting - #429
Open
teppope wants to merge 18 commits into
Open
Conversation
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>
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>
… core tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cognized JPA entity Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xt-fintraffic-info-links
…c-vehicle-entrances
…ntraffic-parking-lighting
1 task
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
teppope
marked this pull request as ready for review
July 30, 2026 06:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lightingas a readable and mutable field on the parking GraphQL types when thefintrafficSpring profile is active.parking_fintraffic_lightingcollection table via ext Flyway migration V6.lightinginFintrafficParkingUpdater: written on mutation, preserved on version update when not included in input.Type of change
Issue
SiteElement.lightingis annotated@Transientin the core model, soParking.lightingis never written to or read from the database. This PR addresses the gap for the Fintraffic deployment by:ParkingasFintrafficParking(already in place) and adding alightingListfield mapped via@ElementCollectionto a separateparking_fintraffic_lightingcollection table (same pattern aspaymentMethods,infoLinks,vehicleEntrances). Using a separate table prevents Hibernate from selecting an ext column in core tests that do not run the Fintraffic Flyway migrations.V6__FintrafficParkingLighting) to create theparking_fintraffic_lightingtable.lightingintoFintrafficParkingGraphQLTypeContributor(output + input) using the existingCustomGraphQLTypes.lightingEnumType.FintrafficParkingUpdater.populateExtendedFields/preserveExtendedFields.The
LightingEnumerationJava enum andlightingEnumTypeGraphQL enum type already exist in core and are reused unchanged.Unit tests
Three integration tests added to
FintrafficGraphQLParkingIntegrationTest:mutateParking_lighting_persistedAndReturnedInResponse— mutates parking withlighting: wellLit, asserts mutation response and DB entity.mutateParking_lighting_persistedAndReadBack_viaQuery— separateparking(id: …)query after mutation proves the value survives a round-trip, not just an echo.mutateParking_updateWithoutLighting_preservesExistingLighting— update mutation withoutlightingfield leaves the previously stored value intact.All tests pass.
Documentation
FintrafficParkingJavadoc updated to describe the separate-table pattern and its rationale.