I Want to call the JPA repository functions to access the data from the database based on the String value passed.
So I want to make the string as the key and the reposetory function as Value so that I could call the function like:
map.set("id":repository.findById())
map.set("name":repository.findByName())
To access the result I just pass the string(str) value as "id" or "name" and get the result. call map.get(str);
I got a solution Maps : In Java Maps can I assign a function to the value in the <K,V> pair?, But it's looking old approach, do we have any other new/better approach...?