Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
2Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
Hibernate Reference Documentation

Hibernate Reference Documentation

Ratings: (0)|Views: 53 |Likes:
Published by seenusvuc

More info:

Published by: seenusvuc on Oct 13, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/20/2011

pdf

text

original

 
Hibernate Reference Documentation
Version: 2.1.7
 
Table of Contents
Preface............................................................................................................................................vi
..............................................................................................................11.1. Getting started with Hibernate.............................................................................................11.2. First persistent class...........................................................................................................31.3. Mapping the cat.................................................................................................................41.4. Playing with cats................................................................................................................51.5. Finally...............................................................................................................................7
................................................................................................................................82.1. Overview...........................................................................................................................82.2. JMX Integration...............................................................................................................102.3. JCA Support....................................................................................................................10
...................................................................................................113.1. Programmatic Configuration.............................................................................................113.2. Obtaining a SessionFactory...............................................................................................113.3. User provided JDBC connection.......................................................................................113.4. Hibernate provided JDBC connection................................................................................123.5. Optional configuration properties......................................................................................133.5.1. SQL Dialects.........................................................................................................163.5.2. Outer Join Fetching...............................................................................................173.5.3. Binary Streams......................................................................................................183.5.4. Custom CacheProvider..........................................................................................183.5.5. Transaction strategy configuration..........................................................................183.5.6. JNDI-bound SessionFactory...................................................................................193.5.7. Query Language Substitution.................................................................................193.6. Logging...........................................................................................................................193.7. Implementing a NamingStrategy.......................................................................................193.8. XML Configuration File...................................................................................................20
......................................................................................................................214.1. A simple POJO example...................................................................................................214.1.1. Declare accessors and mutators for persistent fields.................................................224.1.2. Implement a default constructor.............................................................................224.1.3. Provide an identifier property (optional)..................................................................224.1.4. Prefer non-final classes (optional)...........................................................................234.2. Implementing inheritance.................................................................................................234.3. Implementing equals() and hashCode()..............................................................................234.4. Lifecycle Callbacks..........................................................................................................244.5. Validatable callback .........................................................................................................244.6. Using XDOclet markup....................................................................................................25
...................................................................................................................275.1. Mapping declaration.........................................................................................................275.1.1. Doctype................................................................................................................275.1.2. hibernate-mapping.................................................................................................275.1.3. class.....................................................................................................................285.1.4. id..........................................................................................................................305.1.4.1. generator....................................................................................................305.1.4.2. Hi/Lo Algorithm.........................................................................................315.1.4.3. UUID Algorithm........................................................................................325.1.4.4. Identity columns and Sequences..................................................................32Hibernate 2.1.7 ii
 
5.1.4.5. Assigned Identifiers....................................................................................325.1.5. composite-id.........................................................................................................325.1.6. discriminator.........................................................................................................335.1.7. version (optional)..................................................................................................345.1.8. timestamp (optional)..............................................................................................345.1.9. property................................................................................................................345.1.10. many-to-one........................................................................................................355.1.11. one-to-one...........................................................................................................365.1.12. component, dynamic-component..........................................................................385.1.13. subclass..............................................................................................................385.1.14. joined-subclass....................................................................................................395.1.15. map, set, list, bag.................................................................................................405.1.16. import.................................................................................................................405.2. Hibernate Types...............................................................................................................405.2.1. Entities and values.................................................................................................405.2.2. Basic value types...................................................................................................405.2.3. Persistent enum types............................................................................................415.2.4. Custom value types...............................................................................................425.2.5. Any type mappings................................................................................................425.3. SQL quoted identifiers......................................................................................................435.4. Modular mapping files......................................................................................................44
...................................................................................................................456.1. Persistent Collections.......................................................................................................456.2. Mapping a Collection.......................................................................................................466.3. Collections of Values and Many-To-Many Associations.....................................................476.4. One-To-Many Associations..............................................................................................486.5. Lazy Initialization............................................................................................................496.6. Sorted Collections............................................................................................................506.7. Using an <idbag>.............................................................................................................516.8. Bidirectional Associations................................................................................................526.9. Ternary Associations........................................................................................................536.10. Heterogeneous Associations............................................................................................536.11. Collection examples.......................................................................................................53
................................................................................................................567.1. Dependent objects............................................................................................................567.2. Collections of dependent objects.......................................................................................577.3. Components as Map indices..............................................................................................587.4. Components as composite identifiers.................................................................................587.5. Dynamic components.......................................................................................................60
.................................................................................................................618.1. The Three Strategies.........................................................................................................618.2. Limitations......................................................................................................................63
....................................................................................................659.1. Creating a persistent object...............................................................................................659.2. Loading an object.............................................................................................................659.3. Querying.........................................................................................................................669.3.1. Scalar queries........................................................................................................679.3.2. The Query interface...............................................................................................689.3.3. Scrollable iteration................................................................................................699.3.4. Filtering collections...............................................................................................699.3.5. Criteria queries......................................................................................................699.3.6. Queries in native SQL............................................................................................70HIBERNATE - Relational Persistence for Idiomatic JavaHibernate 2.1.7 iii

Activity (2)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->