[ext-fintraffic] Persist and expose parking vehicleEntrances - #425
Closed
teppope wants to merge 19 commits into
Closed
[ext-fintraffic] Persist and expose parking vehicleEntrances#425teppope wants to merge 19 commits into
teppope wants to merge 19 commits into
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>
teppope
force-pushed
the
feat/ext-fintraffic-vehicle-entrances
branch
from
July 20, 2026 12:16
5bf9ffc to
6a93cee
Compare
…cognized JPA entity Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xt-fintraffic-info-links
…c-vehicle-entrances
1 task
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xt-fintraffic-vehicle-entrances
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…xt-fintraffic-vehicle-entrances
teppope
marked this pull request as ready for review
July 30, 2026 06:10
Collaborator
Author
|
Closing in favour of #465. Following the revert of the parking extension-hook infrastructure (#450, #452) and the request to land all parking additions as core Tiamat features in a single PR, this work has been re-authored on top of current #465 carries the same feature as one of its commits, implemented directly on the core |
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
Persists
vehicleEntrancesonFintrafficParkingas an@ElementCollectionof embeddableFintrafficParkingEntranceForVehiclesobjects. This is a Fintraffic-specific extension that stores vehicle entrance data (label, entranceType, width, height, isEntry, isExit, publicCode) from NeTEx imports and makes it queryable and mutable via GraphQL.The following fields are persisted per entrance:
label— free-text label (from NeTExMultilingualString)entranceType—EntranceEnumerationvalue (e.g.door,gate)width,height— physical dimensions (decimal)isEntry,isExit— directional flagspublicCode— short identifierType of change
Issue
This is a Fintraffic-specific extension to support migration of Liipi P&R data (DPO-4809). The implementation follows the pure-ext pattern established by the
paymentMethodsandinfoLinksfields — all persistence, mapping, and GraphQL wiring stays insrc/ext/.Changes overview (ext layer only):
FintrafficParkingEntranceForVehicles— new@Embeddablevalue object withequals()/hashCode()on all fieldsFintrafficParking— new@ElementCollection(EAGER) fintrafficVehicleEntrancesbacked byparking_vehicle_entrancestableV5__FintrafficParkingVehicleEntrances— Flyway migration creating the collection table with a CHECK constraint onentrance_typeFintrafficFlywayConfig— V5 registered in the explicit migration listFintrafficParkingEntityFactory—vehicleEntrancesadded to Orika exclusion listFintrafficParkingMapperContributor— NeTEx ↔ Tiamat mapping for vehicleEntrances in both directionsFintrafficMergingParkingImporter—mergeExtendedFieldsdetects changes and copies vehicleEntrancesFintrafficParkingUpdater—populateExtendedFieldsmaps GraphQL input;preserveExtendedFieldscopies on version updateFintrafficParkingGraphQLTypeContributor—EntranceTypeEnum,FintrafficVehicleEntranceoutput type,FintrafficVehicleEntranceInputinput type, and custom DataFetcherUnit tests
FintrafficParkingMapperContributorTest— unit tests for NeTEx → Tiamat and Tiamat → NeTEx mapping of vehicleEntrances (4 new test methods)FintrafficMergingParkingImporterTest— integration tests for new/existing parking import preserving vehicleEntrances, and idempotent import not creating new versions (3 new test methods)FintrafficGraphQLParkingIntegrationTest— GraphQL integration tests for mutateParking with vehicleEntrances and preserve-on-update semantics (2 new test methods)All 180 test classes pass (0 failures, 0 errors).
Documentation
Javadoc on
FintrafficParkingEntranceForVehiclesandV5__FintrafficParkingVehicleEntrances.Follow-up fix: NeTEx export failure for vehicle entrances
FintrafficParkingMapperContributor's Tiamat-to-NeTEx mapping builtVehicleEntranceNeTEx elements without an id/version, violating the versioned-key XSD requirement on
export. Fixed by synthesizing a deterministic id/version for each vehicle entrance during
NeTEx mapping. Verified with a real end-to-end regression test: GraphQL mutation sets
vehicleEntrances, then the parent StopPlace is exported via the realGET /api/services/stop_places/netex?idList=endpoint (the same one Kooste/PETI'spublication pipeline uses), confirming no 500 and correct XML content.
Follow-up fix (merged forward): Parking never appears in the Read API cache
Brings in the fix from #422 for
ReadApiNetexMarshallingServicederiving the Read APIcache's
typecolumn from the runtime class name ("FintrafficParking") instead of thecorrect NeTEx element type name (
"Parking"), which made every new Parking permanentlyinvisible to Read API queries. Also includes a fix for the new regression test's nested
@TestConfigurationleaking into unrelated tests' contexts via the shared@ComponentScan, resolved by gating it with@Profile("fintraffic-read-api").