Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

JAVA Persistence

API(JPA)
What is it?
How would we use it in a project?
Should we use it?

-Parag Chaudhari
Introduction - Without using JPA?
Lot of implementation details (connections, implementation,
resultsets etc)

Alternative is to use ORM tools such as (Hibernate, iBatis, JDO)


But what about Object-Relation mismatch?
Solution : Use JPA.
Java Persistence API
1. Entity
2. Entity manager and persistence context
3. Persistence unit
4. Exceptions
5. JPA Query Language
Entity
Entity(cont.)
Entity Manager and persistence
context
Application

EntityManager
MyEntity A

MyEntity C
MyEntity a MyEntity B
MyEntity b

Entities

Entity
state
JPA Query Language
JPA Exception
Resources
Java Persistence API
http://www.oracle.com/technetwork/java/javaee/tech/pe
rsistence-jsp-140049.html
JPQL Language Reference
http://openjpa.apache.org/builds/1.0.2/apache-openjpa-
1.0.2/docs/manual/jpa_langref.html
Article Introduction to Java Persistence API
http://www.javabeat.net/jpa/
Thank you!

You might also like