The Java Persistence API (JPA) is a standard object–relational mapping (ORM) technology for Java applications. This course takes a detailed look at the latest standard, JPA2, describing how to map complex relational structures and how to use the JPA Query Language effectively. The course also describes when and how to use Hibernate–specific extensions.
Contents:
- Getting Started with JPA and Hibernate: Object⁄relational mapping issues; JPA and Hibernate environments; Configuring JPA and Hibernate; Mapping tables to objects; Executing queries using JPA QL and HQL; Alternative entity representation
- Query Techniques: Query options; Getting an object by primary key; Querying for objects; WHERE clause operators; JPA functions; Ordering rows; Paging results; Projections; Aggregates; Simple collections; Persistent class best practices; Maintainability best practices
- Mapping Persistent Classes: Using JPA annotations; Class mapping options; Property value options; Embeddable components; Strategies for generating IDs
- Additional Query Techniques: Reporting queries; Sub–queries; Criteria API; Native queries; Query hints
- Mapping Collections: Overview; Using sets for uniqueness; Using lists for ordering; Collections of components
- Mapping Associations: Fetching strategies; Many–to–one; Bidirectional many–to–one; One–to–one; Bidirectional one–to–one; Many–to–many; Bidirectional many–to–many; Components; Cascading
- Mapping Inheritance: Overview; Inheritance mapping strategies; Table per hierarchy; Table per concrete class; Table per subclass; Polymorphism; Mixing inheritance strategies
- Working with Persistent Objects: Managing attached objects; Managing detached objects; Using JPA⁄Hibernate with Spring
- Transaction Management: Transaction configuration; Defining transactions; Transaction propagation
- Performance Optimization: Using the 2nd–level cache; What can you cache? Batching; DML–style operations
- Industrial–Strength JPA⁄Hibernate: Optimistic locking and versioning; Pessimistic locking; Mixing JPA⁄Hibernate with JDBC
Who Should Attend:
This training course is aimed at developers who need to map relational data to Java entities.
Prerequisites:
Delegates must have experience using the Java programming language.
About the Instructor:
Andy Olsen is a freelance developer, consultant, instructor, mentor, and author working with Microsoft and Java–based technologies. Andy graduated with an Honours degree in Physics from Southampton University in England in 1986, and since then he has worked with a wide range of programming languages including C, C++, SmallTalk, Perl, Java, C#, and Visual Basic. Andy has been working with Microsoft technologies for more than 15 years now, and has been developing .NET applications since the Microsoft .NET 1.0 Beta days.
Andy is a regular speaker in conferences in the US, Europe, and the UK, and is equally happy discussing detailed programming subjects as well as enterprise architecture patterns.