Thanks it worked for me.
title like ‘%”+title+”%’
when i used this in my hql it didn’t
work for the strings with escape characetrs such as ‘(apostrophe)
but
title like :title
in my hql
query.setString(“title”, ‘%’+title+’%’);
it worked.