Table per Class Hierarchy strategy will be having a single table for both the Parent class and the Sub class separated by a discriminator column. In Table per Subclass Hierarchy, subclass table will be mapped to the Parent class table by primary key and foreign key relationship. In Table Per Concrete Class Hierarchy also individual table will be created for each class. The disadvantage of this approach is that all the columns of the Primary class table will be again replicated in the Subclass table.
Spring Security Annotation Configuration Example – HelloWorld
Previously we have seen how to implement Spring Security in a Hello World program using XML configuration. In this Spring Security Annotation Configuration Example, we will be using the same example but instead of XML configuration, we will be configuring it through annotation.
Hibernate Inheritance – Table Per Subclass Hierarchy (XML Mapping & Annotation)
In the previous example we have seen Table per Class Hierarchy strategy, there we will be having a single table for both the Parent class and the Sub class separated by a discriminator column. In this Table per Subclass Hierarchy Example, subclass table will be mapped to the Parent class table by primary key and foreign key relationship.
How to Write Excel File in Java using POI
In the previous article, we have learned how to read an Excel file using POI in this article we will learn how to Write Excel File in Java using POI API. [Read more…]
AngularJS Spring MVC CRUD Example using $http service
In this post, we will learn how to integrate AngularJS with Spring MVC and perform CRUD operation using $http service. We will be building a REST Web service using Spring MVC Controller (@RESTController) and AngularJS will act as the front-end, through $http service we will perform Create, Read, Update, Delete operations.
Hibernate Inheritance – Table Per Class Hierarchy (XML Mapping & Annotation)
Java being an Object Oriented Language, it supports one of the most powerful concept “Inheritance“. Object Oriented Systems generally supports both IS-A and HAS-A relationships, whereas Relational Model supports only HAS-A relationship. Hibernate can help you map such kind of entities into the Relational table based on the strategy selected.
Types of Inheritance in Hibernate
Hibernate offers 3 different approaches for mapping this kind of hierarchical classes.
- Table per Class hierarchy
- Table per Sub-Class hierarchy
- Table per Concrete Class hierarchy
How to Read Excel File in Java using POI
In this tutorial, we will learn to how to read excel file in Java using Apache POI. POI stands for Poor Obfuscation Implementation, is a powerful Java library which works with different Microsoft Office formats such as Excel, Word etc. Let’s dig into the code now. [Read more…]
Hibernate Many-To-Many Mapping Example – Annotation
In this Hibernate Many-To-Many Mapping Example, we will learn how Hibernate Many-To-Many relationship works(Using Annotation). Let’s take the Example of Employee and Department, one Employee can be part of many Departments and similarly one Department can have many Employees. Let’s dig into the code.
[Read more…]
Hibernate One-To-Many Mapping Annotation Example
Previously we have learned about Hibernate One-To-One Mapping Using annotation. In this Hibernate One-To-Many mapping Example, we will learn about One-To-Many mapping between Java objects and database tables using Hibernate framework (Annotation Mapping). [Read more…]
AngularJS Spring MVC integration
In this tutorial, we will learn how to integrate AngularJS with Spring MVC application. We will be building a REST Web service using Spring MVC Controller (@RESTController), here AngularJS will request the data through the HTTP protocol and the RESTFul Web Service will return the JSON format response. Let’s now dig into the code. [Read more…]
- 1
- 2
- 3
- …
- 43
- Next Page»