Package com.brodygaudel.bank.common.util
Interface Mappers
- All Known Implementing Classes:
MappersImpl
public interface Mappers
Interface defining mapping methods to convert domain entities to DTOs (Data Transfer Objects).
Implementations of this interface provide methods for converting various domain entities, such as Customer, Account, and Operation, into their corresponding DTO representations.
-
Method Summary
Modifier and TypeMethodDescriptionfromAccount
(Account account) Converts an Account entity to an AccountResponseDTO.fromCustomer
(Customer customer) Converts a Customer entity to a CustomerResponseDTO.fromListOfAccounts
(List<Account> accounts) Converts a list of Account entities to a list of AccountResponseDTOs.fromListOfCustomers
(List<Customer> customers) Converts a list of Customer entities to a list of CustomerResponseDTOs.fromListOfOperations
(List<Operation> operations) Converts a list of Operation entities to a list of OperationResponseDTOs.fromOperation
(Operation operation) Converts an Operation entity to an OperationResponseDTO.
-
Method Details
-
fromCustomer
Converts a Customer entity to a CustomerResponseDTO.- Parameters:
customer
- The Customer entity to be converted.- Returns:
- The corresponding CustomerResponseDTO.
-
fromListOfCustomers
Converts a list of Customer entities to a list of CustomerResponseDTOs.- Parameters:
customers
- The list of Customer entities to be converted.- Returns:
- The corresponding list of CustomerResponseDTOs.
-
fromAccount
Converts an Account entity to an AccountResponseDTO.- Parameters:
account
- The Account entity to be converted.- Returns:
- The corresponding AccountResponseDTO.
-
fromListOfAccounts
Converts a list of Account entities to a list of AccountResponseDTOs.- Parameters:
accounts
- The list of Account entities to be converted.- Returns:
- The corresponding list of AccountResponseDTOs.
-
fromOperation
Converts an Operation entity to an OperationResponseDTO.- Parameters:
operation
- The Operation entity to be converted.- Returns:
- The corresponding OperationResponseDTO.
-
fromListOfOperations
Converts a list of Operation entities to a list of OperationResponseDTOs.- Parameters:
operations
- The list of Operation entities to be converted.- Returns:
- The corresponding list of OperationResponseDTOs.
-