@NamedQuery(name="odcalls.call", query="SELECT C.count(id)," + "C.date(CalllocalTime)," + "C.hour(CalllocalTime) from ODCalls as C " + "where " + " C.date(CallLocalTime) between date_sub(curdate(), Interval 12 month) and date_sub(curdate(),Interval 1 day) : Date " + " and C.FirstQueue != 0 : String " + " and C.Calltype in (1) : int " + "GROUP BY C.hour(CallLocalTime), C.date(CallLocalTime)") This is my Dao class public class ODCallsImpl implements IDao <ODCalls> { EntityManager em = EntitiyManagerUtil.getInstance().getEntityManager(); private List<ODCalls> calls = new ArrayList<ODCalls>(); @SuppressWarnings("unchecked" @Override @PersistenceContext public List<ODCalls> getAll() { calls = em.createNamedQuery(" odcalls.incoming";,ODCalls.class).getResultList(); em.close(); return calls; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)