List of usage examples for javax.persistence TypedQuery toString
public String toString()
From source file:org.jasig.portlet.notice.service.jpa.JpaNotificationDao.java
@Override @Transactional(readOnly = true)//w w w . j a v a2 s.c o m public Set<JpaEntry> getEntriesByRecipient(String username) { Validate.notEmpty(username, "Argument 'username' cannot be empty"); final String jpql = "SELECT DISTINCT v.entry FROM JpaEvent v " + "WHERE v.username = :username"; TypedQuery<JpaEntry> query = entityManager.createQuery(jpql, JpaEntry.class); log.debug("Query getEntriesByRecipient={}", query.toString()); query.setParameter("username", username); List<JpaEntry> rslt = query.getResultList(); return new HashSet<JpaEntry>(rslt); }