About CriteriaBuilder

api-jpa

conjunction()

Create a conjunction (with zero conjuncts).(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

lessThan(x, y)

Create a predicate for testing whether the first argument is less than the second.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

function(name, type, args)

Create an expression for the execution of a database function.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

like(x, pattern, escapeChar)

Create a predicate for testing whether the expression satisfies the given pattern.(Method of javax.persistence.criteria.CriteriaBuilder)

 
api-jpa

like(x, pattern, escapeChar)

Create a predicate for testing whether the expression satisfies the given pattern.(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)

 
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

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 ...

 
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 ...