Package me.josephsf.jobportaljosephsfeir.dto
This package contains all the Data Transfer Objects used throughout the Job Portal system to transfer data between different layers of the application (controller, service, repository) and between the server and client. DTOs are immutable objects that only contain fields, getters/setters, and validation constraints.
The DTO classes in this package serve several purposes:
- Decoupling the domain model from the presentation layer
- Handling input validation through Jakarta Bean Validation annotations
- Providing clear API contracts for data exchange
- Hiding implementation details of the domain model
Key DTOs include:
CandidateDto- For job seeker profile dataRecruiterDto- For company recruiter profile dataJobDto- For job listing informationApplicationDto- For job application dataLoginDto- For authentication credentialsRegisterDto- For user registration dataJwtResponseDto- For authentication token responsesApiResponseDto- For standardized API responsesUserDto- For user account information
Most DTOs contain validation annotations from the Jakarta Bean Validation API to ensure data integrity before processing requests:
- @NotNull - Ensures a value is not null
- @NotBlank - Ensures a string value is not null, empty, or just whitespace
- @Size - Constrains the size of strings, collections, maps, and arrays
- @Min/@Max - Constrains numeric values
- @Email - Validates email format
Note that DTOs are distinct from domain model entities in the
me.josephsf.jobportaljosephsfeir.model package, which represent the database entities.
Conversion between DTOs and model entities is typically handled in the service layer.
- Since:
- 2025-05-14
-
ClassesClassDescriptionData Transfer Object (DTO) for API response messages in the Job Portal application.Data Transfer Object (DTO) for job applications in the Job Portal system.Data Transfer Object for candidate profile information.Data Transfer Object for job posting information.Data Transfer Object for JWT authentication response.Data Transfer Object for user login credentials.Data Transfer Object for recruiter profile information.Data Transfer Object for user registration.Data Transfer Object for user information.