• Alien Nathan Edward@lemm.ee
    link
    fedilink
    arrow-up
    16
    ·
    edit-2
    1 year ago

    `/* Gets CustomerEntity from customer repository by customer ID or throws a customer not found exception */

    public CustomerEntity getCustomerEntityById(String customerId){ customerRepository.findById(customerId).orElseThrow(new CustomerNotFoundException()) }`