Added getSession method to Criteria.