Deprecation of Hibernate Criteria and how we can still prevent it

I’m still using legacy criteria, I like it especially DetachedCriteria.