Let's say I have the following database entity:
Customer
- firstname
- lastname
- status (active | inactive)
- email
And the following (simplified) Java method:
getCustomers (String firstname, String lastname, String status, String email) {...}
If all strings are empty I want to retrieve all records from the database. If lastname and status have values I want to retrieve the relevant records. And so on. So when creating the query I need to check if the fields have values and then add these fields to the database query. How would I best implement this with Quarkus Panache?