Szkolenia Capstone Courseware

Cel szkolenia szkolenie zdalne - dlearning

kod: CC-162 | wersja: v2.1

This course offers a comprehensive and detail-oriented treatment of the Java Persistence API (JPA) and its use in the Java-EE environment. 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. We then look at practical issues involved in using JPA in the enterprise context, including Java EE Bean Validation, working with server-managed data sources, dependency injection, container-managed transactions, and transaction propagation.

This version of the course supports JPA 2.1 with a choice of two providers: EclipseLink 2.6, which is pre-configured for course exercises, and Hibernate® 5.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, to illustrate portability and for comparison of some finer points.

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.

Hibernate is a registered trademark of Red Hat, Inc. Oracle is a registered trademark of Oracle Corporation. Other names may be trademarks of their respective owners. No association with or endorsement by Red Hat or Oracle is implied by the use of these terms in this document.

Learning Objectives

  • Understand the value of object/relational mapping and JPA's role as a standard for ORM implementations.
  • Develop JPA entities using JPA annotations to align the Java classes, properties, and types to relational tables, columns, and types.
  • Create entity managers and instantiate persistence contexts to perform create/retrieve/update/delete (CRUD) operations.
  • Implement entity relationships of all cardinalities, including unidirectional and bidirectional relationships.
  • Map composite primary keys, inheritance relationships, eager/lazy fetching, and cascading operations.
  • Use JPQL to write object-oriented queries, and process query results.
  • Define JSR-303 validation constraints on JPA entities and see them enforced by the JPA provider.
  • Use server-managed data sources.
  • Take advantage of Java-EE dependency injection to connect entity managers and factories.
  • Use annotations to direct container-managed transactions and to control transaction propagation.

Plan szkolenia Rozwiń listę

  1. Introduction to JPA
    • Object/Relational Mapping
    • Mismatches Between Relational and Object Models
    • The Java Persistence API
    • JPA Architecture
    • Entity Metadata
    • The Entity Manager
    • JPA Providers
  2. Single-Table Mapping
    • Annotations
    • JavaBean Standards
    • Property, Field, and Mixed Access
    • Table and Column Mapping
    • Primary Keys and Key Generation
    • Type Mappings
    • Temporal and Enumerated Types
    • Embedded Types
    • Converters
  3. Mapping Associations
    • @Embeddable Types
    • Entity Relationships
    • @ManyToOne Relationships
    • @OneToOne Relationships
    • @OneToMany Relationships
    • @ManyToMany Relationships
    • Eager and Lazy Loading
  4. Entity Managers
    • Putting Entities to Work
    • persistence.xml
    • Entity State and Transitions
    • Managing Transactions
    • Persistence Operations
    • Creating Queries
    • Named Queries
    • Query Parameters
    • Native Queries
    • Stored-Procedure Queries
  5. JPQL
    • The Java Persistence Query Language
    • Query Structure
    • Path Expressions
    • Filtering
    • Scalar Functions
    • Using Native Functions
    • Operators and Precedence
    • between, like, in
    • is null, is empty
    • Ordering
    • Aliases
    • Grouping
    • Aggregate Functions
    • Joins
    • Fetch Joins
    • Constructors
    • Updates and Deletes
  6. Persistence Components
    • Encapsulating Persistence Logic
    • Design Considerations
    • Testability
    • Transaction Control
    • Exception Handling
    • Generic Types
  7. 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
  8. Validation
    • JSR-303 Validation
    • Constraint Annotations
    • Validation Modes
    • Validation Groups
    • Handling Validation Exceptions
  9. JPA in Java EE
    • Enterprise Applications
    • Dependency Injection
    • Separation of Concerns
    • JNDI
    • JDBC Data Sources
    • @PersistenceUnit and @PersistenceContext
    • Container-Managed Transactions
    • Enterprise JavaBeans
    • @Stateful and @Stateless
    • @EJB
    • @TransactionAttribute
    • Logging Transactions
    • Impact on Exception Handling
    • Persistence-Context Duration
    • Extended Persistence Contexts
    • Testability
Pobierz konspekt szkolenia w formacie PDF

Dodatkowe informacje

Wymagania wstępne
  • A strong Java programming background is essential for this course -- consider Course 103
  • Knowledge of relational database concepts and SQL is recommended -- consider Course 301 -- but is not strictly required.
  • Prior experience with JDBC will be a plus but is not required.
Poziom trudności
Czas trwania 4 dni
Certyfikat

The participants will obtain certificates signed by Capstone Courseware.

Prowadzący

Authorized Capstone Courseware Trainer.

Pozostałe szkolenia Capstone Courseware | Java EE

Szkolenia powiązane tematycznie

Programowanie

Java

Formularz kontaktowy

Prosimy o wypełnienie poniższego formularza, jeśli chcą Państwo uzyskać więcej informacji o powyższym szkoleniu.






* pola oznaczone (*) są wymagane

Informacje o przetwarzaniu danych przez Compendium – Centrum Edukacyjne Spółka z o.o.

CENA SZKOLENIA OD 4050 PLN NETTO

Najbliższe szkolenia Capstone Courseware

Harmonogram szkoleń
Capstone Courseware