, , * _FILTER , , DAO , :
public List<MyEntity> findByFilter(MyEntityFilter filter) {
Criteria criteria = session.createCriteria(MyEntity.class)
if (filter.getName() != null) {
criteria.add( Restrictions.like("name", filter.getName())
}
... Go on testing and adding other parts of the query
return criteria.list();
MyEntityFilter . , , , . , . , , : name = John; color = blue, red, yellow; parameter3 = value *, . , !
Filter.
spring hibernate, HibernateDaoSupport, , .
, api, HQL, api ( , ).