Enterprise Java Development@TOPIC@

Java Persistence API

Entities and EntityManager

Revision: v2013-08-19

2014-03-06 23:58 EST

Abstract

This presentation provides and introduction to JPA and coverage of the methods of the EntityManager.


Purpose
1. Goals
2. Objectives
1. JPA Overview
1.1. Background
1.2. EntityManager
1.3. Entity
1.4. JPA Example
1.5. Entity States
1.5.1. Managed
1.5.2. Detached
1.6. Persistence Context
1.7. Persistence Unit
1.8. Example Layout
1.9. Persistence.xml
1.9.1. Application Example
1.9.2. Server Example
1.9.3. Optional hibernate.properties
1.9.4. Sample orm.xml
1.9.5. persistrence.xml Elements
1.9.6. Entity Discovery
1.10. Basic Steps
1.11. Entity Manager Methods
1.11.1. Basic CRUD Operations
1.11.2. Membership Operations
1.11.3. State Synchronization Operations
1.11.4. Locking Operations
1.11.5. Query Operations
1.11.6. Other Operations
2. Entity Manager CRUD Methods
2.1. persist()
2.2. find()
2.3. getReference()
2.4. merge()
2.5. remove()
3. Entity Manager Membership Methods
3.1. contains()
3.2. clear()
3.3. detach()
4. Entity Manager State Synchronization Methods
4.1. flush()
4.2. FlushMode
4.3. refresh()
5. Entity Manager Locking Methods
5.1. Primary Lock Types
5.2. LockModeType
5.3. lock()
5.4. find(lock)
5.5. refresh(lock)
5.6. getLockMode()
6. Entity Manager Query Methods
6.1. JPA Queries
6.2. Native Queries
6.3. Criteria Queries
7. Other Entity Manager Methods
7.1. isOpen()
7.2. close()
7.3. getTransaction()
7.4. joinTransaction()
7.5. unwrap()
7.6. getDelegate()
7.7. getMetaModel()
7.8. getEntityManagerFactory()
7.9. setProperties()/getProperties()
8. JPA Maven Environment
8.1. JPA Maven Dependencies
8.1.1. JPA API classes
8.1.2. JPA Provider classes
8.1.3. Database
8.2. Supplying Runtime Properties
8.2.1. Turn on Resource Filtering in pom.xml
8.2.2. Use ${variable} References in Resource Files
8.2.3. Define Property Values in Parent pom.xml
8.2.4. Run with Filtered Values