𝔖 Scriptorium
✦   LIBER   ✦

📁

Java Persistence with Spring Data and Hibernate

✍ Scribed by Cătălin Tudose


Publisher
Manning Publications
Year
2022
Tongue
English
Leaves
358
Edition
MEAP Edition
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Table of Contents


Java Persistence with Spring Data and Hibernate MEAP V04
Copyright
welcome
brief contents
Chapter 1: Understanding object/relational persistence
1.1 What is persistence?
1.1.1 Relational databasesxe "DBMS"xe "relational database"xe "relational model"xe "SQL database"
1.1.2 Understanding SQLxe "SQL:relational operations"xe "relational model:definition"
1.1.3 Using SQL in Java xe "SQL:in Java"xe "SQL:and JDBC"
1.2 The paradigm mismatch
1.2.1 The problem of granularityxe "paradigm mismatch:granularity"
1.2.2 The problem of inheritance
1.2.3 The problem of identityxe "paradigm mismatch:identity"
1.2.4 Problems relating to associations xe "paradigm mismatch:associations"
1.2.5 The problem of data navigationxe "paradigm mismatch:data navigation"
1.3 ORM, JPA, Hibernate, and Spring Data
1.4 Summary
Chapter 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 classxe "persistent classes"
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
2.8 Summary
Chapter 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
3.4 Summary
Chapter 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 to configure 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
4.11 Summary
Chapter 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 dentifier 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
5.3.4 Mapping an entity to a subselect
5.4 Summary
Chapter 6: Mapping value types
6.1 Mapping basic properties
6.1.1 Overriding basic property defaults
6.1.2 Customizing property access
6.1.3 Using derived properties
6.1.4 Transforming column values
6.1.5 Generated and default property values
6.1.6 The @Temporal annotation
6.1.7 Mapping enumerations
6.2 Mapping embeddable components
6.2.1 The database schema
6.2.2 Making classes embeddable
6.2.3 Overriding embedded attributes
6.2.4 Mapping nested embedded components
6.3 Mapping Java and SQL types with converters
6.3.1 Built-in types
6.3.2 Creating custom JPA converters
6.3.3 Extending Hibernate with UserTypes
6.4 Summary
Chapter 7: Mapping inheritance
7.1 Table per concrete class with implicit polymorphism
7.2 Table per concrete class with unions
7.3 Table per class hierarchy
7.4 Table per subclass with joins
7.5 Mixing inheritance strategies
7.6 Inheritance of embeddable classes
7.7 Choosing a strategy
7.8 Polymorphic associations
7.8.1 Polymorphic many-to-one associations
7.8.2 Polymorphic collections
7.9 Summary
Chapter 8: Mapping collections and entity associations
8.1 Sets, bags, lists, and maps of value types
8.1.1 The database schema
8.1.2 Creating and mapping a collection property
8.1.3 Selecting a collection interface
8.1.4 Mapping a set
8.1.5 Mapping an identifier bag
8.1.6 Mapping a list
8.1.7 Mapping a map
8.1.8 Sorted and ordered collections
8.2 Collections of components
8.2.1 Equality of component instances
8.2.2 Set of components
8.2.3 Bag of components
8.2.4 Map of component values
8.2.5 Components as map keys
8.2.6 Collection in an embeddable component
8.3 Mapping entity associations
8.3.1 The simplest possible association
8.3.2 Making it bidirectional
8.3.3 Cascading state
8.4 Summary
Chapter 9: Advanced entity association mappings
9.1 One-to-one associations
9.1.1 Sharing a primary key
9.1.2 The foreign primary key generator
9.1.3 Using a foreign key join column
9.1.4 Using a join table
9.2 One-to-many associations
9.2.1 Considering one-to-many bags
9.2.2 Unidirectional and bidirectional list mappings
9.2.3 Optional one-to-many with a join table
9.2.4 One-to-many association in an embeddable class
9.3 Many-to-many and ternary associations
9.3.1 Unidirectional and bidirectional many-to-many associations
9.3.2 Many-to-many with an intermediate entity
9.3.3 Ternary associations with components
9.4 Entity associations with Maps
9.4.1 One-to-many with a property key
9.4.2 Key/Value ternary relationship
9.5 Summary
Chapter 10: Managing data
10.1 The persistence life cycle
10.1.1 Entity instance states
10.1.2 The persistence context
10.2 The EntityManager interface
10.2.1 The canonical unit of work
10.2.2 Making data persistent
10.2.3 Retrieving and modifying persistent data
10.2.4 Getting a referencexe "references"
10.2.5 Making data transient
10.2.6 Refreshing data
10.2.7 Replicating data
10.2.8 Caching in the persistence context
10.2.9 Flushing the persistence context
10.3 Working with detached state
10.3.1 The identity of detached instances
10.3.2 Implementing equality methods
10.3.3 Detaching entity instances
10.3.4 Merging entity instances
10.4 Summary
Chapter 11: Transactions and concurrency
11.1 Transaction essentials
11.1.1 ACID attributes
11.1.2 Database and system transactions
11.2 Controlling concurrent access
11.2.1 Understanding database-level concurrency
11.2.2 Optimistic concurrency control
11.2.3 Explicit pessimistic locking
11.2.4 Avoiding deadlocks
11.3 Non-transactional data access
11.3.1 Reading data in auto-commit mode
11.3.2 Queueing modifications
11.4 Managing transactions with Spring and Spring Data
11.4.1 Transaction propagation
11.4.2 Transaction rollback
11.4.3 Transaction properties
11.4.4 Programmatic transaction definition
11.4.5 Transactional development with Spring and Spring Data
11.5 Summary
Chapter 12: Fetch plans, strategies, and profiles
12.1 Lazy and eager loading
12.1.1 Understanding entity proxies
12.1.2 Lazy persistent collections
12.1.3 Eager loading of associations and collections
12.2 Selecting a fetch strategy
12.2.1 The n+1 selects problem
12.2.2 The Cartesian product problem
12.2.3 Prefetching data in batches
12.2.4 Prefetching collections with subselects
12.2.5 Eager fetching with multiple SELECTs
12.2.6 Dynamic eager fetching
12.3 Using fetch profiles
12.3.1 Declaring Hibernate fetch profiles
12.3.2 Working with entity graphs
12.4 Summary


📜 SIMILAR VOLUMES


Java Persistence with Spring Data and Hi
✍ Catalin Tudose 📂 Library 📅 2023 🏛 Manning Publications 🌐 English

Master Java persistence using the industry-leading tools Spring Data and Hibernate. In Java Persistence with Spring Data and Hibernate you will learn: • Mapping persistent classes, value types, and inheritance • Mapping collections and entity associations • Processing transactions with Spring

Java Persistence with Spring Data and Hi
✍ Catalin Tudose 📂 Library 🏛 Manning 🌐 English

<span>Master Java persistence using the industry-leading tools Spring Data and Hibernate.</span><span><br><br>In </span><span>Java Persistence with Spring Data and Hibernate</span><span> you will learn:<br> <br> Mapping persistent classes, value types, and inheritance<br> Mapping collections and ent

Java Persistence with Spring Data and Hi
✍ Catalin Tudose 📂 Library 🏛 Manning 🌐 English

<span>Master Java persistence using the industry-leading tools Spring Data and Hibernate.</span><span><br><br>In </span><span>Java Persistence with Spring Data and Hibernate</span><span> you will learn:<br> <br> Mapping persistent classes, value types, and inheritance<br> Mapping collections and ent

Java Persistence with Hibernate
✍ Christian Bauer, Gavin King, Gary Gregory 📂 Library 📅 2015 🏛 Manning Publications 🌐 English

<div><p><b>Summary</b></p> <p><i>Java Persistence with Hibernate, Second Edition</i> explores Hibernate by developing an application that ties together hundreds of individual examples. In this revised edition, authors Christian Bauer, Gavin King, and Gary Gregory cover Hibernate 5 in detail with the

Java Persistence with Hibernate
✍ Christian Bauer, Gavin King 📂 Library 📅 2007 🏛 Manning; Pearson Education [distributor] 🌐 English

"Java Persistence with Hibernate" is the new bible of Hibernate. As a major revision of the Popular "Hibernate in Action," it builds on the same single example application to introduce and explain the latest Hibernate 3.2 in detail. In addition, the new and significantly improved EJB 3.0 Java Persis

Java Persistence with Hibernate
✍ Bauer C., Gregory G., King G. 📂 Library 🌐 English

2nd Edition. — Manning Publications, 2015. — 608 p. — ISBN: 978-1-78588-422-1.<div class="bb-sep"></div><strong>Код примеров к книге выложен <a class="object-link fpm" data-file-id="1852419" href="/file/1852419/">здесь</a>.</strong><div class="bb-sep"></div>Persistence—the ability of data to outlive