Interface OrganizationDTOMapper
public interface OrganizationDTOMapper
A mapper interface for converting between Organization domain model and its corresponding DTOs. Uses MapStruct for automatic mapping.
-
Method Summary
Modifier and TypeMethodDescriptionConverts aCreateOrganizationRequest
DTO to aOrganization
model.idToOrganization
(Long id) Converts the unique identifier of the organization toOrganization
model.organizationToCreateResponse
(Organization organization) Converts aOrganization
model to aCreateOrganizationResponse
DTO.organizationToGetOrganizationResponse
(Organization organization) Converts anOrganization
entity to aGetOrganizationResponse
DTO.Converts a paginatedPage
ofOrganization
entities to a paginatedPageDTO
ofGetOrganizationResponse
DTOs.Converts anUpdateOrganizationRequest
DTO to aOrganization
model.
-
Method Details
-
organizationToGetOrganizationResponse
Converts anOrganization
entity to aGetOrganizationResponse
DTO.- Parameters:
organization
- the organization model to convert- Returns:
- the corresponding
GetOrganizationResponse
DTO
-
pageOrganizationToPageDTO
Converts a paginatedPage
ofOrganization
entities to a paginatedPageDTO
ofGetOrganizationResponse
DTOs.- Parameters:
page
- the paginated organization entities- Returns:
- a paginated response DTO containing organization data
-
createRequestToOrganization
Converts aCreateOrganizationRequest
DTO to aOrganization
model.- Parameters:
request
- the DTO containing organization creation details- Returns:
- the corresponding
Organization
model
-
updateRequestToOrganization
Converts anUpdateOrganizationRequest
DTO to aOrganization
model.- Parameters:
request
- the DTO containing updated organization details- Returns:
- the corresponding
Organization
model
-
organizationToCreateResponse
Converts aOrganization
model to aCreateOrganizationResponse
DTO.- Parameters:
organization
- the created organization model- Returns:
- the corresponding
CreateOrganizationResponse
DTO
-
idToOrganization
Converts the unique identifier of the organization toOrganization
model.- Parameters:
id
- the unique identifier of organization- Returns:
- the corresponding
Organization
model
-