Realdolmen Education

Details

Java Persistence API 2.1

This course is currently not scheduled on the open calendar, but can be organized on request.

Request Course

Duration

2 day(s)

Audience

Java developers who want to learn how to use JPA.

Prerequisites

Participants should be familiar with Java 7+ and preferably JDBC.

Objectives

Master the use of JPA to be more productive as a developer who needs to access to RDBMS.

Description

JEE7 continues to improve JPA, the official ORM framework for Java. During this course, participants will learn how to use JPA 2.1. The course starts from the basics, and gradually progresses to the more advanced subjects. The course is structured around a good balance of theory and exercise moments. By the end of this two day course, all major parts of JPA 2.1 have been covered, including the newly added features of JEE7.

Contents

  • 1. Java Persistence API 2.1 (JPA)
    • 1.1. Goal
    • 1.2. Agenda
  • 2. Java Persistence API
    • 2.1. Java Persistence API
    • 2.2. Understanding Entities
    • 2.3. Object Relational Mapping
    • 2.4. Querying Entities
    • 2.5. Persistence Unit
    • 2.6. Entity Life Cycle
    • 2.7. Integration with Bean Validation
    • 2.8. What's New in JPA 2.1?
    • 2.9. Automatic Schema Generation
    • 2.10. Converters
    • 2.11. Entity Graphs
    • 2.12. Other Improvements
    • 2.13. Exercise: JPA Getting Started
  • 3. Object Relational Mapping
    • 3.1. @Table
    • 3.2. @SecondaryTable
    • 3.3. @Id and @GeneratedValue
    • 3.4. Composite Primary Keys
    • 3.5. @EmbeddedId and @Embeddable
    • 3.6. @IdClass
    • 3.7. @EmbeddedId vs. @IdClass
    • 3.8. @Basic and @Lob
    • 3.9. @Column
    • 3.10. @Temporal
    • 3.11. @Transient
    • 3.12. @Enumerated
    • 3.13. @Access
    • 3.14. @Embeddable
    • 3.15. @ElementCollection and @CollectionTable
    • 3.16. @MapKeyColumn
    • 3.17. Exercise: JPA Mapping
    • 3.18. Relationship Mapping
    • 3.19. Relationships in Relational Databases
    • 3.20. Entity Relationships
    • 3.21. Unidirectional and Bidirectional
    • 3.22. @OneToOne Unidirectional
    • 3.23. @OneToOne and @JoinColumn
    • 3.24. @OneToMany Unidirectional
    • 3.25. @OneToMany
    • 3.26. @JoinTable
    • 3.27. @OneToMany and @JoinColumn
    • 3.28. @ManyToMany Bidirectional
    • 3.29. Fetching Relationships
    • 3.30. @OrderBy
    • 3.31. @OrderColumn
    • 3.32. Exercise: JPA Associations
    • 3.33. @Inheritance
    • 3.34. Inheritance Hierarchy
    • 3.35. Single-Table-per-Class Hierarchy Strategy
    • 3.36. Single-Table-per-Class Hierarchy Table Structure
    • 3.37. @DiscriminatorColumn and @DiscriminatorValue
    • 3.38. Joined-Subclass Strategy and Table Structure
    • 3.39. Table-per-Concrete-Class Strategy and Table Structure
    • 3.40. @AttributeOverrides
    • 3.41. Type of Classes in the Inheritance Hierarchy
    • 3.42. @MappedSuperclass
    • 3.43. Exercise: JPA Inheritance
  • 4. Managing Persistent Objects
    • 4.1. EntityManager
    • 4.2. Obtaining an EntityManager
    • 4.3. Persistence Context
    • 4.4. Manipulating Entities
    • 4.5. Persisting an Entity
    • 4.6. Finding by ID
    • 4.7. Removing an Entity
    • 4.8. Orphan Removal
    • 4.9. Flushing an Entity
    • 4.10. Refreshing an Entity
    • 4.11. Contains
    • 4.12. Clear and Detach
    • 4.13. Merging an Entity
    • 4.14. Updating an Entity
    • 4.15. Cascading Events
    • 4.16. JPQL
    • 4.17. Select and From
    • 4.18. Where
    • 4.19. Binding Parameters
    • 4.20. Order By, Group By, Having and Subqueries
    • 4.21. Bulk Delete and Bulk Update
    • 4.22. Dynamic Queries
    • 4.23. Named Queries
    • 4.24. Criteria API or Object Oriented Queries
    • 4.25. Type-Safe Criteria API
    • 4.26. Native Queries
    • 4.27. Stored Procedure Queries
    • 4.28. Cache API
    • 4.29. Exercise: JPA Querying
    • 4.30. Transactional Concurrency
    • 4.31. Locking
    • 4.32. Versioning
    • 4.33. Optimistic Locking
    • 4.34. Pessimistic Locking
    • 4.35. Life Cycle Callbacks
    • 4.36. Life Cycle Listeners
    • 4.37. Default Listeners
    • 4.38. Exercise: JPA Concurrency and Listeners