feat: ESPI 4.0 Schema Compliance - Phase 20: Customer with JAXB Infrastructure #90
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 completes Phase 20 Customer schema compliance verification and establishes comprehensive JAXB infrastructure for proper namespace isolation across all ESPI domains.
JAXB Infrastructure (Foundation for all future phases)
UsageExportService,CustomerExportService)BaseExportServicewith namespace-aware JAXBContext initializationDtoExportServiceFacadefor backwards compatibility with existing controllersCustomerAtomEntryDtoandUsageAtomEntryDtofor domain isolationOffsetDateTimeAdapterfor JAXB unmarshalling support (foundation for Issue Implement comprehensive JAXB unmarshalling support for XML import #89)EspiNamespacePrefixMapperfor controlled namespace prefixes (espi: vs cust:)Phase 20 Customer Verification
CustomerEntityfield order matchescustomer.xsdexactlyCustomerDtofield order matchescustomer.xsdexactlyCustomerMappermappings handle all embedded types correctlyCustomerRepositoryuses only indexed queriesCustomerServiceimplements basic CRUD operationsComprehensive Test Coverage
38 tests passing across 5 test suites:
Unit Tests (22 tests)
CustomerRepositoryTest: 19 tests (added 4 embedded object persistence tests)CustomerDtoMarshallingTest: 3 tests (validates customer.xsd field sequence)Migration Tests (11 tests)
MigrationVerificationTest: Added 3 Customer-specific tests for embedded objectsIntegration Tests with TestContainers (16 tests)
CustomerMySQLIntegrationTest: 8 tests (MySQL 8.0)CustomerPostgreSQLIntegrationTest: 8 tests (PostgreSQL 18)All embedded objects tested:
Bug Fixes
Critical: Fixed Flyway V3 migration Customer table index
CREATE INDEX idx_customer_status ON customers (status)CREATE INDEX idx_customer_status ON customers (status_value)V3__Create_additiional_Base_Tables.sql:168Fixed
CustomerRepositoryTestcompilation: Added missingOrganisationimportTechnical Details
JAXB Infrastructure
xmlns:espi="http://naesb.org/espi"+xmlns:atomxmlns:cust="http://naesb.org/espi/customer"+xmlns:atomTesting
JaxbXmlMarshallingTest, Export service tests)Related Issues
Test Results
🤖 Generated with Claude Code