use of com.intel.mtwilson.as.data.TblRequestQueue in project OpenAttestation by OpenAttestation.
the class TblRequestQueueJpaController method getTblRequestQueueCount.
public int getTblRequestQueueCount() {
EntityManager em = getEntityManager();
try {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
Root<TblRequestQueue> rt = cq.from(TblRequestQueue.class);
cq.select(em.getCriteriaBuilder().count(rt));
Query q = em.createQuery(cq);
return ((Long) q.getSingleResult()).intValue();
} finally {
em.close();
}
}
Aggregations