首页 > 代码库 > 制定查询条数

制定查询条数

        String hql ="select j from JfAuction j where 1=1 ";
        hql+=" and j.jfEvent.id =";
        hql+=jfEventId;
        hql+=" order by j.score desc ";
        Query query = jfAuctionDao.getSession().createQuery(hql);
        query.setFirstResult(0);
        query.setMaxResults(100);
        List<JfAuction> jfAuctionList=query.list();

制定查询条数