Over 50 recipes to help you build dynamic and powerful real-time Java Hibernate applicationsAbout This BookLearn to associate JDBC and Hibernate with object persistenceManage association mappings, implement basic annotations and learn cachingGet to grips with Hibernate fundamentals from installation to developing a business application with this step-by-step guideWho This Book Is ForThis is book for Java developers who now want to learn Hibernate. Good knowledge and understanding of Java is preferred to allow efficient programming of the core elements and applications; it would be helpful if readers are familiar with the basics of SQL.What You Will LearnSet up and install Hibernate on your system and explore different ways in which Hibernate can be configuredLearn the basic concepts and fundamentals of Java HibernateDefine mappings without a use of XML file using AnnotationsPersist collection elements such as list, map, set and arrayExplore the various mapping options and learn to work with Hibernate associationsUnderstand advanced Hibernate concepts such as caching and inheritanceDevelop an engaging and robust real-world hibernate application based on a common business scenarioIntegrate Hibernate with other frameworks to develop robust enterprise applicationsIn DetailHibernate is a database independent technology, so the same code will work for all databases. It helps a Java developer write a query by mapping Java bean to database tables and help create tuned queries that boost performance. Even with limited SQL knowledge one can easily perform database operations. This makes the development faster and more accurate than JDBC. Hibernate supports useful features like connection pooling, caching, and inheritance etc.This book will provide a useful hands-on guide to Hibernate to accomplish the development of a real-time Hibernate application.We will start with the basics of Hibernate, which include setting up Hibernate - the pre-requisites and multiple ways of configuring Hibernate using Java. We will then dive deep into the fundamentals of Hibernate such as SessionFactory, session, criteria, working with objects and criteria. This will help a developer have a better understanding of how Hibernate works and what needs to be done to run a Hibernate application. Moving on, we will learn how to work with annotations, associations and collections. In the final chapters, we will see explore querying, advanced Hibernate concepts and integration with other frameworks.Style and approachThis book is a practical guide filled with carefully organized step-by-step instructions. All recipes are arranged in an easy-to understand and clear manner allowing you to apply the solutions to other situations.
weitere Ausgaben werden ermittelt
Yogesh Prajapati is a Java programmer. He has more than 4 years of experience in implementing enterprise web applications using J2EE technologies. Yogesh has experience in technologies and frameworks such as Spring, Hibernate, RESTful Web Services, and MongoDB.
He pursued a BCA from Ganpat University, Kherva, Gujarat, India. In 2011, Yogesh obtained a master's degree in computer application from Gujarat University, Gujarat, India.
Yogesh's expertise is not limited to a particular domain; he has worked with clients in the transportation, finance, and health care domains. Apart from this, he has had experience in GIS development and has also worked in the hospitality industry.
Yogesh has a blog, http://kode12.com, where he shares his knowledge of Java and other technologies. He is interested in contributing to open source technologies and is enthusiastic about building new products and services. You can follow Yogesh on his blog and on Linkedin at http://in.linkedin.com/in/yogeshmprajapati. Vishal Ranapariya is a Java developer. He has more than 4 years of experience in implementing enterprise web applications using J2EE technology. He has experience with technologies and frameworks such as Java, J2EE, Spring, Hibernate, RESTful web services, MongoDB, and Core Hadoop.
Vishal pursued a BCA from Gujarat University, Gujarat, India. In 2011, he obtained a master's degree in computer application from Gujarat University, Gujarat, India.
Vishal has blogs at http://kode12.com, where he shares his knowledge of Java-related open source technologies. He is interested in contributing to open source technologies. Vishal is enthusiastic about building new products and services. You can follow Vishal on his blog and on LinkedIn at https://in.linkedin.com/in/vishalranapariya.
- About the Authors
- About the Reviewers
- Table of Contents
- Chapter 1: Setting Up Hibernate
- Getting the required libraries for hibernate
- Creating a hibernate persistent class
- Providing an XML-based hibernate mapping
- Providing an annotation-based hibernate mapping
- Providing a hibernate configuration using an XML file
- Providing a hibernate configuration using the properties file
- Configuring hibernate programmatically
- Chapter 2: Understanding the Fundamentals
- Building a SessionFactory
- Creating a generic SessionFactory provider class
- Opening a new session
- Opening a stateless session
- Saving an object to the database
- Fetching an object from the database
- Removing an object from the database
- Updating an object
- Creating a criteria
- Restricting the results using a criteria
- Pagination using a criteria
- Sorting the results
- Transforming a result
- Using basic projection
- Chapter 3: Basic Annotations
- Declaring a class as an entity and creating a table in the database - @Entity and @Table
- Creating a column in the table - @Column
- Creating a primary key and composite primary key column - @Id and @IdClass
- Creating an autogenerator column
- Chapter 4: Working with Collections
- Persisting List
- Persisting Set
- Persisting Map
- Persisting Array
- Chapter 5: Working with Associations
- One-to-one mapping using foreign key association
- One-to-one mapping using a common join table
- One-to-one mapping using a common primary key
- One-to-many mapping or many-to-one mapping
- Many-to-many mapping
- Chapter 6: Querying
- Working with an alias
- Performing aggregate operations
- Executing a subquery using a criteria
- Executing a native SQL query
- Executing a query using HQL
- Using formula in hibernate
- Working with NamedQuery
- Chapter 7: Advanced Concepts
- Working with a first-level cache
- Working with a second-level cache
- Working with a query cache
- Working with the table per class hierarchy strategy of inheritance
- Working with the table per subclass strategy of inheritance
- Working with the table per concrete class strategy of inheritance
- Working with the versioning of objects
- Maintaining the history of an object
- Working with an interceptor
- Working with batch processing
- Chapter 8: Integration with Other Frameworks
- Integration with Spring
- Integration with Struts
Dewey Decimal Classfication (DDC)
Adobe-DRM (Digital Rights Management)Systemvoraussetzungen:
Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).
E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.