JPA Criteria APIThe Criteria API is one of the most common ways of constructing queries for entities and their persistent state. It is just an alternative method for defining JPA queries. Criteria API defines a platform-independent criteria queries, written in Java programming language. It was introduced in JPA 2.0. The main purpose behind this is to provide a type-safe way to express a query. Steps to create Criteria QueryTo create a Criteria query, follow the below steps: -
Methods of Criteria API Query ClausesFollowing is the list of clauses with the corresponding interface and methods.
Note: - The CriteriaQuery interface is the sub-interface of AbstractQuery interface.
Next TopicJPA Criteria SELECT Clause
|