There are 2 ways to go about this
1. Create a derived formula for the most recent 2 days data and define it as a property in the mapping file
<property name="last2days" type="datetime" formula="DATEDIFF(getdate(),-2')">
</property>
List<client> clients = getHibernateTemplate().find(
"from clientRecord where clientId =? and createdDate > last2days", clientId);
2. If this doesn't work out, use the Criteria object with SQLRestriction to put your native SQL query.