Examples of conjunction()


Examples of javax.persistence.criteria.CriteriaBuilder.conjunction()

       
        CriteriaBuilder cb = getEntityManager().getCriteriaBuilder();
        CriteriaQuery cq = cb.createQuery();
        Root<Request> z = cq.from(Request.class);
       
        Predicate where = cb.conjunction();
        Predicate whereCreatedByOrg = null;
               
        if(id != null) {
            where = cb.and(where, cb.equal(z.get(Request_.id), id));
        }
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.conjunction()

        try
        {
            CriteriaBuilder cb = em.getCriteriaBuilder();
            CriteriaQuery<Section> cq = cb.createQuery(Section.class);
            Root<Section> sectionRoot = cq.from(Section.class);
            Predicate criteria = cb.conjunction();
            criteria = cb.and(criteria, cb.equal(sectionRoot.get("course").get("name"),
                    section.getCourse().getName()));
            criteria = cb.and(criteria, cb.equal(sectionRoot.get("name"), section.getName()));
            cq.where(criteria);
            TypedQuery<Section> sectionQuery = em.createQuery(cq);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.conjunction()

        try
        {
            CriteriaBuilder cb = em.getCriteriaBuilder();
            CriteriaQuery<Section> cq = cb.createQuery(Section.class);
            Root<Section> sectionRoot = cq.from(Section.class);
            Predicate criteria = cb.conjunction();
            criteria = cb.and(criteria, cb.equal(sectionRoot.get("course").get("name"),
                    course.getName()));
            criteria = cb.and(criteria, cb.equal(sectionRoot.get("instructor").get("webID"),
                    instructor.getWebID()));
            criteria = cb.and(criteria, cb.equal(sectionRoot.get("instructor").get("firstName"),
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.conjunction()

       
        // Eager fetch executions (because executions are often needed along with orders)
        _order.fetch(Order_.executions, JoinType.LEFT);
       
        // Construct a predicate for the where clause using conjunction
        Predicate predicate = builder.conjunction();
       
        // accountId
        if (criteria.getAccountId() != null) {
            Path<BrokerageAccount> _account = _order.get(Order_.account);
            Path<Long> _accountId = _account.get(BrokerageAccount_.id);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.conjunction()

        // select * from Transaction
        Root<Transaction> _transaction = query.from(Transaction.class);
       
        // Construct a predicate for the where clause using conjunction
        Predicate predicate = builder.conjunction();
       
        // accountId
        if (criteria.getAccountId() != null) {
            Path<BaseAccount> _account = _transaction.get(Transaction_.account);
            Path<Long> _accountId = _account.get(BaseAccount_.id);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.