Examples of equal()


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

        Property<?> relationshipNameProp = modelProperties.get(PROPERTY_RELATIONSHIP_NAME);

        List<Predicate> predicates = new ArrayList<Predicate>();

        if (parent) {
            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                    lookupIdentity(identity, em)));
        } else {
            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                    lookupIdentity(identity, em)));
        }
View Full Code Here

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

        if (parent) {
            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                    lookupIdentity(identity, em)));
        } else {
            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                    lookupIdentity(identity, em)));
        }

        if (relationshipType != null) {
            predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
View Full Code Here

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

            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                    lookupIdentity(identity, em)));
        }

        if (relationshipType != null) {
            predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
                    lookupRelationshipType(relationshipType, em)));
        }

        if (named) {
            if (name != null) {
View Full Code Here

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

                    lookupRelationshipType(relationshipType, em)));
        }

        if (named) {
            if (name != null) {
                predicates.add(builder.equal(root.get(relationshipNameProp.getName()),
                        name));
            } else {
                predicates.add(builder.isNotNull(root.get(relationshipNameProp.getName())));
            }
        }
View Full Code Here

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

            CriteriaBuilder builder = em.getCriteriaBuilder();
            CriteriaQuery<?> criteria = builder.createQuery(credentialClass);
            Root<?> root = criteria.from(credentialClass);

            List<Predicate> predicates = new ArrayList<Predicate>();
            predicates.add(builder.equal(root.get(credentialIdentity.getName()),
                    identity));

            if (credentialType != null) {
                if (String.class.equals(credentialType.getJavaClass())) {
                    predicates.add(builder.equal(root.get(credentialType.getName()),
View Full Code Here

Examples of javax.persistence.criteria.QueryBuilder.equal()

        // create the same query and get typed results.
        QueryBuilder qb = em.getQueryBuilder();
        CriteriaQuery<Order> cq = qb.createQuery(Order.class);
        Root<Order> order = cq.from(Order.class);
        cq.select(order).where(qb.equal(order.get(Order_.filled), Boolean.TRUE));

        TypedQuery<Order> typedCriteriaQuery = em.createQuery(cq);
        List<Order> typedCriteriaResults = typedCriteriaQuery.getResultList();
        assertEquals(N_ORDERS / 2, typedCriteriaResults.size());
View Full Code Here

Examples of org.apache.cxf.ws.policy.PolicyAssertion.equal()

    public void testEqual() {
        PolicyAssertion other = new PrimitiveAssertion(new QName("abc"));
        for (int i = 0; i < policies.length; i++) {
            PolicyAssertion a =
                (PolicyAssertion)policies[i].getFirstPolicyComponent();
            assertTrue("Assertion " + i + " should equal itself.", a.equal(a));
            assertTrue("Assertion " + i + " should not equal other.", !a.equal(other));
            for (int j = i + 1; j < policies.length; j++) {
                Assertion b = (Assertion)policies[j].getFirstPolicyComponent();
                if (j == 1) {
                    assertTrue("Assertion " + i + " should equal " + j + ".", a.equal(b));
View Full Code Here

Examples of org.apache.neethi.Assertion.equal()

        bi.setAsserted(true);
        ci.setAsserted(true);
        EasyMock.expect(a1.equal(a1)).andReturn(true).anyTimes();
        EasyMock.expect(a2.equal(a2)).andReturn(true).anyTimes();
        EasyMock.expect(b.equal(b)).andReturn(true).anyTimes();
        EasyMock.expect(c.equal(c)).andReturn(true).anyTimes();
       
       
        List<Assertion> alt1 = new ArrayList<Assertion>();
        alt1.add(a1);
        alt1.add(b);
View Full Code Here

Examples of org.apache.neethi.Policy.equal()

            for (PolicyInfo pi : proxy.getPolicies()) {
                if (pi.isServicePolicy()) {
                    config.getEntryDefinition(pi.getPolicyKey());
                    Policy proxyPolicy = PolicyEngine.getPolicy(SynapseConfigUtils.getStreamSource(
                            config.getEntry(pi.getPolicyKey())).getInputStream());
                    if (proxyPolicy.equal(policy.normalize(false))) {
                        return null;
                    }
                }
            }
            return new PolicyInfo(policyPath);
View Full Code Here

Examples of org.apache.openjpa.persistence.query.DomainObject.equal()

        DomainObject emp = q1.addRoot(Employee.class);
       
        QueryDefinition q2 = qb.createQueryDefinition();
        DomainObject spouseEmp = q2.addRoot(Employee.class);
       
        q2.where(spouseEmp.equal(emp.get("spouse"))).select(spouseEmp);
        q1.selectDistinct(emp).where(q2.exists());
       
        String jpql = "SELECT DISTINCT e "
                    + " FROM Employee e"
                    + " WHERE EXISTS ("
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.