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 Entities MyEntity A MyEntity B MyEntity C MyEntity a EntityManager MyEntity b Entity state
JPA Query Language
JPA Exception
Resources Java Persistence API jsp html jsp html JPQL Language Reference /docs/manual/jpa_langref.html /docs/manual/jpa_langref.html Article “Introduction to Java Persistence API”
Thank you!