JPA 2 Criteria API

java-ee-thumbnail

One of the important feature in JPA 2.0┬áis using the Criteria API for forming the SQL queries. If you would have worked with the JPA 1.0 version, you must be familiar with the Java Persistence Query Language (JQL) which is similar to writing the SQL queries. This approach is good for the developers who are […]

TypedQuery in JPA 2

java-ee-thumbnail

One of the new feature introduced in JPA 2.0 is using the TypedQuery interface for building the query. This can be used with the CriteriaBuilder in JPA 2. As the name itself specifies, the main purpose of using the TypedQuery would be to narrow the result type and eliminate the need for type casting after […]

JPA Releases and Implementations

java-ee-thumbnail

Java Persistence API (JPA) is the database layer specification created and maintained by the Java experts group. The first release of JPA happened on the year 2006. Also there is a number of popular implementation for the JPA specifications. EclipseLink is the reference implementation for the JPA. If you are not familiar with JPA programming, […]

How To Create EntityManagerFactory in JPA

hibernate-thumbnail

This tutorial explains how to create┬áEntityManagerFactory in your JPA application when you are writing your first JPA programming. It is the standard way of creating the factory if you use the JPA specification. Normally there are two ways to create the factory, one is through the configuration file persistence.xml and another one is through the […]

JPA EntityManagerFactory Vs Hibernate’s SessionFactory

hibernate-thumbnail

If you are using the JPA’s standard specification implementation (Read : Introduction to JPA), then you would use EntityManagerFactory for opening the session. But, if you are using the hibernate implementation, you have hibernate specific SessionFactory for managing the sessions. Here there is lot of confusion between developers like which one is the best approach. […]

How To Generate Javadoc With Ant

ant-thumbnail

This tutorial explains how to create Java documentation using the ant script. Every project has Java doc for the documentation purpose. If you have huge application, there should be a clear Java doc for the developers to aware of all the classes and its purposes. If the developers add good comments on their code, Java […]

JPA 2 MetaModel Generator using Ant

hibernate-thumbnail

In my previous article I have explained how to generate metamodel using your Eclipse IDE. However, in most scenarios you will have to create from your build scripts. This tutorial explains how to add this option in your ant script. For the detailed explanation on project example code, please refer the previous post. Here I […]

JPA 2 MetaModel Generation using Eclipse

hibernate-thumbnail

JPA 2.0 introduces the strongly typed Criteria API for going away with the Java Persistence Query (JQL) language. It comes with the metamodel for helping the typed objects. Every entity must have a meta model generated with underscore(_) added to its name. These objects will be referred in the Criteria API instead of using the […]

JPA 2.1 New Features

java-ee-thumbnail

JPA 2.1 adds lot of enhancements on top of the JPA 2.0 features. Some of the notable features are custom converters, criteria update, stored procedures, DDL generation, entity groups, etc. Here I have listed all the changes and explained few of the features. I will write examples for each features in the future articles. 1. […]

JPA 2.0 New Features

java-ee-thumbnail

Java Persistance API (JPA) is the object relational mapping (ORM) specification for Java EE applications. It is only the specification, every framework owners can implement their own persistence layer following the JPA specification. Standardizing three major competing vendors of ORM technologies, Hibernate, JDO and Toplink, into one standard is the JPA 1.0 specification. JPA 1.0 […]