Created Hibernate HQL and Creteria queries