JPA entityManager.createQuery IN

 

 QuotationV quotationV = entityManager.createQuery("select e from QuotationV e where e.consignmentId = :consignmentId and e.status not in (?1,?2)", QuotationV.class)
                        .setParameter(1, IOQStates.INVALIDED.name())
                        .setParameter(2, IOQStates.END.name())
                        .setParameter("consignmentId", consignmentEntity.getId()).getSingleResult();

 

 

 public List<BaseRuleDto> findByIds(List<Long> ids) {
        List<BaseRules> list = entityManager.createQuery("select e from BaseRules e where e.id in :ids ")
                .setParameter("ids", ids).getResultList();
}

 

@Override
    public List<Receipt> findByIds(List<Long> ids) {

        List<Receipt> details = entityManager.createQuery("select e from Receipt e where e.id in (:ids) ")
                .setParameter("ids", ids)
                .getResultList();
        return details;

    }

 

上一篇:<项目记录Ⅰ>jQuery网格插件——jqGrid的使用


下一篇:dashboard 安装(基本认证,用户名、密码登录)