Prova a vedere questo codice, se funziona:

codice:
StringBuilder sql = new StringBuilder();
sql.append("SELECT p ");
sql.append("FROM Prestazioni p ");
sql.append("WHERE p.programmato = :prog and p.dataOra BETWEEN :da AND :a");

TypedQuery<Prestazioni> qry = getCurrentSession().createQuery(sql.toString(), Prestazioni.class);
qry.setParameter("prog", true);
qry.setParameter("da", ...);
qry.setParameter("a", ...);

List<Prestazioni> lst = qry.getResultList();

Ciao.