Commented out HQL and added Criteria based searching.