Class MappersImpl
java.lang.Object
com.brodygaudel.bank.common.util.implementation.MappersImpl
- All Implemented Interfaces:
Mappers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromAccount
(@NotNull Account account) Converts an Account entity to an AccountResponseDTO.fromCustomer
(@NotNull Customer customer) Converts a Customer entity to a CustomerResponseDTO.fromListOfAccounts
(@NotNull List<Account> accounts) Converts a list of Account entities to a list of AccountResponseDTOs.fromListOfCustomers
(@NotNull List<Customer> customers) Converts a list of Customer entities to a list of CustomerResponseDTOs.fromListOfOperations
(@NotNull List<Operation> operations) Converts a list of Operation entities to a list of OperationResponseDTOs.fromOperation
(@NotNull Operation operation) Converts an Operation entity to an OperationResponseDTO.
-
Constructor Details
-
MappersImpl
public MappersImpl()
-
-
Method Details
-
fromCustomer
Description copied from interface:Mappers
Converts a Customer entity to a CustomerResponseDTO.- Specified by:
fromCustomer
in interfaceMappers
- Parameters:
customer
- The Customer entity to be converted.- Returns:
- The corresponding CustomerResponseDTO.
-
fromListOfCustomers
Description copied from interface:Mappers
Converts a list of Customer entities to a list of CustomerResponseDTOs.- Specified by:
fromListOfCustomers
in interfaceMappers
- Parameters:
customers
- The list of Customer entities to be converted.- Returns:
- The corresponding list of CustomerResponseDTOs.
-
fromAccount
Description copied from interface:Mappers
Converts an Account entity to an AccountResponseDTO.- Specified by:
fromAccount
in interfaceMappers
- Parameters:
account
- The Account entity to be converted.- Returns:
- The corresponding AccountResponseDTO.
-
fromListOfAccounts
Description copied from interface:Mappers
Converts a list of Account entities to a list of AccountResponseDTOs.- Specified by:
fromListOfAccounts
in interfaceMappers
- Parameters:
accounts
- The list of Account entities to be converted.- Returns:
- The corresponding list of AccountResponseDTOs.
-
fromOperation
Description copied from interface:Mappers
Converts an Operation entity to an OperationResponseDTO.- Specified by:
fromOperation
in interfaceMappers
- Parameters:
operation
- The Operation entity to be converted.- Returns:
- The corresponding OperationResponseDTO.
-
fromListOfOperations
public List<OperationResponseDTO> fromListOfOperations(@NotNull @NotNull List<Operation> operations) Description copied from interface:Mappers
Converts a list of Operation entities to a list of OperationResponseDTOs.- Specified by:
fromListOfOperations
in interfaceMappers
- Parameters:
operations
- The list of Operation entities to be converted.- Returns:
- The corresponding list of OperationResponseDTOs.
-