public List < QueryQuestionComment > listByQueryPageAndStamp ( QueryPage queryPage , PanelStamp stamp ) { EntityManager entityManager = getEntityManager ( ) ; CriteriaBuilder criteriaBuilder = entityManager . getCriteriaBuilder ( ) ; CriteriaQuery < QueryQuestionComment > criteria = criteriaBuilder . createQuery ( QueryQuestionComment . class ) ; Root < QueryQuestionComment > root = criteria . from ( QueryQuestionComment . class ) ; Join < QueryQuestionComment , QueryReply > qqJoin = root . join ( QueryQuestionComment_ . queryReply ) ; criteria . select ( root ) ; criteria . where ( criteriaBuilder . and ( criteriaBuilder . equal ( qqJoin . get ( QueryReply_ . stamp ) , stamp ) , criteriaBuilder . equal ( root . get ( QueryQuestionComment_ . queryPage ) , queryPage ) , criteriaBuilder . equal ( root . get ( QueryQuestionComment_ . archived ) , Boolean . FALSE ) ) ) ; return entityManager . createQuery ( criteria ) . getResultList ( ) ; }
Lists all nonarchived comments left on the given query page in the given panel stamp .