Hibernate

Solo disponible en BuenasTareas
  • Páginas : 84 (20834 palabras )
  • Descarga(s) : 0
  • Publicado : 15 de junio de 2011
Leer documento completo
Vista previa del texto
HIBERNATE - Relational Persistence for Idiomatic Java
Hibernate Reference Documentation 3.3.1

HIBERNATE - Relational Persistence for Idiomatic Java
Copyright © 2004 Red Hat Middleware, LLC.

Legal Notice
1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA

Copyright © 2007 by RedHat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License [http://www.gnu.org/licenses/lgpl-2.1.html], as published by the Free Software Foundation. Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United States andother countries. All other trademarks referenced herein are the property of their respective owners. The GPG fingerprint of the security@redhat.com key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E

Preface ......................................................................................................... xi 1. Introduction to Hibernate...................................................................... 1 1.1. Preface .......................................................................................... 1 1.2. Part 1 - The first Hibernate Application ......................................... 1 1.2.1. The first class ..................................................................... 2 1.2.2. The mapping file................................................................. 4 1.2.3. Hibernate configuration ....................................................... 6 1.2.4. Building with Ant ................................................................. 8 1.2.5. Startup and helpers .......................................................... 10 1.2.6. Loading and storing objects .............................................. 11 1.3. Part2 - Mapping associations ..................................................... 15 1.3.1. Mapping the Person class ................................................ 15 1.3.2. A unidirectional Set-based association ............................. 16 1.3.3. Working the association .................................................... 17 1.3.4. Collection of values........................................................... 19 1.3.5. Bi-directional associations ................................................. 21 1.3.6. Working bi-directional links ............................................... 22 1.4. Part 3 - The EventManager web application ................................ 23 1.4.1. Writing the basic servlet ................................................... 23 1.4.2. Processing andrendering ................................................. 24 1.4.3. Deploying and testing ....................................................... 26 1.5. Summary ..................................................................................... 27 2. Architecture .......................................................................................... 29 2.1. Overview...................................................................................... 29 2.2. Instance states ............................................................................ 32 2.3. JMX Integration ........................................................................... 32 2.4. JCA Support ................................................................................ 33 2.5. ContextualSessions .................................................................... 33 3. Configuration ........................................................................................ 35 3.1. Programmatic configuration ......................................................... 35 3.2. Obtaining a SessionFactory ......................................................... 36 3.3. JDBC connections...
tracking img