I was using hibernate
but i heard that spring-data-jpa
is the best so i try it and i'm satisfy with it until i face this issue.
I have a search form in my jsp
with many criteria and the user can choose whatever he want.
So what is the equivalent of this request in spring-data-jpa
if(startDate!=null){
criteria.add(Expression.ge("date",startDate));
}
if(endDate!=null){
criteria.add(Expression.le("date",endDate));
}
if(volume!=null){
criteria.add(Expression.ge("volume",volume));
}
if ....