About CriteriaBuilder

api-jpa

nullif(x, y)

Create an expression that tests whether its argument are equal, returning null if they are and the value of the first expression if they are not.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

all(subquery)

Create an all expression over the subquery results.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

notEqual(x, y)

Create a predicate for testing the arguments for inequality.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

between(v, x, y)

Create a predicate for testing whether the first argument is between the second and third arguments in value.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

toBigInteger(number)

Typecast.(Method of javax.persistence.criteria.CriteriaBuilder)

 
forum_thread

IN expression in a Criteria Query

Hello, I am trying to migrate my Spring project from Hibernate to ObjectDB. On ObjectDB page, it is written that ObjectDB is 100% compatible with JPA. However, I have problem with this JPQL query: SELECT e FROM Employee e WHERE e.present = false AND NOT EXISTS (SELECT c FROM Computer c WHERE c.employeeEntity = e) ORDER BY e.name with Hibernate, there was no problem with this query, but ObjectDB throws exception: ... createEntityManager ( ) ; CriteriaBuilder cb = em. getCriteriaBuilder ( ) ; ... Hi, The test case you have posted uses the CriteriaBuilder API. The problem I was getting, was a syntax error when the "IN ...

 
api-jpa

javax.persistence.EntityManagerFactory

Interface used to interact with the entity manager factory for the persistence unit.(Interface of JPA)

 
manual

FROM clause (JPQL / Criteria API)

Explains how to use the FROM clause and JOIN expressions in a JPA/JPQL query.... = cb. createQuery createQuery(resultClass) CriteriaBuilder's method Create a CriteriaQuery object with the specified ... = cb. createQuery createQuery(resultClass) CriteriaBuilder's method Create a CriteriaQuery object with the specified ...

 
forum_thread

order by string with numbers

Hi Anyone could help me I need ordered a string  for example user1, user2, ..., user1000 I found sql solution but I would like to use criteria builder I don´t if exist CAST and AS UNSIGNED ORDER BY CAST(SUBSTR(usernameFROM 2) AS UNSIGNED) ASC If you have other alternative for JPA CriteriaBuilder please let me know. Thanks   ... 1 ASC If you have other alternative for JPA CriteriaBuilder to do it as sql did please let me know. Thanks ... query function function(name, type, args) CriteriaBuilder's method Create an expression for the execution of a ...

 
manual

Paths and Types in JPQL and Criteria API

Explains how to use object expressions (path navigation, type) in JPA/JPQL.... p = cb. notEqual notEqual(x, y) CriteriaBuilder's method Create a predicate for testing the arguments for ... ( ) , cb. literal literal(value) CriteriaBuilder's method Create an expression for a literal. See ...