万本电子书0元读

万本电子书0元读

顶部广告

Mastering Hibernate电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Ramin Rad

出  版  社:Packt Publishing

出版时间:2016-05-16

字       数:136.3万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn how to correctly utilize the most popular Object-Relational Mapping tool for your Enterprise applicationAbout This Book·Understand the internals of Hibernate and its architecture, and how it manages Entities, Events, Versioning, Filters, and Cache·Observe how Hibernate bridges the gap between object-oriented concepts and relational models·Discover how Hibernate can address architectural concerns such as Transaction, Database Multi-tenancy, Clustering, and Database ShardsWho This Book Is ForMastering Hibernate is intended for those who are already using or considering using Hibernate as the solution to address the problem of Object Relational Mapping. If you are already using Hibernate, this book will help you understand the internals and become a power user of Hibernate.What You Will Learn·Understand the internals of a Hibernate session and how Entities are managed·Declare better mapping between entity classes and database tables·Manage entity associations and collections·Fetch data not just by entity ID, but also using HQL, Criteria Objects, Filters, and Native SQL·Observe the first and second level caches and find out how to manage them·Collect statistics and metrics data for further observation·Make your application work with multi-tenant databasesIn DetailHibernate has been so successful since its inception that it even influenced the Java Enterprise Edition specification in that the Java Persistence API was dramatically changed to do it the Hibernate way. Hibernate is the tool that solves the complex problem of Object Relational Mapping. It can be used in both Java Enterprise applications as well as .Net applications. Additionally, it can be used for both SQL and NoSQL data stores.Some developers learn the basics of Hibernate and hit the ground quickly. But when demands go beyond the basics, they take a reactive approach instead of learning the fundamentals and core concepts. However, the secret to success for any good developer is knowing and understanding the tools at your disposal. It's time to learn about your tool to use it betterThis book first explores the internals of Hibernate by discussing what occurs inside a Hibernate session and how Entities are managed. Then, we cover core topics such as mapping, querying, caching, and we demonstrate how to use a wide range of very useful annotations.Additionally, you will learn how to create event listeners or interceptors utilizing the improved architecture in the latest version of Hibernate.Style and approachThis book takes a close look at the core topics, and helps you understand the complex topics by showing you examples and giving you in-depth discussions.
目录展开

Mastering Hibernate

Mastering Hibernate

Credits

About the Author

About the Reviewers

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Entity and Session

Why this book?

Quick Hibernate

Working with a session

Session internals

Contextual session

Session per request

Session per conversation

Session per operation

Stateless session

Entity

Entity lifecycle

Types of entities

Identity crisis

Beyond JPA

Proxy objects

Batch processing

Manual batch management

Setting batch size

Using stateless session

Summary

2. Advanced Mapping

Mapping concepts

Instances and rows

Annotation versus XML

Owning entity

Value mapping

JPA ID generation

Hibernate ID generation

Composite ID

Association cardinality

One-to-one associations

One-to-many associations

Many-to-one associations

Many-to-many associations

Self-referencing tables

Cascade operations

Inheritance

Single table strategy

Table per class strategy

Joined strategy

Enumeration and custom data type

Enumerated type

Custom data type mapping

Summary

3. Working with Annotations

Mapping and association

@Any and @ManyToAny

@MapsId

@Fetch

@OrderBy

@ElementCollection and @CollectionTable

Behavior

@Cache

@Access

@Cascade

@CreationTimestamp and @UpdateTimestamp

@Filter and @FilterDef

@Immutable

@Loader

@NotFound

@SortComparator and @SortNatural

SQL/DDL modifier

@Check

@ColumnDefault

@ColumnTransformer

@DynamicInsert and @DynamicUpdate

@Formula

@SelectBeforeUpdate

@SQLDelete and @Where

@SQLInsert and @SQLUpdate

@SubSelect and @Synchronize

@WhereJoinTable

@NaturalId

Summary

4. Advanced Fetching

Fetching strategy

The JOIN fetch mode

The SELECT fetch mode

The SUBSELECT fetch mode

Batch fetching

Hibernate Query Language

Fetch queries

Delete and update

Join

Native SQL

Scalar query

Entity query

Criteria objects

Filters

Pagination

Summary

5. Hibernate Cache

Cache structure

Cache scope

First-level cache

Second-level cache

Cache provider interface

Ehcache implementation

Cache configuration

Query cache

Caching benefits and pitfalls

Caching strategies

Read only

Non-strict read write

Read-write

Transactional

Object identity

Managing the cache

Remove cached entities

Cache modes

Cache metrics

Summary

6. Events, Interceptors, and Envers

Services

Service loader

Service registry

The OSGi model

Events

Event listener

Registering listeners

Interceptors

Database trigger

Event or interceptor

Envers

Configuration

Strategy

Fetching revisions

Summary

7. Metrics and Statistics

Statistical data types

Session

Entity

Collection

Query

Cache

Statistics via JMX

Introduction to JMX

Using JMX with Hibernate

Summary

8. Addressing Architecture

Architecture matters

Transaction management

Local transactions

The Java Transaction API

Compensating transactions

Concurrency

Isolation levels

Locking

User lock

Scalability

Clustering

Database shards

Configuration

Sharded session factory

Shard strategy

Shard ID generation

Performance

Lazy loading

Fetch mode

Batch processing

Caching

Stateless session

Legacy application

Reverse engineering

Modernization

The Cloud strategy

Licensing

Multi-tenancy

Summary

9. EJB and Spring Context

Deployment

Configuration

Resource

Transaction

Hibernate libraries

EJB

Persistence unit

Server resources

Entity manager

Transaction

Hibernate session

Spring

Configuration

Transaction management

Data source

Session factory

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部