Internal Website Search

131-140 of 153 resultsRefresh

Criteria Query results in a NoResultException instead of returning object

); List<Predicate> predicates = new ArrayList<Predicate>(); predicates.add ... .getName()));     criteria.where(predicates.toArray(new Predicate[predicates ... "> predicates.add(builder.equal(root.get(identityNameProp.getName()), obj.getName())); To build

Problem witch CriteriaBuilder isMember(..)

= new Testclass(1,2); Predicate predicate = cb.isMember(searchobject,root.<Collection< ... > String searchobject = "testtext"; Predicate predicate = cb.isMember(searchobject,root ... ); Predicate predicate = cb.equal(a_root.<Testclass>get("testobject"), searchobject);

java.sql.Date equals comparison not working with CriteriaAPI

= ...; java.sql.Date myDate = ...; Predicate predicate = builder.equal(root.get("eintritt"), builder.literal ... >predicate yields in something like: $1.eintritt=2013-11-01Predicate predicate = cb.equal(root

CriteriaQuery using isNotNull with other conditions results in InternalException

); criteria.select(root); List<Predicate> predicates = new ArrayList<Predicate>(); predicates.add(builder.equal(root.get("to"), identityObject)); predicates.add(builder.equal(root.get("relationshipType"), relationshipTypeObject)); predicates.add(builder

Help with 'not like/lower' query

.get(property.getFieldName()); Predicate predicate; if(property.getOperator().equals(Operator.LIKE)){ predicate = criteriaBuilder.like(criteriaBuilder.lower(path), stringProp ... (Operator.NOT_LIKE)){ predicate = criteriaBuilder.notLike(criteriaBuilder.lower(path), stringProp

OR not working with isNull

Given the following: Predicate isOwnedByUser = cb.equal(root.get("owner").get("id"), userId); Predicate ownerIsNull = cb.isNull(root.get("owner")); Predicate ownerMatchesOrIsNull = cb.or(ownerIsNull, isOwnedByUser); The isNull predicate

How to add minutes to a Date with JPA2

> dateDelay = cb.diff(currentDate, delayMinute); Predicate predicateCounterNotUpdate = cb ... ;, Expression<capture#20-of ? extends Number>) predicate = cb.and(predicate, predicateCounterNotUpdate);      

Error using query with MAX() function

); CriteriaQuery<Object> s = q.select(me); Predicate predicate = cb.isNotNull(c); q.where(predicate); TypedQuery<Object> tq = em.createQuery(s); Date mDate = (Date

value(value)

> in predicate

value(value)

predicate Since: JPA 2.0