Hibernate Recipes [electronic resource] : A Problem-Solution Approach /
Mak, Gary.author.
Guruzu, Srinivas.author.
Ottinger, Joseph.author.
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 involving Hibernate. There are many books focused on learning Hibernate, but this book takes you further and shows how you can apply it practically in your daily work. Hibernate Recipes, Second Edition is a must have book for your library. Hibernate 4.x continues to be the most popular out-of-the-box, open source framework solution for Java persistence and data/database accessibility techniques and patterns and it works well with the most popular open source enterprise Java framework of all, the Spring Framework. Hibernate is used for e-commerce–based web applications as well as heavy-duty transactional systems for the enterprise.
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
Includes index.
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 involving Hibernate. There are many books focused on learning Hibernate, but this book takes you further and shows how you can apply it practically in your daily work. Hibernate Recipes, Second Edition is a must have book for your library. Hibernate 4.x continues to be the most popular out-of-the-box, open source framework solution for Java persistence and data/database accessibility techniques and patterns and it works well with the most popular open source enterprise Java framework of all, the Spring Framework. Hibernate is used for e-commerce–based web applications as well as heavy-duty transactional systems for the enterprise.
Hibernate (Electronic resource)
Java (Computer program language).
Software engineering.
Java.
Software Engineering/Programming and Operating Systems.