Instructor-led training
The Java Persistence API Training in Manhattan, Kansas
This course offers a comprehensive and detail-oriented treatment of the Java Persistence API (JPA) for developers interested in implementing persistence tiers for enterprise applications.
What you'll learn
This course offers a comprehensive and detail-oriented treatment of the
Java Persistence API (JPA) for developers interested in implementing
persistence tiers for enterprise applications. We cover JPA basics
including simple object/relational concepts and annotations, persistence
contexts and entity managers, and configuration via persistence.xml. We
get a good grounding in the Java Persistence Query Language (JPQL) and
take advantage of a prepared JPQL query console to explore the two
schemas on which the course's case studies are based. The course then
moves into advanced topics including JPA-2.0 mapping options, the
Criteria API, lifecycle hooks, JSR-303 validation, locking, and caching.
Students will complete the course with a firm understanding of JPA
architecture and plenty of hands-on exercise in entity mapping,
persistence operations, and JPQL. br/ Course software includes two
schemas: a fairly simple human-resources model (6 tables, 253 rows) for
early chapters and a more sophisticated pharmacy schema (14 tables, 4255
rows) for the latter half of the course. br/ This version of the course
supports JPA 2.0 with a choice of two providers: EclipseLink 2.3, which
is pre-configured for course exercises, and Hibernate 4.0. Switching
providers is just a matter of moving a few lines in and out of XML
comments in the relevant persistence.xml file, and we encourage
instructors to demonstrate both providers at least here and there, to
illustrate portability and for comparison's sake over some finer points.
br/ The course also supports either the Derby or Oracle RDBMS. Derby is
bundled with the course software and is pre-configured; a script is
included to change over to Oracle configurations for all exercises and
schema-creation scripts are available for both.
Prerequisites
A strong Java programming background is essential for this course. A
strong Java programming background is essential for this course. Prior
experience with JDBC will be a plus but is not required.
Course Outline
Chapter 1. Introduction to JPA
- Object/Relational Mapping
- Mismatches Between Relational and Object Models
- The Java Persistence API
- JPA History
- JPA Architecture
- Entity Metadata
- The Entity Manager
- JPA Providers
Chapter 2. Object/Relational Mapping
- Annotations
- JavaBean Standards
- Property, Field, and Mixed Access
- Table and Column Mapping
- Primary Keys and Generation
- Type Mappings
- Temporal and Enumerated Types
- Embedded Types
- Entity Relationships
- @ManyToOne Relationships
- @OneToOne Relationships
- @OneToMany Relationships
- @ManyToMany Relationships
- Eager and Lazy Loading
Chapter 3. Entity Managers
- Putting Entities to Work
- persistence.xml
- Entity State and Transitions
- Managing Transactions
- Persistence Operations
- Creating Queries
- Named Queries
- Query Parameters
- Native Queries
Chapter 4. JPQL
- The Java Persistence Query Language
- Query Structure
- Path Expressions
- Filtering
- Scalar Functions
- Operators and Precedence
- between, like, in
- is null, is empty
- Ordering
- Aliases
- Grouping
- Aggregate Functions
- Joins
- Constructors
Chapter 5. Advanced Mappings
- Inheritance Strategies
- Single-Table Strategy
- Joined-Table Strategy
- Table-Per-Concrete-Class Strategy
- Querying Over Inheritance Relationships
- Secondary Tables
- Composite Primary Keys
- @IdClass and @EmbeddedId
- Derived Identifiers
- @ElementCollection
- Default Values
- @Version Fields
- Cascading and Orphan Removal
- Detachment and Merging
Chapter 6. The Criteria API
- History of the Criteria API
- Criteria Query Structure
- The MetaModel API and Query Type Safety
- Tuples
- Joins
- Predicates
- Building Expressions
- Ordering
- Grouping
- Encapsulating Persistence Logic
- Façades
- Range Queries
Chapter 7. Lifecycle and Validation
- Lifecycle Events
- Method Annotations
- Entity Listeners
- JSR-303 Validation
- Constraint Annotations
- Validation Modes
- Validation Groups
Chapter 8. Locking and Caching
- Concurrency
- Optimistic Locking
- Optimistic Read Locking
- Optimistic Write Locking
- Pessimistic Locking
- Caching
- Persistence Context as Transactional Cache
- Shared (2nd-level) Cache
- Locking and Caching "Do's and Don'ts"
Training locations
The Java Persistence API training across the U.S. and beyond.
We provide The Java Persistence API training onsite and live online for organizations throughout the United States and internationally.
View all The Java Persistence API training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- Training for groups of 3 or more
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.