-
Stored Procedures
Java Hibernate allows interaction with calls to stored procedures and lets you map the results. In this video; Tony Lowe demonstrates how to call a stored procedure by creating a NamedQuery added as an annotation to the Story class; before refining it using IN and OUT parameters.
-
Caching Data
You can enhance the performance capability of your environment when you use second level caching within Java Hibernate. In this video; Tony Lowe uses the EHCache plug-in tool to allow second level caching to store data to your environment's memory.
-
@ID and Advanced ID Options
In Java Hibernate; there are numerous options for creating the primary key using mapping. In this video; Tony Lowe demonstrates how to use more complex mapping options.
-
@Table and @SecondaryTable
In Java Hibernate; @Table and @SecondaryTable can help you create mappings when the Java naming and design does not align perfectly with the database naming and design. In this video; Tony Lowe demonstrates how to use @Table and @SecondaryTable.
-
@Transient
In Java Hibernate; you can use annotations to manage data in your model. In this video; Tony Lowe demonstrates how to use the @Transient annotation tool to mark attributes that you do not need to be persistent.
-
< class > Options
In Java Hibernate; mapping a class can be customized with many options to get different behaviour using XML. In this video; Tony Lowe demonstrates the various options that can be used with a class.
-
Advanced HQL
Java Hibernate allows you to return advanced query results by using the group by method and having clause to define the parameters of your results. In this video; Tony Lowe demonstrates how you can use advanced HQL to define and refine query results.
-
Advanced Query Management
Through HQL and Criteria objects; Java Hibernate provides advanced query management options that allow you to sort and present a consistent view when your queries return large amounts of data. In this video; Tony Lowe demonstrates how to order and paginate result data using both HQL and Criteria objects in Hibernate.
-
Advanced XML Table Mapping
Java Hibernate naming and design does not always align perfectly with the database naming and design; so XML mappings must bridge the differences. In this video; Tony Lowe demonstrates how to use advanced XML table mapping to solve this problem.
-
Allowing Hibernate to Create Tables
Java Hibernate has the ability to create your table structure with the required mapping queries. In this video; Tony Lowe uses the hbm2ddl.auto feature to allow Hibernate to create a table structure.
-
Associations and Foreign Keys – Annotations
You can use annotations in Java Hibernate to expand an object model by showing relationships between classes in Java and tables in the database; and include the mapping relationships. In this video; Tony Lowe demonstrates the steps involved in expanding an object model.
-
Associations and Foreign Keys – XML
Java Hibernate has XML mapping options which allow the framework to manage relationships between classes in Java and tables in the database. In this video; Tony Lowe demonstrates aspects of this relationship; the importance of keeping the relationships in sync; and how the relationships can be maintained.
-
Basic Mapping – Annotations
By adding simple metadata tags to your Java Hibernate code; you can do a mapping. In this video; Tony Lowe uses Java annotations to map your database table to your class.
-
Basic Mapping – XML
Java Hibernate uses annotations to map class files into a database. In this video; Tony Lowe demonstrates how to implement basic Hibernate mapping in XML between a class and a table.
-
Basic Querying – Criteria
Java Hibernate provides the Criteria API as a powerful alternative to HQL so you can perform basic querying in a programmatic way using simple Java method calls. In this video; Tony Lowe uses the createCriteria() method to create a Criteria object that returns instances of an object's class; before demonstrating how to add restrictions to a criteria query.
-
Basic Querying – HQL
Java Hibernate provides HQL (Hibernate Query Language); an object-oriented query language similar to SQL that operates on persistent objects and their properties in a Java context. In this video; Tony Lowe demonstrates the fundamentals of HQL that let you produce a SQL-like structure while performing a basic query using Java in Hibernate.
-
Basic Tests – Delete
In Java Hibernate; you can delete data using either a transient or persistent state. In this video; Tony Lowe demonstrates how to delete data in using these two different methods.
-
Basic Tests – Insert
Java Hibernate allows you to create; save; and update data objects using the Save; Persist; and saveOrUpdate options. In this video; Tony Lowe demonstrates how to create a Story object; call PERSIST and SAVE on it; and shows how PERSIST ignores and SAVE records database-generated IDs; and how saveOrUpdate inserts and saves objects to the database while overwriting existing objects.
-
Basic Tests – Reading
Loading data in Java Hibernate does most of the mapping of the data from the database to Java for you. In this video; Tony Lowe demonstrates how to load data in Hibernate and the different methods that can be used.
-
Basic Tests – Update Persistent Data
Java Hibernate allows you to keep data from Java and data from a database in sync. In this video; Tony Lowe demonstrates using the update and merge methods to control data in Java Hibernate.
-
Basic Tests – Update Transient Data
Java Hibernate allows you to update transient data from outside the current flow as part of your CRUD operations. In this video; Tony Lowe demonstrates how to load and update transient data in your current session by building an object; tying it to a database ID; and matching it to a story before updating and changing its title.
-
Batch Processing
Java Hibernate has the ability to do detailed operations such as batch processing. In this video; Tony Lowe uses the executeUpdate command as part of a query to do batch and bulk updates.
-
Bootstrapping Hibernate – Command Line
Java Hibernate; directly configured and loaded from your basic solution; will run from a command line or Desktop app. In this video; Tony Lowe demonstrates how to set up your JAR files; configure a SessionFactory connection to your database; and use a ConfigHelper class to load Hibernate into a command-line application.
-
Commenting SQL
Java Hibernate allows commenting in SQL; so you can discover the intent of the developers; search through logs quickly; and add additional metadata information. In this video; Tony Lowe demonstrates how to enable SQL commenting in Hibernate.
-
Create an Index in Hibernate
When creating your database tables; Java Hibernate allows you to create indexes that improve the speed of data retrieval and play an important role in optimizing database performance. In this video; Tony Lowe demonstrates how to create a database index in Hibernate using the @Index annotation; as well as through XML mapping.
-
Custom SQL in Annotations
In Java Hibernate; you can customize a range of statements. In this video; Tony Lowe demonstrates how to provide your own SQL for the insert; update; and delete options; instead of using the ones provided in the mappings.
-
Custom SQL in XML Mappings
In Java Hibernate; you can customize basic statements providing additional XML annotations. In this video; Tony Lowe demonstrates how to provide additional XML annotations that replace the insert; update; and delete options given by Hibernate.
-
Detailed Property Mapping with Annotations
Java Hibernate annotations are embedded directly in your Java classes; providing a powerful and flexible way of declaring property mappings and controlling database columns in Hibernate. In this video; Tony Lowe demonstrates how you can extend basic property mappings declared using the @Basic annotation; and how to declare column attributes using the @Column annotation.
-
Embedded Objects with @EmbedDED or <component>
Java Hibernate allows you to declare an embedded object and override it's column mapping using either annotations or XML. In this video; Tony Lowe demonstrates how to make an object embeddable at the class level with the @Embeddable annotation; as well as through the component tag in XML.
-
Filtering Data Results
In Java Hibernate; you can filter data in your database and only display the data that you want users to see. In this video; Tony Lowe uses the @Filter annotation to apply a filter to an entire class.
-
Hibernate and Logging
Java Hibernate provides many levels of logging; whether simply to debug or for a deeper functional need. In this video; Tony Lowe uses the log4j framework to configure the logging of information.
-
Hibernate Architecture
You can configure Java Hibernate to suit the specific needs of your application. In this video; Tony Lowe demonstrates various ways you can configure the Hibernate architecture to affect how it interacts with your application and the database; as well as mapping and querying options.
-
Identity Generation in Annotations
You can use Jave Hibernate Annotations to manage the process of assigning IDs to rows in databases. In this video; Tony Lowe demonstrates what is involved in assigning generic and custom row IDs; and shows examples of situations where it might be necessary to use a randomized model for unique row IDs.
-
Identity Generation in XML
In Java Hibernate; every class must have an id; and that id is normally a primary key that must be unique. In this video; Tony Lowe demonstrates how to generate ids that are unique using XML mappings.
-
Identity Management within XML
Java Hibernate requires every class to have a unique ID for XML identity mapping. In this video; Tony Lowe demonstrates how to manage XML identity mapping using a basic ID; a composite ID; or a foreign key ID.
-
Improving General Performance
In Java Hibernate; performance issue can be caused by a lack of understanding of how a solution is realized by the program. In this video; Tony Lowe demonstrates how to improve Hibernate's general performance by tweaking a range of options.
-
Improving Query Performance
In Java Hibernate; you can improve the Query performance in a number of different ways. In this video; Tony Lowe demonstrates how to optimize individual queries in Hibernate; as well as manage database performance to improve how queries are returned.
-
Inheritance – JOINED
In Java Hibernate; inheritance is used to create a superclass from the common features among classes. You can use the JOINED strategy to have a single table represent each class in the hierarchy. In this video; Tony Lowe demonstrates how the JOINED strategy is mapped by Hibernate between Java classes and the database.
-
Inheritance – Single Table
In Java Hibernate; you can use the Single Table strategy to map all classes in the hierarchy to a single table in the database. In this video; Tony Lowe demonstrates how the Single Table strategy is mapped by Hibernate between Java classes and Hibernate; and uses an abstract base to provide an overview.
-
Inheritance – TABLE_PER_CLASS
In Java Hibernate; you can map inheritance into the database by making use of the TABLE-PER-CLASS inheritance strategy. In this video; Tony Lowe demonstrates how to use this strategy to represent each concrete subclass as its own table in order to use Hibernate to map inheritance back into Java when there is little in common across the classes.
-
Debugging in Hibernate
In Java Hibernate; you can debug errors in a number of different ways. In this video; Tony Lowe demonstrates how to improve your mapping; pay attention to your fields; and understand your resources in order to successfully debug your error messages.
-
Defining Custom Types
In Java Hibernate; you can extend existing Java types with your own types to provide an even deeper mapping option. In this video; Tony Lowe uses the plusFour option to extend the zip code data type and creates a class for that zip type.
-
Defining with @Entity
In Java Hibernate; there are extensions to allow you to further refine the mapping of an entity. In this video; Tony Lowe demonstrates how to customize the basic mapping provided by JPA.
-
Detailed Property Mapping in XML
Java Hibernate allows you to specify detailed property mappings inside your XML that enables precise control over how data is represented; while aligning Java classes and database tables to each other. In this video; Tony Lowe demonstrates how to control the mapping between a data model and the database using the features of property and column elements in XML.
-
Interceptors for Hibernate Actions
Java Hibernate allows you to use the Interceptor API to access key events in the persistence life cycle. In this video; Tony Lowe demonstrates the multiple monitoring; maintenance; and management functions of interceptors; uses a listener class to plug an interceptor into his Hibernate configuration file; and demonstrates its create; read; update; and delete (CRUD) capabilities.
-
Interesting Queries in Criteria
Java Hibernate's Criteria query API offers capabilities for detailed data searches and complex queries across multiple tables. In this video; Tony Lowe demonstrates how to use conditional logic in conjunction with Restrictions; Projections; and various parameters to scale up Criteria objects to conduct complex searches on the Story class.
-
Interesting Queries in HQL
In Java Hibernate; Hibernate Query Language (HQL) offers capabilities allowing for detailed data searches and complex queries across multiple tables. In this video; Tony Lowe demonstrates how HQL handles queries and searches across and within multiple classes; joins; and multiple selects.
-
Lazy Loading
Java Hibernate allows you to define a fetching strategy that helps manage and retrieve data from related objects using lazy or eager loading in annotations or through XML mapping. In this video; Tony Lowe demonstrates the differences between lazy and eager loading in a one-to-many relationship using annotations and XML; as well as the use of the @FetchProfile annotation.
-
Managing Sessions and Transactions
Controlling your work in Java Hibernate is important as database operations must be bound by transactions. In this video; Tony Lowe demonstrates how to correctly manage sessions and transactions in Hibernate; and points out potential mistakes to avoid.
-
Multiple Mappings of Tables
Java Hibernate allows you to do multiple mappings of a table. In this video; Tony Lowe uses the StoryBrief object to do a second mapping of the Story object of a table.
-
Named Queries
Java Hibernate allows you to manage query strings in JDBC via annotation and XML mapping. In this video; Tony Lowe demonstrates how you can use named queries to separate your java code from your database by externalizing the query as annotation or an external XML file.
-
Projections and Aggregation
You can use projections and aggregations in Java Hibernate to categorize and limit data being returned by a query to a database. In this video; Tony Lowe demonstrates how you can use criteria objects to provide services to add projects which modify or limit the data being returned.
-
Query by Example
In Java Hibernate; Criteria objects allow you to perform quick and easy searches by implementing a Query by Example strategy whereby a data sample is provided and results returned based upon the sample. In this video; Tony Lowe uses Example.create to create a query criterion; before demonstrating how to return unique results and specify filtering criteria in Hibernate.
-
Read Only Objects
In Java Hibernate; the immutability feature allows you to make sure certain items in your database cannot be modified from the application. In this video; Tony Lowe demonstrates how to use immutability to make objects in your database read only by using Hibernate mapping options.
-
Running Hibernate Under JPA
JPA is a Java standard which offers a point of replacement for your ORM framework as an alternative to Java Hibernate. In this video; Tony Lowe demonstrates the necessary steps you need to take when loading an application using the JPA approach.
-
Sub-Queries in Criteria
Java Hibernate allows you to construct Criteria queries and use them as inputs to other queries. In this video; Tony Lowe demonstrates how Criteria queries are customized queries used to query classes using a subquery or DetachedCriteria; and shows you how to add Restrictions and Projections to refine your search along with a ResultTransformer to refine your results.
-
Unique Item Query
In Java Hibernate; your database can contain one unique result. In this video; Tony Lowe uses the uniqueResult method to ensure that your database outputs only a single required result.
-
Using <manytomany>
In Java Hibernate; there are many options for mapping data to tables and classes when working with XML mappings. In this video; Tony Lowe demonstrates how to use the manytomany option to create link tables virtually; so you don’t have to represent extra classes for data.
-
Using @JoinTable
When working with Java Hibernate you can create table relationships without having to create an actual extra third-party class. In this video; Tony Lowe demonstrates how to create many-to-many relationships using the @JoinTable annotation.
-
Using @Sort for Java Based Sorting
When using Java Hibernate you can use the @Sort Java clause to arrange database search results. In this video; Tony Lowe demonstrates the java based options that are available for easily sorting data returned from the database.
-
Advanced Querying in Java Hibernate
The Hibernate Query Language enables advanced querying of Hibernate data objects, including detailed searches across multiple tables, classes, joins, and selects. In this course, you'll explore advanced HQL querying, manipulation of SQL databases and data structures, and debugging and improving performance in Java Hibernate.
- start the course
- apply aggregations and projections to a query within a database in Java Hibernate
- externalize HML by using annotations or an external XML file in Java Hibernate
- use advanced querying in Hibernate and databases
- perform Hibernate Query Language (HQL) queries and searches across multiple classes, joins, and multiple selects
- use Hibernate Criteria queries as inputs to other queries, in order to construct DetachedCriteria using Restrictions and Projections
- use Hibernate's Criteria query API and conditional logic to conduct detailed data searches and queries across multiple tables
- call a Hibernate stored procedure by creating a NamedQuery and using IN and OUT parameters
- use a basic, composite, or foreign key ID to manage XML identity mapping in Java Hibernate
- enable SQL commenting in Java Hibernate for table creation and search queries
- use Java-based methods to arrange search results from a database using Hibernate
- create a many-to-many relationship using @JoinTable annotation in Java Hibernate
- set up a many-to-many relationship in Hibernate
- set up the @Transient annotation within Java Hibernate
- debug exception messages within Java Hibernate
- improve the overall performance of Java Hibernate
- improve the Query performance within Java Hibernate
- use the immutability feature of Java Hibernate to make objects in your database read-only
-
Getting Started with Java Hibernate
Java Hibernate allows you to create, save, and update data objects in a supported database. You can update or read back these objects into a Java program. In this course, you'll learn about the basics of reading and writing objects to your RDBMS. You will also explore transactions and batches, caching, and basic data mapping.
- start the course
- set up JAR files, configure a SessionFactory connection to a database, and use a ConfigHelper class to load Hibernate into a command-line application
- configure Java Hibernate to work with applications
- create, save, and update Java Hibernate data objects using the Save, Persist, and saveOrUpdate options
- process and update transient data from outside the current flow of Hibernate CRUD operations
- use the update and merge methods in Java Hibernate
- delete different types of data in Java Hibernate
- load data using Java Hibernate
- use the Interceptor API in Java Hibernate to access, monitor, maintain, and manage key events in the persistence life cycle
- load an application using the JPA approach instead of Java Hibernate
- manage sessions and transactions in Java Hibernate
- use the executeUpdate command as part of a query to do batch and bulk updates
- use the log4j framework to configure the logging of information
- use second level caching in Java Hibernate
- use the unique item query in Java Hibernate
- define custom types in Java Hibernate
- filter data in Java Hibernate
- allow Java Hibernate to create a table structure
- implement multiple mappings of tables in Java Hibernate
- implement a basic mapping using annotations in Java Hibernate
- create XML mapping between a class and a table in Java Hibernate
- expand an object model in Java Hibernate
- use XML mapping options to allow the framework to automatically maintain the relationship between Java classes and database tables in Hibernate
-
Customized Mapping and Basic Querying in Java Hibernate
Java Hibernate enables you to map Java objects to database tables using annotations or XML files. In this course, you'll learn about identity generation, annotations, and how to customize mappings. You'll also learn basic querying using HQL – a SQL-like query language designed for Hibernate.
- start the course
- apply the JOINED strategy when mapping Java classes to the database using Hibernate
- configure Java Hibernate to work with your applications
- apply the Single Table strategy as a solution for mapping into a database in Java Hibernate
- use Annotations to assign IDs to rows in Java Hibernate
- use Identity Generation in XML using Java Hibernate
- use custom SQL in annotations in Java Hibernate
- create a database index in Java Hibernate
- define property mapping using annotations in Java Hibernate
- configure a fetching strategy by defining lazy and eager loading using either annotations or XML mapping in Java Hibernation
- refine basic mapping in JPA and Java Hibernate
- use advanced ID options in Java Hibernate
- use @Table and @SecondaryTable in Java Hibernate
- use class tag options in Java Hibernate
- use advanced XML table mapping in Java Hibernate
- use custom SQL in XML mappings in Java Hibernate
- perform detailed property mapping in Java Hibernate by specifying controls in the property and column tags within XML
- embed objects in Java Hibernate with the @Embeddable annotation or through XML with the component tag
- perform basic querying using HQL in Java Hibernate
- perform basic querying with simple Java method calls using the Criteria API in Hibernate
- order and paginate result data using advanced query management options in HQL and Criteria objects within Java Hibernate
- structure a database query using a Query by Example strategy in a Criteria object within Hibernate