Interface UserMapper
public interface UserMapper
Mapper interface for converting back and forth
from a DTO to a User entity.
- Since:
- 25.4.24
- Version:
- 1.0
- Author:
- Yasin M.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionMaps from User entity to DTOtoStreakResponse
(User user, ZonedDateTime firstDue) Maps from User to Streak DTOvoid
updateEntity
(User user, UserUpdateDTO updateDTO, String encodedPassword) Updates User entity from DTO
-
Field Details
-
INSTANCE
Implementation instance of the mapper
-
-
Method Details
-
toDTO
Maps from User entity to DTO- Parameters:
user
- User entity- Returns:
- Mapped DTO
-
updateEntity
Updates User entity from DTO- Parameters:
user
- User entityupdateDTO
- DTO with new changesencodedPassword
- Encoded password
-
toStreakResponse
Maps from User to Streak DTO- Parameters:
user
- User entityfirstDue
- Date where streak is due- Returns:
- Mapped DTO
-