Conversation
… Implementation This phase implements full ESPI 4.0 compliance for ServiceSupplier and refactors all Organisation phone number handling from PhoneNumberEntity table to embedded TelephoneNumber fields. Key Changes: - Created ServiceSupplierDto, OrganisationDto, TelephoneNumberDto with JAXB annotations - Implemented ServiceSupplierMapper, OrganisationMapper, TelephoneNumberMapper - Fixed SupplierKind enum to match XSD (6 values: UTILITY, RETAILER, OTHER, LSE, MDMA, MSP) - Refactored Organisation to use embedded phone1/phone2 (TelephoneNumber) - Deleted PhoneNumberEntity, OrganisationRole, PhoneNumberService (no longer needed) - Updated ServiceSupplierEntity and CustomerEntity with phone @AttributeOverride - Optimized TelephoneNumber column sizes to prevent MySQL row size limit - Updated V3 Flyway migration with embedded phone columns - Resolved Spring bean conflicts (removed BaseMapperUtils inheritance) - Removed legacy usagePointId field from ElectricPowerQualitySummaryDto - Added 24 new DTO tests (ServiceSupplierDtoTest, OrganisationDtoTest, TelephoneNumberDtoTest) Test Results: - Total: 760 tests (all passing) - Integration: PostgreSQL (2/2), H2 (3/3), MySQL (2/2) Related Issue: #28 (Phase 21) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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
This PR implements full ESPI 4.0 schema compliance for ServiceSupplier and refactors all Organisation phone number handling from the legacy PhoneNumberEntity table to embedded TelephoneNumber fields.
Key Changes
New DTOs (JAXB/XML)
ServiceSupplierDto- 4 fields (organisation, kind, issuerIdentificationNumber, effectiveDate)OrganisationDto- 6 fields with phone1/phone2 embeddedTelephoneNumberDto- 8 fields per XSD specificationNew Mappers
ServiceSupplierMapper- Entity ↔ DTO conversionOrganisationMapper- Organisation entity ↔ DTO conversionTelephoneNumberMapper- TelephoneNumber entity ↔ DTO conversionEntity Updates
SupplierKindenum to match XSD (6 values in correct sequence: UTILITY, RETAILER, OTHER, LSE, MDMA, MSP)Organisationto use embeddedphone1andphone2(TelephoneNumber)ServiceSupplierEntitywith 16 phone @AttributeOverride annotationsCustomerEntitywith 16 phone @AttributeOverride annotationsTelephoneNumbercolumn sizes to prevent MySQL row size limitCustomerMapperto remove PhoneNumberEntity logicServiceLocationMapperto use TelephoneNumberMapperCleanup
OrganisationRole(unused wrapper)PhoneNumberEntity(replaced with embedded TelephoneNumber)PhoneNumberService(no longer needed)BaseMapperUtilsinheritance from CustomerMapper and ServiceSupplierMapper (resolved bean conflicts)usagePointIdfield from ElectricPowerQualitySummaryDtoDatabase Migration
service_supplierstable (16 phone columns)customerstable (16 phone columns)service_locationstable (phone columns with optimized sizes)customer_accountstable (16 phone columns)phone_numberstable (no longer needed)Tests
ServiceSupplierDtoTest- 8 tests for XML marshalling and field validationOrganisationDtoTest- 8 tests for Organisation DTO functionalityTelephoneNumberDtoTest- 8 tests for TelephoneNumber DTO functionalityTest Results
Integration Tests:
Breaking Changes
phone_numberstable removedservice_suppliers,customers,service_locations,customer_accountstablesPhoneNumberEntity,OrganisationRole,PhoneNumberServicedeletedSupplierKindenum values changed to match XSD specificationRelated Issues
Closes portion of #28 (Phase 21: ServiceSupplier)
Note: Issue #28 should remain open - additional phases (Phase 22+) are pending.
Verification Steps
mvn clean testmvn verify -Pintegration-testsFiles Changed
🤖 Generated with Claude Code