@GET
@Produces({"application/xml", "application/json"})
@Path("/recent/producttype/{id}")
public List<LiveSalesList> findRecentProductType(@PathParam("id") Integer productTypeId) {
CriteriaBuilder cb = getEntityManager().getCriteriaBuilder();
javax.persistence.criteria.CriteriaQuery cq = cb.createQuery();
Root<LiveSalesList> liveSalesList = cq.from(LiveSalesList.class);
cq.select(liveSalesList);
cq.where(cb.equal(liveSalesList.get(LiveSalesList_.productTypeId), productTypeId));
Query q = getEntityManager().createQuery(cq);
q.setMaxResults(500);
return q.getResultList();
}
LiveSalesListFacadeREST.java 文件源码
java
阅读 46
收藏 0
点赞 0
评论 0
项目:marathonv5
作者:
评论列表
文章目录