Tag: hibernate criteria
Criteria Query, Hibernate Criteria Query Introduction
Unlike HQL, Criteria is only for selecting the data from the database, that to we can select complete objects only not partial objects, in fact by combining criteria and projections concept we can select partial objects too we will…
Example On Hibernate Criteria Query
Let us see an example program on hibernate criteria query, files required…. Product.java(POJO class) Product.hbm.xml hibernate.cfg.xml ForOurLogic.java (For writing our business logic) Product.java package str; public class Product{ private int productId; private String proName; private double price; public void…
Hibernate Criteria, Adding Conditions To Criteria
If we want to add some sorting order for the objects, before the objects are going to store in list object then we need to add an Order class object to the Criteria class object by calling addOrder() method..,…