Class CustomerEventHandlerService
java.lang.Object
com.brodygaudel.bank.query.service.customer.CustomerEventHandlerService
Service class for handling customer-related events, such as creation, update, and deletion.
- 
Constructor Summary
ConstructorsConstructorDescriptionCustomerEventHandlerService(CustomerRepository customerRepository) Constructs aCustomerEventHandlerServicewith the specifiedCustomerRepository. - 
Method Summary
Modifier and TypeMethodDescriptionvoidon(@NotNull CustomerCreatedEvent event) Handles theCustomerCreatedEventby creating a new customer entity and saving it to the repository.voidon(@NotNull CustomerDeletedEvent event) Handles theCustomerDeletedEventby deleting an existing customer entity from the repository.voidon(@NotNull CustomerUpdatedEvent event) Handles theCustomerUpdatedEventby updating an existing customer entity in the repository. 
- 
Constructor Details
- 
CustomerEventHandlerService
Constructs aCustomerEventHandlerServicewith the specifiedCustomerRepository.- Parameters:
 customerRepository- The repository for managing customer data.
 
 - 
 - 
Method Details
- 
on
Handles theCustomerCreatedEventby creating a new customer entity and saving it to the repository.- Parameters:
 event- TheCustomerCreatedEventto handle.
 - 
on
Handles theCustomerUpdatedEventby updating an existing customer entity in the repository.- Parameters:
 event- TheCustomerUpdatedEventto handle.
 - 
on
Handles theCustomerDeletedEventby deleting an existing customer entity from the repository.- Parameters:
 event- TheCustomerDeletedEventto handle.
 
 -