Examples of equal()


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

        Root<?> root = criteria.from(relationshipClass);

        List<Predicate> predicates = new ArrayList<Predicate>();
        predicates.add(builder.equal(root.get(fromProperty.getName()),
                lookupIdentity(fromIdentity, em)));
        predicates.add(builder.equal(root.get(toProperty.getName()),
                lookupIdentity(toIdentity, em)));
        predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
                lookupRelationshipType(relationshipType, em)));

        criteria.where(predicates.toArray(new Predicate[predicates.size()]));
View Full Code Here

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

        List<Predicate> predicates = new ArrayList<Predicate>();
        predicates.add(builder.equal(root.get(fromProperty.getName()),
                lookupIdentity(fromIdentity, em)));
        predicates.add(builder.equal(root.get(toProperty.getName()),
                lookupIdentity(toIdentity, em)));
        predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
                lookupRelationshipType(relationshipType, em)));

        criteria.where(predicates.toArray(new Predicate[predicates.size()]));

        Object relationship = em.createQuery(criteria).getSingleResult();
View Full Code Here

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

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

        List<Predicate> predicates = new ArrayList<Predicate>();
        predicates.add(builder.equal(root.get(nameProp.getName()), name));
        criteria.where(predicates.toArray((new Predicate[0])));
        Object roleType = em.createQuery(criteria).getSingleResult();
        em.remove(roleType);

        return null;
View Full Code Here

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

        Property<?> relationshipToProp = modelProperties.get(PROPERTY_RELATIONSHIP_TO);

        List<Predicate> predicates = new ArrayList<Predicate>();
       
        if (identity1 != null) {
            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                loadedIdentity1));
        }

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

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

            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                loadedIdentity1));
        }

        if (identity2 != null) {
            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                loadedIdentity2));
        }

        criteria.where(predicates.toArray(new Predicate[predicates.size()]));
View Full Code Here

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

        criteria.from(relationshipClass);

        predicates = new ArrayList<Predicate>();

        if (identity2 != null) {
            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                loadedIdentity2));
        }
        if (identity1 != null) {
            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                loadedIdentity1));
View Full Code Here

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

        if (identity2 != null) {
            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                loadedIdentity2));
        }
        if (identity1 != null) {
            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                loadedIdentity1));
        }

        criteria.where(predicates.toArray(new Predicate[predicates.size()]));
View Full Code Here

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

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

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

        if (fromIdentity != null) {
            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                    lookupIdentity(fromIdentity, em)));
        }

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

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

            predicates.add(builder.equal(root.get(relationshipFromProp.getName()),
                    lookupIdentity(fromIdentity, em)));
        }

        if (toIdentity != null) {
            predicates.add(builder.equal(root.get(relationshipToProp.getName()),
                    lookupIdentity(toIdentity, 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(toIdentity, em)));
        }

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

        criteria.where(predicates.toArray(new Predicate[predicates.size()]));
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.