-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor/mappers and dtos #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors entity and DTO classes to replace Lombok’s @Data with explicit @Getter and @Setter, introduces builder patterns for response DTOs, and updates the RecordDetailDtoMapper to use the builder.
- Replace
@Datawith@Getter/@Setteron JPA entities and request DTOs - Add
@Builderto response DTOs and remove manual constructors - Update
RecordDetailDtoMapperto instantiate the DTO via its builder
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/historialplus/historialplus/internal/user/entites/UserEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/user/dto/request/DoctorCreationDto.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/state/entities/StateEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/sextype/entities/SexTypeEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/role/entites/RoleEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/recorddetail/mapper/RecordDetailDtoMapper.java | Switched to builder instantiation |
| src/main/java/com/historialplus/historialplus/internal/recorddetail/entites/RecordDetailEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/recorddetail/dto/response/RecordDetailResponseDto.java | Added @Builder; removed manual constructor |
| src/main/java/com/historialplus/historialplus/internal/record/entites/RecordEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/people/entities/PeopleEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/patientallergy/entities/PatientAllergyEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/hospital/entities/HospitalEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/filetype/entities/FileTypeEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/file/entites/FileEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/documenttype/entities/DocumentTypeEntity.java | Replaced @Data with @Getter/@Setter |
| src/main/java/com/historialplus/historialplus/internal/allergycatalog/entities/AllergyCatalogEntity.java | Replaced @Data with @Getter/@Setter |
Comments suppressed due to low confidence (2)
src/main/java/com/historialplus/historialplus/internal/recorddetail/mapper/RecordDetailDtoMapper.java:24
- Consider adding or updating unit tests to cover this mapper method, verifying each field is correctly mapped from
RecordDetailEntitytoRecordDetailResponseDto.
public static RecordDetailResponseDto toResponseDto(RecordDetailEntity detailEntity) {
src/main/java/com/historialplus/historialplus/internal/user/entites/UserEntity.java:32
- [nitpick] Replacing @DaTa removes generated equals() and hashCode() methods. If entity equality or hash-based collections rely on these, consider adding explicit implementations or using @EqualsAndHashCode.
@Getter
|
|
||
| @Getter | ||
| @Setter | ||
| @Builder |
Copilot
AI
Jul 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DTOs used for JSON serialization often require a no-args constructor. Consider adding @NoArgsConstructor to this class to ensure frameworks like Jackson can deserialize it.
| @Builder | |
| @Builder | |
| @NoArgsConstructor |



No description provided.