The Java Persistence API provides two methods for querying entities—the Java Persistence query language (JPQL) and the Criteria API.
The Java Persistence Query Language (JP QL) is the string-based standard query language of JPA. It is a portable query language designed to combine the syntax and simple query semantics of SQL with the expressiveness of an object-oriented expression language. Queries written using this language ...