This commit introduces comprehensive AlbumArt entity management following
the established repository pattern used for other entities like SamplingRate.
Key components implemented:
Model Layer:
- AlbumArt entity with id and filepath fields
- JPA annotations for database persistence
Repository Layer:
- AlbumArtRepository with EntityManager-based operations
- Full transaction management with proper rollback handling
- Methods: save, findAll, findById, update, deleteById
Service Layer:
- AlbumArtService with business logic and validation
- Input validation for null/empty filepath values
- ID validation for all operations requiring entity lookup
- Comprehensive logging using Log4j2
Mapper Layer:
- AlbumArtMapper for bidirectional entity/protobuf conversion
- Null safety checks and validation
- Proper handling of optional ID field
Action Handlers:
- CreateAlbumArtHandler (albumart.create)
- GetAlbumArtHandler (albumart.getAll)
- GetAlbumArtByIdHandler (albumart.getById)
- UpdateAlbumArtHandler (albumart.update)
- DeleteAlbumArtHandler (albumart.delete)
- HTTP status code handling: 200 (success), 400 (validation),
404 (not found), 500 (server error)
Protocol Buffers:
- Fixed java_outer_classname from "BitDepthMessages" to "AlbumArtMessages"
- All CRUD message definitions (Create, Get, GetById, Update, Delete)
The implementation follows best practices with proper error handling,
logging, validation, and consistency with existing codebase patterns.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>