
This is the introduction of Criteria API. This gives detailed information about what Criteria API and how it is used in this course.
Will give you the basic understanding about the Criteria API. The video will talk about the merits along with a sample code in Java that uses how to use the api
This video tells about the how to download and setup the PetClinic application in IntelliJ IDEA editor.
This video will walk through the PetClinic application
This is the first example for how to run a simple criteria API using test driven design.
Explains another test cases to demonstrate the Criteria API usage
This video gives how we can perform a small filter. ie filter the data based on the name of the city
The Criteria API is a powerful and type-safe framework provided by Java Persistence API (JPA) that allows developers to construct dynamic, database-agnostic queries in Java. Unlike JPQL (Java Persistence Query Language), which uses strings for queries, the Criteria API enables the creation of queries through Java code, making them safer, more flexible, and easier to refactor.
This API provides an object-oriented approach to building queries, offering a fluent interface that allows for programmatic construction of queries with minimal risk of errors. With the Criteria API, developers can create complex queries, including joins, aggregates, filters, and groupings, all while maintaining compile-time validation and avoiding SQL injection risks.
The Criteria API is particularly useful in scenarios where queries need to be generated dynamically, such as in search functionalities, reports, or when building queries based on user input. By using the Criteria API, developers can work with metadata of entity classes and avoid the need to manually handle SQL string concatenation, improving code maintainability and readability.
In addition, since it abstracts away the specific SQL syntax for different databases, the Criteria API ensures database portability. It's an essential tool for Java developers working with JPA who want to build more sophisticated and secure queries, while maintaining the integrity and flexibility of their application’s data layer.
Overall, the Criteria API is a robust solution for building dynamic, type-safe queries in Java, making it an indispensable tool for JPA-based applications
This course make use of test driven development to master the concepts quickly and easily. For that, this course makes use of open source spring pet clinic application to. learn this API.