Hibernate Recipes A Problem-Solution Approach
Hibernate Recipes, Second Edition contains a collection of code recipes and templates for learning and building Hibernate solutions for you and your clients, including how to work with the Spring Framework and the JPA. This book is your pragmatic day-to-day reference and guide for doing all things i...
Autores principales: | , , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Berkeley, CA :
Apress
2015.
|
Edición: | 2nd ed. 2015. |
Colección: | Expert's voice in Java.
|
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009629851006719 |
Tabla de Contenidos:
- Contents at a Glance; Chapter 1: Starting with Hibernate; 1-1. Setting Up a Project; Problem; Solution; How It Works; Installing Eclipse; Installing Maven; Setting Up a Maven Project; Creating a Maven Project Using an Archetype; Running Unit Tests; Creating Modules; 1-2. Setting Up a Database; Problem; Solution; How It Works: Setting Up H2; Configuring Hibernate; Setting Up the H2 Console to View Data; How It Works: Setting Up Derby; Installing Derby; Creating a Derby Database Instance; Creating the Tables (Relational Model); 1-3. Configuring Hibernate; Problem; Solution; How It Works
- ConfigurationProgrammatic Configuration; XML Configuration; Opening and Closing Sessions; Creating Mapping Definitions; Retrieving and Persisting Objects; 1-4. Using the JPA EntityManager; Problem; Solution; How It Works; 1-5. Enabling Logging in Hibernate; Problem; Solution; How It Works; Inspecting the SQL Statements Issued by Hibernate; Enabling Live Statistics; Summary; Chapter 2: Basic Mapping and Object Identity; 2-0. Using JPA Annotations; Problem; Solution; How It Works; 2-1. Providing an ID for Persistence; Problem; Solution; How It Works; Using the Database Sequence
- Using an Increment GeneratorUsing the Hilo Generator; Enhanced Sequence Style Generator; Enhanced Table Generator; 2-2. Creating a Composite Key in Hibernate; Problem; Solution; How It Works; Multiple ID Properties Declared Within the Entity; Multiple ID Properties as an Identifier Type; Composite ID as a Property Using a Component Type; 2-3. saveOrUpdate( ) in Hibernate; Problem; Solution; How It Works; 2-4. Dynamic SQL Generation in Hibernate; Problem; Solution; How It Works; Summary; Chapter 3: Component Mapping; 3-1. Implementing a Value Type as a Component; Problem; Solution
- How It WorksUsing Hibernate XML Mapping; Using JPA Annotations; 3-2. Nesting Components; Problem; Solution; How It Works; 3-3. Adding References in Components; Problem; Solution; How It Works; 3-4. Mapping a Collection of Components; Problem; Solution; How It Works; 3-5. Using Components as Keys to a Map; Problem; Solution; How It Works; Summary; Chapter 4: Inheritance and Custom Mapping; 4-1. Mapping Entities with Table per Class Hierarchy; Problem; Solution; How It Works; 4-2. Mapping Entities with Table per Subclass; Problem; Solution; How It Works
- 4-3. Mapping Entities with Table per Concrete ClassProblem; Solution; How It Works; 4-4. Mapping Entities with Table per Class with a Mapped Superclass; Problem; Solution; How It Works; 4-5. Custom Mappings; Problem; Solution; How It Works; Summary; Chapter 5: Many-to-One and One-to-One Mapping; 5-1. Using Many-To-One Associations; Problem; Solution; How It Works; 5-2. Using a Many-to-One Association with a Join Table; Problem; Solution; How It Works; 5-3. Using Lazy Initialization on Many-to-One Associations; Problem; Solution; How It Works
- 5-4. Creating a One-to-One Association Using a Foreign Key