I want to write a select statement but can’t figure out how to write the where clause…
My code:
CriteriaQuery query = entityManager.getCriteriaBuilder().createQuery();
query.select(query.from(SecureMessage.class)).where();
This is within a method that I am passing a string to. I want to fetch only the rows that match the value of the string that Im passing to the method.
As I understand, the method parameter should be the parameter of the query.
So, should looks like:
where
arg1– your method String parameter