注冊(cè) | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁(yè)出版圖書科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件與程序設(shè)計(jì)JAVA及其相關(guān)Hibernate實(shí)戰(zhàn)(第2版·英文版)

Hibernate實(shí)戰(zhàn)(第2版·英文版)

Hibernate實(shí)戰(zhàn)(第2版·英文版)

定 價(jià):¥89.00

作 者: (德)鮑爾,(澳)金 著
出版社: 人民郵電出版社
叢編項(xiàng): 圖靈程序設(shè)計(jì)叢書
標(biāo) 簽: Hibernate

ISBN: 9787115160614 出版時(shí)間: 2007-06-01 包裝: 膠版紙
開(kāi)本: 16開(kāi) 頁(yè)數(shù): 825 字?jǐn)?shù):  

內(nèi)容簡(jiǎn)介

  持久化是現(xiàn)代企業(yè)級(jí)應(yīng)用的核心特性。作為Java世界最流行的持久化框架,Hibernate已經(jīng)成為開(kāi)發(fā)Java EE應(yīng)用系統(tǒng)中不可替代的支柱之一。隨著EJB 3.0和Java Persistence標(biāo)準(zhǔn)的發(fā)布,Hibernate也迎來(lái)了更加成熟的新版本——Hibernate 3.2。新版本實(shí)現(xiàn)了Java Persistence標(biāo)準(zhǔn),既可以用于流行的開(kāi)源技術(shù)組合(如Spring、Struts和Seam等),也可以與其他EJB 3.0組件和Java EE服務(wù)集成。.本書是毋庸置疑的Hibernate和ORM(對(duì)象/關(guān)系映射)權(quán)威著作的最新版本,由包括Hibernate之父在內(nèi)的兩位核心開(kāi)發(fā)人員親自執(zhí)筆,詳細(xì)講述了Hibernate 3.2、Java Persistence 和EJB 3.0標(biāo)準(zhǔn)。..本書通過(guò)一個(gè)應(yīng)用將數(shù)百個(gè)例子融合起來(lái),不僅深入剖析了Hibernate 3.2和Java Persistence豐富的編程模型,還深刻闡述了數(shù)據(jù)庫(kù)設(shè)計(jì)、ORM和優(yōu)化等方面的基本原則、策略和最佳實(shí)踐。書中處處閃爍著作者超凡的真知灼見(jiàn),將大大升華讀者對(duì)ORM乃至企業(yè)級(jí)應(yīng)用開(kāi)發(fā)的理解。...

作者簡(jiǎn)介

  本書提供作譯者介紹Gavin KingHibernate項(xiàng)目的創(chuàng)始人和主要開(kāi)發(fā)人員,目前是Red Hat公司Hibernate和Seam項(xiàng)目的負(fù)責(zé)人。他還是EJB 3.0 (JSR 220)專家組成員,對(duì)Java Persistence標(biāo)準(zhǔn)以及整個(gè)EJB 3.0標(biāo)準(zhǔn)的制定都產(chǎn)生了巨大影響。他還是雄心勃勃的Web Beans JSR 299標(biāo)準(zhǔn)項(xiàng)目的負(fù)責(zé)人,該標(biāo)準(zhǔn)旨在將JSF受管理beans組件模型與EJB 3.0組件模型統(tǒng)一起來(lái)。Gavin出生于澳大利亞,現(xiàn)居墨爾本和美國(guó)亞特蘭大。...

圖書目錄

Part1 Getting started with Hibernate and EJB 3.0 
1 Understanding object/relational persistence 
1.1 What is persistence?
 Relational databases 
 Understanding SQL 
 Using SQL in Java 
 Persistence in object-oriented applications
1.2 The paradigm mismatch 
 The problem of granularity 
 The problem of subtypes 
 The problem of identity 
 Problems relating to associations
 The problem of data navigation 
  The cost of the mismatch 
1.3 Persistence layers and alternatives
 Layered architecture
 Hand-coding a persistence layer with SQL/JDBC 
 Using serialization 
 Object-oriented database systems 
 Other options 
1.4 Object/relational mapping 
 What is ORM? 
 Generic ORM problems 
 Why ORM? 
 Introducing Hibernate, EJB3, and JPA 
1.5 Summary 
2 Starting a project 
2.1 Starting a Hibernate project 
 Selecting a development process 
 Setting up the project 
 Hibernate configuration and startup 
 Running and testing the application
2.2 Starting a Java Persistence project
 Using Hibernate Annotations
 Using Hibernate EntityManager 
 Introducing EJB components 
 Switching to Hibernate interfaces 
2.3 Reverse engineering a legacy database
 Creating a database configuration
 Customizing reverse engineering
 Generating Java source code 
2.4 Integration with Java EE services
 Integration with JTA 
 JNDI-bound SessionFactory 
 JMX service deployment 
2.5 Summary 
3 Domain models and metadata 
3.1 The CaveatEmptor application 
 Analyzing the business domain 
 The CaveatEmptor domain model 
3.2 Implementing the domain model
 Addressing leakage of concerns 
 Transparent and automated persistence
 Writing POJOs and persistent entity classes 
 Implementing POJO associations 
 Adding logic to accessor methods 
3.3 Object/relational mapping metadata 
 Metadata in XML 
 Annotation-based metadata 
 Using XDoclet 
 Handling global metadata 
 Manipulating metadata at runtime 
3.4 Alternative entity representation
 Creating dynamic applications 
 Representing data in XML 
3.5 Summary 
Part 2 Mapping concepts and strategies 
4 Mapping persistent classes 
4.1 Understanding entities and value types
 Fine-grained domain models 
 Defining the concept 
 Identifying entities and value types 
4.2 Mapping entities with identity 
 Understanding Java identity and equality 
 Handling database identity 
 Database primary keys 
4.3 Class mapping options 
 Dynamic SQL generation
 Making an entity immutable 
 Naming entities for querying 
 Declaring a package name 
 Quoting SQL identifiers 
 Implementing naming conventions 
4.4 Fine-grained models and mappings
 Mapping basic properties 
 Mapping components
4.5 Summary
5 Inheritance and custom types 
5.1 Mapping class inheritance
 Table per concrete class with implicit polymorphism
 Table per concrete class with unions
 Table per class hierarchy 
 Table per subclass
 Mixing inheritance strategies 
 Choosing a strategy 
5.2 The Hibernate type system
 Recapitulating entity and value types 
 Built-in mapping types 
 Using mapping types 
5.3 Creating custom mapping types 
 Considering custom mapping types 
 The extension points
 The case for custom mapping types 
 Creating a UserType
 Creating a CompositeUserType
 Parameterizing custom types 
 Mapping enumerations
5.4 Summary
6 Mapping collections and entity associations 
6.1 Sets, bags, lists, and maps of value types 
 Selecting a collection interface
 Mapping a set 
 Mapping an identifier bag
 Mapping a list 
 Mapping a map 
 Sorted and ordered collections 
6.2 Collections of components 
 Writing the component class 
 Mapping the collection 
 Enabling bidirectional navigation
 Avoiding not-null columns
6.3 Mapping collections with annotations 
 Basic collection mapping 
 Sorted and ordered collections
 Mapping a collection of embedded objects
6.4 Mapping a parent/children relationship 
 Multiplicity 
 The simplest possible association 
 Making the association bidirectional 
 Cascading object state 
6.5 Summary 
7 Advanced entity association mappings
7.1 Single-valued entity associations
 Shared primary key associations 
 One-to-one foreign key associations 
 Mapping with a join table 
7.2 Many-valued entity associations 
 One-to-many associations 
 Many-to-many associations 
 Adding columns to join tables
 Mapping maps 
7.3 Polymorphic associations 
 Polymorphic many-to-one associations 
 Polymorphic collections 
 Polymorphic associations to unions
 Polymorphic table per concrete class
7.4 Summary
8 Legacy databases and custom SQL 
8.1 Integrating legacy databases
 Handling primary keys 
 Arbitrary join conditions with formulas
 Joining arbitrary tables 
 Working with triggers 
8.2 Customizing SQL 
 Writing custom CRUD statements 
 Integrating stored procedures and functions
8.3 Improving schema DDL 
 Custom SQL names and datatypes
 Ensuring data consistency
 Adding domains and column constraints
 Table-level constraints 
 Database constraints
 Creating indexes 
 Adding auxiliary DDL 
8.4 Summary 
Part 3 Conversational object processing
9 Working with objects 
9.1 The persistence lifecycle 
 Object states
 The persistence context
9.2 Object identity and equality 
 Introducing conversations 
 The scope of object identity 
 The identity of detached objects 
 Extending a persistence context 
9.3 The Hibernate interfaces
 Storing and loading objects 
 Working with detached objects
 Managing the persistence context
9.4 The Java Persistence API 
 Storing and loading objects 
 Working with detached entity instances 
9.5 Using Java Persistence in EJB components
 Injecting an EntityManager 
 Looking up an EntityManager 
 Accessing an EntityManagerFactory 
9.6 Summary 
10 Transactions and concurrency 
10.1 Transaction essentials 
 Database and system transactions
 Transactions in a Hibernate application
 Transactions with Java Persistence 
10.2 Controlling concurrent access
 Understanding database-level concurrency
 Optimistic concurrency control 
 Obtaining additional isolation guarantees
10.3 Nontransactional data access 
 Debunking autocommit myths 
 Working nontransactionally with Hibernate
 Optional transactions with JTA 
10.4 Summary 
11 Implementing conversations 
11.1 Propagating the Hibernate Session
 The use case for Session propagation
 Propagation through thread-local
 Propagation with JTA 
 Propagation with EJBs 
11.2 Conversations with Hibernate 
 Providing conversational guarantees 
 Conversations with detached objects 
 Extending a Session for a conversation 
11.3 Conversations with JPA 
 Persistence context propagation in Java SE 
 Merging detached objects in conversations 
 Extending the persistence context in Java SE 
11.4 Conversations with EJB 3.0 
 Context propagation with EJBs 
 Extended persistence contexts with EJBs 
11.5 Summary 
12 Modifying objects efficiently 
12.1 Transitive persistence 
Persistence by reachability 
 Applying cascading to associations 
 Working with transitive state 
 Transitive associations with JPA 
12.2 Bulk and batch operations 
 Bulk statements with HQL and JPA QL 
 Processing with batches 
 Using a stateless Session 
12.3 Data filtering and interception
 Dynamic data filters
 Intercepting Hibernate events
 The core event system 
 Entity listeners and callbacks
12.4 Summary 
13 Optimizing fetching and caching 
13.1 Defining the global fetch plan 
 The object-retrieval options 
 The lazy default fetch plan 
 Understanding proxies 
 Disabling proxy generation 
 Eager loading of associations and collections 
 Lazy loading with interception 
13.2 Selecting a fetch strategy 
 Prefetching data in batches 
 Prefetching collections with subselects
 Eager fetching with joins 
 Optimizing fetching for secondary tables
 Optimization guidelines 
13.3 Caching fundamentals 
 Caching strategies and scopes 
 The Hibernate cache architecture 
13.4 Caching in practice 
 Selecting a concurrency control strategy 
 Understanding cache regions 
 Setting up a local cache provider
 Setting up a replicated cache 
 Controlling the second-level cache 
13.5 Summary
14 Querying with HQL and JPA QL 
14.1 Creating and running queries 
 Preparing a query
 Executing a query
 Using named queries
14.2 Basic HQL and JPA QL queries
 Selection 
 Restriction
 Projection
14.3 Joins, reporting queries, and subselects 
 Joining relations and associations 
 Reporting queries 
 Using subselects 
14.4 Summary 
15 Advanced query options 
15.1 Querying with criteria and example 
 Basic criteria queries 
 Joins and dynamic fetching
 Projection and report queries 
 Query by example 
15.2 Using native SQL queries
 Automatic resultset handling 
 Retrieving scalar values 
 Native SQL in Java Persistence
15.3 Filtering collections 
15.4 Caching query results 
 Enabling the query result cache
 Understanding the query cache
 When to use the query cache 
 Natural identifier cache lookups
15.5 Summary 
16 Creating and testing layered applications
16.1 Hibernate in a web application 
 Introducing the use case 
 Writing a controller 
 The Open Session in View pattern
 Designing smart domain models 
16.2 Creating a persistence layer 
 A generic data-access object pattern 
 Implementing the generic CRUD interface
 Implementing entity DAOs 
 Using data-access objects 
16.3 Introducing the Command pattern 
 The basic interfaces
 Executing command objects
 Variations of the Command pattern 
16.4 Designing applications with EJB 3.0
 Implementing a conversation with stateful beans 
 Writing DAOs with EJBs 
 Utilizing dependency injection 
16.5 Testing 
 Understanding different kinds of tests
 Introducing TestNG 
 Testing the persistence layer 
 Considering performance benchmarks 
16.6 Summary 
17 Introducing JBoss Seam 
17.1 The Java EE 5.0 programming model
 Considering JavaServer Faces
 Considering EJB 3.0
 Writing a web application with JSF and EJB 3.0
 Analyzing the application
17.2 Improving the application with Seam 
 Configuring Seam 
 Binding pages to stateful Seam components
 Analyzing the Seam application 
17.3 Understanding contextual components 
 Writing the login page
 Creating the components 
 Aliasing contextual variables 
 Completing the login/logout feature 
17.4 Validating user input 
 Introducing Hibernate Validator
 Creating the registration page 
 Internationalization with Seam 
17.5 Simplifying persistence with Seam 
 Implementing a conversation 
 Letting Seam manage the persistence context 
17.6 Summary 
appendix A SQL fundamentals 
appendix B Mapping quick reference 
references 
index

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) m.ranfinancial.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)