Service for managing Grid entities.
More...
Service for managing Grid entities.
Provides duplication operations on grids, mapping entities to GridDto and validating DTOs with JakartaValidator after persistence.
Methods:
Throws NullPointerException for null IDs, IllegalArgumentException if the entity is missing, and jakarta.validation.ConstraintViolationException on validation failures.
◆ GridService()
Constructs a new GridService with the required database and mapping dependencies.
- Parameters
-
| gridRepository | the repository used to access and persist Grid entities |
| gridMapper | the mapper used to convert Grid entities to GridDto |
| jakartaValidator | the validator used to ensure data integrity of processed DTOs |
◆ duplicateGrid()
| GridDto fr.softsf.sudokufx.service.business.GridService.duplicateGrid |
( |
Long | gridId | ) |
|
Duplicates an existing Grid entity by creating a new record with a generated ID using the fluent builder.
Fetches the source entity, copies its properties to a new instance via the builder API, persists it, and validates the resulting DTO before returning.
- Parameters
-
| gridId | the ID of the Grid entity to duplicate; must not be null |
- Returns
- the newly created and validated
GridDto
- Exceptions
-
| NullPointerException | if gridId is null |
| IllegalArgumentException | if the source Grid entity does not exist |
| jakarta.validation.ConstraintViolationException | if validation fails on the resulting DTO |
◆ gridMapper
| final IGridMapper fr.softsf.sudokufx.service.business.GridService.gridMapper |
|
private |
◆ gridRepository
| final GridRepository fr.softsf.sudokufx.service.business.GridService.gridRepository |
|
private |
◆ jakartaValidator
| final JakartaValidator fr.softsf.sudokufx.service.business.GridService.jakartaValidator |
|
private |
The documentation for this class was generated from the following file: