Advertisement
Guest User

Untitled

a guest
Dec 6th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. /**
  2. * Returns the appointment blocks corresponding to the given date and location.
  3. *
  4. * @param date the date to filter by.
  5. * @param location the location to filter by.
  6. * @return the appointment blocks that is on the given date and location.
  7. */
  8. @Override
  9. @Transactional(readOnly = true)
  10. public List<AppointmentBlock> getAppointmentBlocks(String date,Location location) {
  11. Criteria criteria = sessionFactory.getCurrentSession().createCriteria(AppointmentBlock.class);
  12. criteria.add(Restrictions.eq("location", location));
  13. criteria.add(Restrictions.ilike("startDate", date, MatchMode.START));
  14. return criteria.list();
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement