Submitted by sneha on Sun, 04/15/2018 - 05:52
We will write a simple hibernate application to get started with hibernate.
Before starting, you should:
Submitted by sneha on Sun, 04/15/2018 - 05:48
Submitted by sneha on Mon, 11/02/2015 - 04:37
We will download and install Java EE 7 SDK which comes with GlassFish Open Source Edition 4 (currently 4.1.1)and then configure eclipse to deploy Java EE applications directly to GlassFish Server. You can download the latest Java EE 7 SDK from http://www.oracle.com/technetwork/java/javaee/downloads/index.html. You can also directly download the latest commercially supported GlassFish Server distribution (currently 22.214.171.124) from the same link.
Submitted by sneha on Mon, 10/26/2015 - 09:22
Hibernate provide Criteria Queries as an object-oriented alternative to HQL. Criteria Query is used to modify the objects and provide restriction for the objects. Many complex queries in HQL or even SQL may become larger over a period of time and spread over many lines; and will be difficult to update and maintain. We have already seen HQL in http://javajee.com/introduction-to-hibernate-query-language-hql-in-hibernate-43.
Submitted by sneha on Mon, 10/26/2015 - 08:46
We can have queries saved with a name and later we can retrieve them simply using that name. We use @NamedQuery annotation to declare a named query. We can also have a named query for native sql. For native SQL we use the annotation @NamedNativeQuery annotation. This is one of the important advantages of having a named query: you can write native SQL. You can retrieve a Query object from a saved query name (hql and native named query) using session.getNamedQuery method.