Conversation
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.