use of fi.otavanopisto.muikku.plugins.timed.notifications.model.AssesmentRequestNotification in project muikku by otavanopisto.
the class AssessmentRequestNotificationDAO method listByStudentIdentifierAndDateAfter.
public List<AssesmentRequestNotification> listByStudentIdentifierAndDateAfter(String studentIdentifier, Date sent) {
EntityManager entityManager = getEntityManager();
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<AssesmentRequestNotification> criteria = criteriaBuilder.createQuery(AssesmentRequestNotification.class);
Root<AssesmentRequestNotification> root = criteria.from(AssesmentRequestNotification.class);
criteria.select(root);
criteria.where(criteriaBuilder.and(criteriaBuilder.equal(root.get(AssesmentRequestNotification_.studentIdentifier), studentIdentifier), criteriaBuilder.greaterThanOrEqualTo(root.get(AssesmentRequestNotification_.sent), sent)));
return entityManager.createQuery(criteria).getResultList();
}
Aggregations