JPA

Java standard for object-relational mapping: entities, relations, and queries.

Execution & architecture flow

  1. Entity class
  2. EntityManager
  3. Persistence context
  4. SQL
  5. Database

Engineering capabilities

  • Mapping entities to tables with annotations, including one-to-many and many-to-many relations
  • JPQL and Criteria queries
  • Transactions and EntityManager lifecycle management
  • Lazy vs. eager loading trade-offs

Where used

  • Relational persistence in enterprise Java services
  • Independent public JPA2 examples

Official documentation