Hibernate Criteria AND OR operation on multiple where
This is your actual query, slightly more succint.
session.createCriteria(EUser.class)
.add(Restrictions.disjunction()
.add(Restrictions.like("userName", "mat%"))
.add(Restrictions.like("firstName", "mat%"))
.add(Restrictions.like("lastName", "mat%"))
.add(Restrictions.like("middleName", "mat%")))
.add(Restrictions.eq("enable ", "active"))
.list();
Rather wordy, but does keep your code nice an oop and easy to do dynamic and generic queries.