Hibernate in action: [the ultimate Hibernate reference]
Gespeichert in:
Hauptverfasser: | , |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Greenwich, Conn.
Manning
2005
|
Ausgabe: | 2., corr. print. |
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXIII, 408 S. Ill. |
ISBN: | 193239415X |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV019619652 | ||
003 | DE-604 | ||
005 | 20121106 | ||
007 | t | ||
008 | 041206s2005 a||| |||| 00||| eng d | ||
020 | |a 193239415X |9 1-932394-15-X | ||
035 | |a (OCoLC)249429406 | ||
035 | |a (DE-599)BVBBV019619652 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-473 |a DE-29T |a DE-M158 |a DE-523 |a DE-B768 | ||
050 | 0 | |a QA76.64 | |
082 | 0 | |a 005.133 | |
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a ST 271 |0 (DE-625)143639: |2 rvk | ||
100 | 1 | |a Bauer, Christian |d 1977- |e Verfasser |0 (DE-588)1027518974 |4 aut | |
245 | 1 | 0 | |a Hibernate in action |b [the ultimate Hibernate reference] |c Christian Bauer ; Gavin King |
250 | |a 2., corr. print. | ||
264 | 1 | |a Greenwich, Conn. |b Manning |c 2005 | |
300 | |a XXIII, 408 S. |b Ill. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
650 | 4 | |a Hibernate | |
650 | 0 | 7 | |a Hibernate |0 (DE-588)4785089-9 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Hibernate |0 (DE-588)4785089-9 |D s |
689 | 0 | |5 DE-604 | |
700 | 1 | |a King, Gavin |e Verfasser |4 aut | |
856 | 4 | 2 | |m HBZ Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=012949071&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-012949071 |
Datensatz im Suchindex
_version_ | 1804132982908256256 |
---|---|
adam_text | Titel: Hibernate in action
Autor: Bauer, Christian
Jahr: 2005
contents
foreword xi
preface xiii
acknowledgments xv
about this book xvi
about Hibernated and EJB 3 xx
author online xxi
about the title and cover xxii
Understanding object/relational persistence 1
1.1 What is persistence? 3
Relational databases 3 * Understanding SQL 4 • Using SQL
in Java 5 * Persistence in object-oriented applications 5
1.2 The paradigm mismatch 7
The problem of granularity 9* The problem of subtypes 10
The problem of identity 11 * Problems relating to associations 13
The problem of object graph navigation 14 • The cost of the
mismatch 15
1.3 Persistence layers and alternatives 16
Layered architecture 17 * Hand-coding a persistence layer with
SQL/JDBC 18 * Using serialization 19 ¦ Considering EJB
entity beans 20 • Object-oriented database systems 21
Other options 22
1.4 Object/relational mapping 22
WhatisORM? 23* Generic ORM problems 25
WhyORM? 26
1.5 Summary 29
vi
CONTENTS
O Introducing and integrating Hibernate 30
£ 2.1 Hello World with Hibernate 31
2.2 Understanding the architecture 36
The core interfaces 38 ¦ Callback interfaces 40
Types 40 ¦ Extension interfaces 41
2.3 Basic configuration 41
Creating a SessionFactory 42 ¦ Configuration in
non-managed environments 45 ¦ Configuration in
managed environments 48
2.4 Advanced configuration settings 51
Using XML-based configuration 51 ¦ JNDI-bound
SessionFactory 53 ¦ Logging 54 ¦ Java Management
Extensions (JMX) 55
2.5 Summary 58
Mapping persistent classes 59
3.1 The CaveatEmptor application 60
Analyzing the business domain 61
The CaveatEmptor domain model 61
3.2 Implementing the domain model 64
Addressing leakage of concerns 64 • Transparent and
automated persistence 65 ¦ Writing POJOs 61
Implementing POJO associations 69 ¦ Adding logic to
accessor methods 73
3.3 Defining the mapping metadata 75
Metadata in XML 75 ¦ Basic property and class
mappings 78 ¦ Attribute-oriented programming 84
Manipulating metadata at runtime 86
3.4 Understanding object identity 87
Identity versus equality 87 ¦ Database identity with
Hibernate 88 ¦ Choosing primary keys 90
3.5 Fine-grained object models 92
Entity and value types 93 • Using components 93
3.6 Mapping class inheritance 97
Table per concrete class 97 • Table per class hierarchy 99
Table per subclass 101 ¦ Choosing a strategy 104
CONTENTS
vii
3.7 Introducing associations 105
Managed associations? 106 ¦ Multiplicity 106
The simplest possible association 107 ¦ Making the association
bidirectional 108 * A parent/child relationship 111
3.8 Summary 112
Working with persistent objects 114
4.1 The persistence lifecycle 115
Transient objects 116 ¦ Persistent objects 117 ¦ Detached
objects 118¦ The scope of object identity 119 ¦ Outside the
identity scope 121 ¦ Implementing equals() and hashCode() 122
4.2 The persistence manager 126
Making an object persistent 126 ¦ Updating the persistent state
of a detached instance 127 ¦ Retrieving a persistent object 129
Updating a persistent object 129 ¦ Making a persistent object
transient 129 • Making a detached object transient 130
4.3 Using transitive persistence in Hibernate 131
Persistence by reachability 131 ¦ Cascading persistence with
Hibernate 133 • Managing auction categories 134
Distinguishing between transient and detached instances 138
4.4 Retrieving objects 139
Retrieving objects by identifier 140 ¦ Introducing HQL 141
Query by criteria 142 * Query by example 143 ¦ Fetching
strategies 143 ¦ Selecting a fetching strategy in mappings 146
Tuning object retrieval 151
4.5 Summary 152
Transactions, concurrency, and caching 154
5.1 Transactions, concurrency, and caching 154
5.2 Understanding database transactions 156
JDBC and JTA transactions 157 ¦ The Hibernate Transaction
API 158 ¦ Rushing the Session 160 ¦ Understanding isolation
levels 161 ¦ Choosing an isolation level 163 ¦ Setting an
isolation level 165 ¦ Using pessimistic locking 165
5.3 Working with application transactions 168
Using managed versioning 169 ¦ Granularity of a
Session 172 ¦ Other ways to implement optimistic locking 174
viii
CONTENTS
5.4 Caching theory and practice 175 r* ^
Caching strategies and scopes 176 ¦ The Hibernate cache
i architecture 179 ¦ Caching in practice 185
5.5 Summary 194
,-;X Advanced mapping concepts 195
16.1 Understanding the Hibernate type system 196
Built-in mapping types 198 • Using mapping types 200
6.2 Mapping collections of value types 211
Sets, bags, lists, and maps 211
6.3 Mapping entity associations 220
One-to-one associations 220 ¦ Many-to-many associations 225
6.4 Mapping polymorphic associations 234
Polymorphic many-to-one associations 234 ¦ Polymorphic
collections 236 ¦ Polymorphic associations and table-per-
concrete-class 237 . i
6.5 Summary 239
^7 Retrieving objects efficiently 241
4 7.1 Executing queries 243 ! ,
The query interfaces 243 ¦ Binding parameters 245
Using named queries 249
7.2 Basic queries for objects 250
The simplest query 250 ¦ Using aliases 251 ¦ Polymorphic
queries 251 ¦ Restriction 252 ¦ Comparison operators 253
String matching 255 ¦ Logical operators 256 ¦ Ordering query
results 257
7.3 Joining associations 258 ;
Hibernate join options 259 • Fetching associations 260
; . Using aliases with joins 262 ¦ Using implicit joins 265
Theta-style joins 267 ¦ Comparing identifiers 268
7.4 Writing report queries 269
Projection 270 ¦ Using aggregation 272 ¦ Grouping 273
Restricting groups with having 274 ¦ Improving performance
with report queries 275
CONTENTS
7.5 Advanced query techniques 276
Dynamic queries 276 ¦ Collection filters 279
Subqueries 281 * Native SQJ, queries 283
7.6 Optimizing object retrieval 286
Solving the n+1 selects problem 286 * Using iterate()
queries 289 * Caching queries 290
7.7 Summary 292
Writing Hibernate applications 294
8.1 Designing layered applications 295 f r. .
Using Hibernate in a servlet engine 296
Using Hibernate in an EJB container 311
8.2 Implementing application transactions 320
Approving a new auction 321 * Doing it the hard way 322
Using detached persistent objects 324 * Using a long session 32
Choosing an approach to application transactions 329
8.3 Handling special kinds of data 330
Legacy schemas and composite keys 330 * Audit logging 340
8.4 Summary 347
Using the toolset 348
9.1 Development processes 349
Top down 350 • Bottom up 350 * Middle out (metadata
oriented) 350 * Meet in the middle 350
Roundtripping 351
9.2 Automatic schema generation 351
Preparing the mapping metadata 352 • Creating the
schema 355 * Updating the schema 357
9.3 Generating POJO code 358
Adding meta-attributes 358 * Generating finders 360
Configuring hbm2java 362 * Running hbm2java 363
9.4 Existing schemas and Middlegen 364
Starting Middlegen 364 * Restricting tables and
relationships 366 * Customizing the metadata generation 368
Generating hbm2java and XDoclet metadata 370
X
CONTENTS
9.5 XDocIet 372
Setting value type attributes 372 ¦ Mapping entity
associations 374 ¦ RunningXDoclet 375
9.6 Summary 376 •
appendix A: SQL fundamentals 378
appendix B: ORM implementation strategies 382
B.l Properties or fields? 383
B.2 Dirty-checking strategies 384 - » j
appendix C: Back in the real world 388
C.l The strange copy 389 * ¦
C.2 The more the better 390
C.3 We don t need primary keys 390
C.4 Time isn t linear 391 I * *
C.5 Dynamically unsafe 391
C.6 To synchronize or not? 392 1
C.7 Really fat client 393
C.8 Resuming Hibernate 394 j
references 395
index 397
|
any_adam_object | 1 |
author | Bauer, Christian 1977- King, Gavin |
author_GND | (DE-588)1027518974 |
author_facet | Bauer, Christian 1977- King, Gavin |
author_role | aut aut |
author_sort | Bauer, Christian 1977- |
author_variant | c b cb g k gk |
building | Verbundindex |
bvnumber | BV019619652 |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.64 |
callnumber-search | QA76.64 |
callnumber-sort | QA 276.64 |
callnumber-subject | QA - Mathematics |
classification_rvk | ST 250 ST 271 |
ctrlnum | (OCoLC)249429406 (DE-599)BVBBV019619652 |
dewey-full | 005.133 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.133 |
dewey-search | 005.133 |
dewey-sort | 15.133 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
edition | 2., corr. print. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01414nam a2200385 c 4500</leader><controlfield tag="001">BV019619652</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20121106 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">041206s2005 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">193239415X</subfield><subfield code="9">1-932394-15-X</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)249429406</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV019619652</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-473</subfield><subfield code="a">DE-29T</subfield><subfield code="a">DE-M158</subfield><subfield code="a">DE-523</subfield><subfield code="a">DE-B768</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">QA76.64</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.133</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 271</subfield><subfield code="0">(DE-625)143639:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Bauer, Christian</subfield><subfield code="d">1977-</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)1027518974</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Hibernate in action</subfield><subfield code="b">[the ultimate Hibernate reference]</subfield><subfield code="c">Christian Bauer ; Gavin King</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">2., corr. print.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Greenwich, Conn.</subfield><subfield code="b">Manning</subfield><subfield code="c">2005</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXIII, 408 S.</subfield><subfield code="b">Ill.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Hibernate</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Hibernate</subfield><subfield code="0">(DE-588)4785089-9</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Hibernate</subfield><subfield code="0">(DE-588)4785089-9</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">King, Gavin</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">HBZ Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=012949071&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-012949071</subfield></datafield></record></collection> |
id | DE-604.BV019619652 |
illustrated | Illustrated |
indexdate | 2024-07-09T20:01:29Z |
institution | BVB |
isbn | 193239415X |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-012949071 |
oclc_num | 249429406 |
open_access_boolean | |
owner | DE-473 DE-BY-UBG DE-29T DE-M158 DE-523 DE-B768 |
owner_facet | DE-473 DE-BY-UBG DE-29T DE-M158 DE-523 DE-B768 |
physical | XXIII, 408 S. Ill. |
publishDate | 2005 |
publishDateSearch | 2005 |
publishDateSort | 2005 |
publisher | Manning |
record_format | marc |
spelling | Bauer, Christian 1977- Verfasser (DE-588)1027518974 aut Hibernate in action [the ultimate Hibernate reference] Christian Bauer ; Gavin King 2., corr. print. Greenwich, Conn. Manning 2005 XXIII, 408 S. Ill. txt rdacontent n rdamedia nc rdacarrier Hibernate Hibernate (DE-588)4785089-9 gnd rswk-swf Hibernate (DE-588)4785089-9 s DE-604 King, Gavin Verfasser aut HBZ Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=012949071&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Bauer, Christian 1977- King, Gavin Hibernate in action [the ultimate Hibernate reference] Hibernate Hibernate (DE-588)4785089-9 gnd |
subject_GND | (DE-588)4785089-9 |
title | Hibernate in action [the ultimate Hibernate reference] |
title_auth | Hibernate in action [the ultimate Hibernate reference] |
title_exact_search | Hibernate in action [the ultimate Hibernate reference] |
title_full | Hibernate in action [the ultimate Hibernate reference] Christian Bauer ; Gavin King |
title_fullStr | Hibernate in action [the ultimate Hibernate reference] Christian Bauer ; Gavin King |
title_full_unstemmed | Hibernate in action [the ultimate Hibernate reference] Christian Bauer ; Gavin King |
title_short | Hibernate in action |
title_sort | hibernate in action the ultimate hibernate reference |
title_sub | [the ultimate Hibernate reference] |
topic | Hibernate Hibernate (DE-588)4785089-9 gnd |
topic_facet | Hibernate |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=012949071&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT bauerchristian hibernateinactiontheultimatehibernatereference AT kinggavin hibernateinactiontheultimatehibernatereference |