Commit 8f92b2f
feat: ESPI 4.0 Schema Compliance - Phase 26: Meter Complete Implementation
Implements full ESPI 4.0 compliance for Meter resource per customer.xsd.
Changes:
- Extracted shared embeddables to domain/customer/common/:
* ElectronicAddress (customer.xsd lines 886-936)
* StreetAddress (customer.xsd lines 1285-1320)
* TelephoneNumber (customer.xsd lines 1428-1478)
* MeterMultiplier (customer.xsd MeterMultiplier type)
- MeterEntity: Added meterMultipliers @ElementCollection
- MeterDto: Added 19 XSD-compliant fields including meterMultipliers
- MeterMultiplierDto: New DTO for meter multiplier collection
- MeterMapper: MapStruct mapper with UUID v5 generation
- MeterService: Simplified to 6 CRUD methods (ESPI 4.0 pattern)
- MeterRepository: Removed 11 non-ID query methods
- Flyway V3: Added meter_multipliers collection table
- TestDataBuilders: Added createValidMeter() helper
- Tests: 16 unit tests + 18 integration tests (MySQL/PostgreSQL)
- BigDecimal assertions: Use isEqualByComparingTo() for cross-platform precision
- CLAUDE.md: Added file modification best practices (NEVER use sed/awk)
Updated entities to use extracted embeddables:
- Organisation, Asset, Location, CustomerEntity, CustomerAccountEntity,
CustomerAgreementEntity, EndDeviceEntity, OrganisationRole,
ServiceLocationEntity and all related mappers and tests
All 736 tests passing.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent ccac8e5 commit 8f92b2f
File tree
49 files changed
+3277
-1103
lines changed- openespi-common/src
- main
- java/org/greenbuttonalliance/espi/common
- domain/customer
- common
- entity
- enums
- dto/customer
- mapper/customer
- repositories/customer
- service/customer
- impl
- resources/db/migration
- test/java/org/greenbuttonalliance/espi/common
- dto/customer
- repositories
- customer
- integration
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+3277
-1103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
240 | 274 | | |
241 | 275 | | |
242 | 276 | | |
| |||
0 commit comments