Hello smayemba,
Although Hibernate QL looks similar to SQL it is not. The selection depends on the type of the object you use.
My first intuition would say (java coded):
Code:
String hql=
"Select contracts from Contract as contracts Where
contracts.purchasedate<=:purchasedate and
contracts.enddate>=:enddate;";
Query q = Session.createQuery(hql);
q.setParameter("purchasedate",Calendar.getInstance());
q.setParameter("enddate",Calendar.getInstance());
List result = q.list();
This is out of my head, so there could be some mistakes in it. Hope this helps.