refactor: Phase 7 - ServiceDeliveryPoint ESPI 4.0 schema compliance#73
Merged
dfcoffin merged 1 commit intoJan 9, 2026
Merged
Conversation
Per ESPI 4.0 specification, ServiceDeliveryPoint extends Object (not IdentifiedObject), so it has NO Atom metadata fields. This phase aligns the DTO, mapper, and repository with the XSD definition. Changes: - ServiceDeliveryPointDto: Remove id/uuid fields (Object type has no mRID) - ServiceDeliveryPointDto: Update propOrder to match XSD sequence (name, tariffProfile, customerAgreement, tariffRiderRefs) - ServiceDeliveryPointMapper: Remove id/uuid mappings, add explicit XSD element mappings - ServiceDeliveryPointMapper: Remove updateEntity method (read-only operations) - ServiceDeliveryPointRepository: Keep only indexed query (findAllIds) - ServiceDeliveryPointRepositoryTest: Remove tests for deleted custom queries All 536 tests pass. Entity already matches XSD structure correctly. 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
Phase 7 of Issue #28: Aligns ServiceDeliveryPoint DTO, mapper, and repository with ESPI 4.0 XSD specification.
Key Finding: Per ESPI 4.0 specification (espi.xsd), ServiceDeliveryPoint extends Object (not IdentifiedObject), so it has NO id/uuid/mRID fields or Atom metadata.
Changes Made
DTO Updates (ServiceDeliveryPointDto)
Long idandString uuidfields (Object type has no mRID attribute)@XmlType propOrderto match XSD element sequence: name → tariffProfile → customerAgreement → tariffRiderRefsMapper Updates (ServiceDeliveryPointMapper)
@Mappingfor id and uuid (fields no longer exist in DTO)ignore = true(XML-only field, not persisted in entity)updateEntity()method (read-only operations only)MappingTargetRepository Updates (ServiceDeliveryPointRepository)
findAllIds()findByName,findByTariffProfile,findByCustomerAgreement,findByNameContaining,countByTariffProfiledeleteByIdoverride (JpaRepository provides it)Test Updates (ServiceDeliveryPointRepositoryTest)
findAllIds()test (indexed query retained)Verification
Entity Verification
✅ ServiceDeliveryPointEntity structure already matches XSD correctly:
Long id(BIGINT primary key)Database Verification
✅ Flyway migrations verified in all vendor-specific V2 scripts:
db/vendor/mysql/V2__MySQL_Specific_Tables.sqldb/vendor/postgres/V2__PostgreSQL_Specific_Tables.sqldb/vendor/h2/V2__H2_Specific_Tables.sqlAll scripts create
service_delivery_pointstable with correct structure and indexes.Test Results
✅ All tests pass (ServiceDeliveryPointRepositoryTest: 23 tests)
✅ MySQL TestContainer integration tests pass
✅ H2 integration tests pass
Technical Notes
XSD Compliance
Per
espi.xsdline ~1161:Object base type has NO mRID attribute (unlike IdentifiedObject which has mRID). This is consistent with other Object-based types like IntervalReading and ReadingQuality.
Repository Query Removal Rationale
Removed non-indexed queries following read-only CRUD pattern from Phases 5-6:
findByName,findByTariffProfileetc. were not indexed and not usedfindAllIds()as it provides indexed bulk ID retrievalRelated Issues
Testing Checklist
🤖 Generated with Claude Code