Interface AccountMapper
public interface AccountMapper
Mapper interface for converting back and forth from the Account entity to its DTO's in addition to cascading updates
from a DTO to the entity.
- Since:
- 24.4.24
- Version:
- 1.0
- Author:
- Lars N.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AccountMapper
Implementation instance of the mapper -
Method Summary
Modifier and TypeMethodDescriptionConverts to dto from entity for accounttoEntity
(AccountDTO account) Converts from dto to entity for accountupdateEntity
(Account account, AccountUpdateDTO accountDTO) Updates account entity using a dto.
-
Field Details
-
INSTANCE
Implementation instance of the mapper
-
-
Method Details
-
toEntity
Converts from dto to entity for account- Parameters:
account
- Account dto- Returns:
- Converted entity
-
toDTO
Converts to dto from entity for account- Parameters:
account
- Account entity- Returns:
- Converted dto
-
updateEntity
Updates account entity using a dto. Ignores fields that are null- Parameters:
account
- Account entity that is updatedaccountDTO
- Account dto with the new changes- Returns:
- Updated account entity
-