List<Criterion> criterions = new ArrayList<Criterion>();
criterions.add(Restrictions.or( Restrictions.like("userRoles", "%" + UserRole.ASSESSMENT.name() + "%"), Restrictions.like("userRoles", "%" + UserRole.SITE.name() + "%"), Restrictions.like("userRoles", "%" + UserRole.SECURITY.name() + "%"), Restrictions.like("userRoles", "%" + UserRole.TICKET.name() + "%"), Restrictions.like("userRoles", "%" + UserRole.SUPERVISOR.name() + "%"), Restrictions.like("userRoles", "%" + UserRole.SAFETYCHECK.name() + "%"), Restrictions.like("userRoles", "%" + UserRole.STAGE.name() + "%")));
Criteria criteria = session.createCriteria(Film.class);
List<Film> list = criteria.add( Restrictions.or(Restrictions.like("description", key,MatchMode.ANYWHERE), Restrictions.or(Restrictions.like("name", key,MatchMode.ANYWHERE), Restrictions.or( Restrictions.like("direct", key,MatchMode.ANYWHERE), Restrictions.or(Restrictions.like("mainplay",key,MatchMode.ANYWHERE), Restrictions.like("filearea", key,MatchMode.ANYWHERE)))))).list();