Hibernate EntityManager

User guide

3.1 beta 6


Table of Contents

Introducing EJB3 Persistence
1. Architecture
1.1. Definitions
1.2. EJB container environment
1.2.1. Container-managed entity manager
1.2.2. Application-managed entity manager
1.2.3. Persistence context scope
1.2.4. Persistence context propagation
1.3. J2SE environments
2. Setup and configuration
2.1. Setup
2.2. Configuration and bootstrapping
2.3. Event listeners
2.4. Obtaining an EntityManager in a J2SE environment
2.5. Various
3. Working with objects
3.1. Entity states
3.2. Making objects persistent
3.3. Loading an object
3.4. Querying objects
3.4.1. Executing queries
3.4.1.1. Projection
3.4.1.2. Scalar results
3.4.1.3. Bind parameters
3.4.1.4. Pagination
3.4.1.5. Externalizing named queries
3.4.1.6. Native queries
3.4.1.7. Query hints
3.5. Modifying persistent objects
3.6. Modifying detached objects
3.7. Automatic state detection
3.8. Deleting managed objects
3.9. Flushing the persistence context
3.9.1. In a transaction
3.9.2. Outside a transaction
3.10. Transitive persistence
4. Transactions and Concurrency
4.1. Entity manager and transaction scopes
4.1.1. Unit of work
4.1.2. Long units of work
4.1.3. Considering object identity
4.1.4. Common concurrency control issues
4.2. Database transaction demarcation
4.2.1. Non-managed environment
4.2.2. Using JTA
4.2.3. Exception handling
4.3. Optimistic concurrency control
4.3.1. Application version checking
4.3.2. Extended entity manager and automatic versioning
4.3.3. Detached objects and automatic versioning
5. Entity listeners and Callback methods
5.1. Definition
5.2. Callbacks and listeners inheritance
6. Batch processing
6.1. Bulk update/delete
7. EJB-QL: The Object Query Language
7.1. Case Sensitivity
7.2. The from clause
7.3. Associations and joins
7.4. The select clause
7.5. Aggregate functions
7.6. Polymorphic queries
7.7. The where clause
7.8. Expressions
7.9. The order by clause
7.10. The group by clause
7.11. Subqueries
7.12. EJB-QL examples
7.13. Bulk UPDATE & DELETE Statements
7.14. Tips & Tricks
8. Native query
8.1. Expressing the resultset
8.2. Using native SQL Queries
8.3. Named queries
A. Compliance and known limitations