Skip to content

Conversation

@dfcoffin
Copy link
Contributor

Summary

This PR implements ESPI 4.0 schema compliance for BatchList entity, completing Phase 15 of the migration plan.

Key changes:

  • Changed BatchListEntity primary key from UUID to Long with auto-increment (48-bit identifier)
  • Moved batch_lists table to vendor-specific V2 migrations (H2/MySQL/PostgreSQL)
  • Created BatchListDto with JAXB annotations per espi.xsd BatchListType
  • Created BatchListMapper for Entity-to-DTO conversion (output-only)
  • Created comprehensive test suites (BatchListDtoTest, BatchListMapperTest)
  • Updated BatchListRepositoryTest for Long ID type

Technical Details

  • BatchList is a simple operational entity (NOT an ESPI resource)
  • Does NOT extend IdentifiedObject per ESPI 4.0 specification
  • Uses Long ID with IDENTITY generation instead of UUID
  • DTO follows defensive copy pattern to prevent external modification
  • Mapper follows @component pattern established in Phase 14

Database Migrations

Vendor-specific table creation:

  • H2/MySQL: BIGINT AUTO_INCREMENT PRIMARY KEY
  • PostgreSQL: BIGSERIAL PRIMARY KEY

Test Results

  • All 582 tests passing (unit + integration)
  • Integration tests with TestContainers verified
  • 16 new DTO tests
  • 11 new Mapper tests
  • Repository tests updated for Long ID

Related

🤖 Generated with Claude Code

This commit implements ESPI 4.0 schema compliance for BatchList entity,
migrating from UUID to Long ID with auto-increment and completing the
DTO/Mapper implementation for XML marshalling.

Key Changes:
- Changed BatchListEntity primary key from UUID to Long with IDENTITY generation
- Moved batch_lists table to vendor-specific V2 migrations:
  - H2/MySQL: BIGINT AUTO_INCREMENT PRIMARY KEY
  - PostgreSQL: BIGSERIAL PRIMARY KEY
- Created BatchListDto with JAXB annotations per espi.xsd BatchListType
- Created BatchListMapper for Entity-to-DTO conversion (output-only)
- Updated BatchListRepository for Long ID type parameter
- Created comprehensive test suites:
  - BatchListDtoTest (16 tests)
  - BatchListMapperTest (11 tests)
  - Updated BatchListRepositoryTest for Long ID

Technical Details:
- BatchList is a simple operational entity (NOT an ESPI resource)
- Does NOT extend IdentifiedObject per ESPI 4.0 specification
- DTO uses defensive copy pattern to prevent external modification
- Mapper follows Phase 14 pattern with @component annotation
- All 582 tests passing (including integration tests)

Resolves: Issue #28 - Phase 15: BatchList

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit faa0bbb into main Jan 15, 2026
5 checks passed
@dfcoffin dfcoffin deleted the feature/schema-compliance-phase-15-batch-list branch January 15, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants