Cargando…

Java Persistence with Spring Data and Hibernate

Java Persistence with Spring Data and Hibernate teaches you the ins-and-outs of Java persistence with hands-on examples using Spring Data, JPA, and Hibernate. The book carefully analyzes the capabilities of the major Java persistence tools, and guides you through the most common use cases. By compar...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Tudose, Catalin
Formato: Electrónico eBook
Idioma:Inglés
Publicado: New York : Manning Publications Co. LLC, 2023.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Intro
  • inside front cover
  • Java Persistence with Spring Data and Hibernate
  • Copyright
  • dedication
  • brief contents
  • contents
  • front matter
  • forewords
  • preface
  • acknowledgments
  • about this book
  • Who should read this book
  • How this book is organized: A road map
  • About the code
  • liveBook discussion forum
  • about the author
  • authors of Java Persistence with Hibernate, Second Edition
  • about the cover illustration
  • Part 1. Getting started with ORM
  • 1 Understanding object/relational persistence
  • 1.1 What is persistence?
  • 1.1.1 Relational databases
  • 1.1.2 Understanding SQL
  • 1.1.3 Using SQL in Java
  • 1.2 The paradigm mismatch
  • 1.2.1 The problem of granularity
  • 1.2.2 The problem of inheritance
  • 1.2.3 The problem of identity
  • 1.2.4 The problem of associations
  • 1.2.5 The problem of data navigation
  • 1.3 ORM, JPA, Hibernate, and Spring Data
  • Summary
  • 2 Starting a project
  • 2.1 Introducing Hibernate
  • 2.2 Introducing Spring Data
  • 2.3 "Hello World" with JPA
  • 2.3.1 Configuring a persistence unit
  • 2.3.2 Writing a persistent class
  • 2.3.3 Storing and loading messages
  • 2.4 Native Hibernate configuration
  • 2.5 Switching between JPA and Hibernate
  • 2.6 "Hello World" with Spring Data JPA
  • 2.7 Comparing the approaches of persisting entities
  • Summary
  • 3 Domain models and metadata
  • 3.1 The example CaveatEmptor application
  • 3.1.1 A layered architecture
  • 3.1.2 Analyzing the business domain
  • 3.1.3 The CaveatEmptor domain model
  • 3.2 Implementing the domain model
  • 3.2.1 Addressing leakage of concerns
  • 3.2.2 Transparent and automated persistence
  • 3.2.3 Writing persistence-capable classes
  • 3.2.4 Implementing POJO associations
  • 3.3 Domain model metadata
  • 3.3.1 Annotation-based metadata
  • 3.3.2 Applying constraints to Java objects
  • 3.3.3 Externalizing metadata with XML files
  • 3.3.4 Accessing metadata at runtime
  • Summary
  • 4 Working with Spring Data JPA
  • 4.1 Introducing Spring Data JPA
  • 4.2 Starting a new Spring Data JPA project
  • 4.3 First steps for configuring a Spring Data JPA project
  • 4.4 Defining query methods with Spring Data JPA
  • 4.5 Limiting query results, sorting, and paging
  • 4.6 Streaming results
  • 4.7 The @Query annotation
  • 4.8 Projections
  • 4.9 Modifying queries
  • 4.10 Query by Example
  • Summary
  • Part 2. Mapping strategies
  • 5 Mapping persistent classes
  • 5.1 Understanding entities and value types
  • 5.1.1 Fine-grained domain models
  • 5.1.2 Defining application concepts
  • 5.1.3 Distinguishing entities and value types
  • 5.2 Mapping entities with identity
  • 5.2.1 Understanding Java identity and equality
  • 5.2.2 A first entity class and mapping
  • 5.2.3 Selecting a primary key
  • 5.2.4 Configuring key generators
  • 5.2.5 Identifier generator strategies
  • 5.3 Entity-mapping options
  • 5.3.1 Controlling names
  • 5.3.2 Dynamic SQL generation
  • 5.3.3 Making an entity immutable