• Java
    • JAXB Tutorial
      • What is JAXB
      • JAXB Marshalling Example
      • JAXB UnMarshalling Example
  • Spring Tutorial
    • Spring Core Tutorial
    • Spring MVC Tutorial
      • Quick Start
        • Flow Diagram
        • Hello World Example
        • Form Handling Example
      • Handler Mapping
        • BeanNameUrlHandlerMapping
        • ControllerClassNameHandlerMapping
        • SimpleUrlHandlerMapping
      • Validation & Exception Handling
        • Validation+Annotations
        • Validation+ResourceBundle
        • @ExceptionHandler
        • @ControllerAdvice
        • Custom Exception Handling
      • Form Tag Library
        • Textbox Example
        • TextArea Example
        • Password Example
        • Dropdown Box Example
        • Checkboxes Example
        • Radiobuttons Example
        • HiddenValue Example
      • Misc
        • Change Config file name
    • Spring Boot Tutorial
  • Hibernate Tutorial
  • REST Tutorial
    • JAX-RS REST @PathParam Example
    • JAX-RS REST @QueryParam Example
    • JAX-RS REST @DefaultValue Example
    • JAX-RS REST @Context Example
    • JAX-RS REST @MatrixParam Example
    • JAX-RS REST @FormParam Example
    • JAX-RS REST @Produces Example
    • JAX-RS REST @Consumes Example
    • JAX-RS REST @Produces both XML and JSON Example
    • JAX-RS REST @Consumes both XML and JSON Example
  • Miscellaneous
    • JSON Parser
      • Read a JSON file
      • Write JSON object to File
      • Read / Write JSON using GSON
      • Java Object to JSON using JAXB
    • CSV Parser
      • Read / Write CSV file
      • Read/Parse/Write CSV File – OpenCSV
      • Export data into a CSV File
      • CsvToBean and BeanToCsv – OpenCSV

JavaInterviewPoint

Java Development Tutorials

Hibernate CRUD Example in Eclipse (XML Mapping) with Maven + Oracle

May 30, 2017 by javainterviewpoint Leave a Comment

Hibernate CRUD operation Example

In this Hibernate CRUD Example, we will learn how to use Hibernate to perform CRUD operations using XML Mapping. We will be using Oracle database and build an Employee Management System which has the capabilities of Creating a new employee, Getting all the employees, Update the existing employee, Delete an employee. … [Read more...]

Difference between session.get() and session.load() in Hibernate

May 2, 2017 by javainterviewpoint 1 Comment

Difference between session get and session load in Hibernate

What is the Difference between session.get() and session.load() in Hibernate ? This is one of the most asked interview question in Hibernate. Both the get() and load() methods are defined in the Session interface and used to retrieve the information of a specific record. In this article, we will see what is the difference between then and when to use which method. … [Read more...]

Hibernate Component Mapping using XML

April 11, 2017 by javainterviewpoint Leave a Comment

Hibernate Component Mapping using XML

Previously we have learned about Component Mapping in Hibernate using Annotations. In this example, we will learn about Hibernate Component Mapping using XML. In our example, we have two classes Employee and EmployeeAddress. The Employee can have an Address but Address cannot exist separately without Employee. Since the Employee and Address entities are strongly related, it is … [Read more...]

Component Mapping in Hibernate Using Annotations | @Embeddable & @Embedded

April 4, 2017 by javainterviewpoint Leave a Comment

Component Mapping

In this example, we will learn about Component Mapping in Hibernate Using Annotations. Component Mapping represents the has-a relationship, the composition is stronger association where the contained object has no existence of its own. For example, Employee has an Address, an address cannot exist separately without Employee. Since the Employee and Address entities are strongly … [Read more...]

Hibernate Embeddable Composite Primary Key | @Embeddable, @EmbeddedId

March 28, 2017 by javainterviewpoint 1 Comment

Hibernate Embeddable Composite Primary Key

In our previous example, we have seen how to create a Composite key in Hibernate using <composite-id> tag and Annotations. In this Embeddable Composite Primary Key example, we will be declaring the IDs (Primary Key fields) as a separate class annotated with @Embeddable annotation. An Employee is identified by its EmployeeId, which is defined by empId and department. Let's … [Read more...]

Hibernate Composite Primary Key Tutorial – Using composite-id tag & Annotations

March 6, 2017 by javainterviewpoint Leave a Comment

Hibernate Composite Primary Key Tutorial 1

If a database table has more than one column as the primary key then we call it as composite primary key. In this Hibernate Composite Primary Key tutorial, we will learn how to define Composite Primary Key using <composite-id> tag and Annotations. … [Read more...]

Hibernate Inheritance – Table Per Concrete Class Hierarchy Example(XML Mapping & Annotation)

February 16, 2017 by javainterviewpoint Leave a Comment

Table Per Concrete class Hierarchy

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 … [Read more...]

Hibernate Inheritance – Table Per Subclass Hierarchy (XML Mapping & Annotation)

January 30, 2017 by javainterviewpoint Leave a Comment

Table Per Subclass Hierarchy

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. … [Read more...]

Hibernate Inheritance – Table Per Class Hierarchy (XML Mapping & Annotation)

January 13, 2017 by javainterviewpoint Leave a Comment

Table Per Class Hierarchy

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 … [Read more...]

Hibernate Many To Many Mapping Example – Annotation

January 1, 2017 by javainterviewpoint Leave a Comment

Hibernate Many-To-Many Mapping Example

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 Example Using Annotation

December 27, 2016 by javainterviewpoint Leave a Comment

Hibernate One-To-Many Mapping 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...]

Hibernate One To One Bidirectional Mapping Example – Foreign Key(Annotation)

December 16, 2016 by javainterviewpoint Leave a Comment

Hibernate One-to-One Bidirectional Mapping

In this article, we will learn how to achieve Hibernate One To One Bidirectional Mapping using the JPA Annotations with Foreign Key, in the previous One To One Bidirectional Mapping Example we used only the Primary Key. This Annotation approach is just an alternative to the XML mapping which we used in our earlier article Hibernate One To One Mapping XML Example with Foreign … [Read more...]

  • 1
  • 2
  • Next Page »

Java Basics

  • JVM Architecture
  • Object in Java
  • Class in Java
  • How to Set Classpath for Java in Windows
  • Components of JDK
  • Decompiling a class file
  • Use of Class.forName in java
  • Use Class.forName in SQL JDBC

Oops Concepts

  • Inheritance in Java
  • Types of Inheritance in Java
  • Single Inheritance in Java
  • Multiple Inheritance in Java
  • Multilevel Inheritance in Java
  • Hierarchical Inheritance in Java
  • Hybrid Inheritance in Java
  • Polymorphism in Java – Method Overloading and Overriding
  • Types of Polymorphism in java
  • Method Overriding in Java
  • Can we Overload static methods in Java
  • Can we Override static methods in Java
  • Java Constructor Overloading
  • Java Method Overloading Example
  • Encapsulation in Java with Example
  • Constructor in Java
  • Constructor in an Interface?
  • Parameterized Constructor in Java
  • Constructor Chaining with example
  • What is the use of a Private Constructors in Java
  • Interface in Java
  • What is Marker Interface
  • Abstract Class in Java

Java Keywords

  • Java this keyword
  • Java super keyword
  • Final Keyword in Java
  • static Keyword in Java
  • Static Import
  • Transient Keyword

Miscellaneous

  • newInstance() method
  • How does Hashmap works internally in Java
  • Java Ternary operator
  • How System.out.println() really work?
  • Autoboxing and Unboxing Examples
  • Serialization and Deserialization in Java with Example
  • Generate SerialVersionUID in Java
  • How to make a class Immutable in Java
  • Differences betwen HashMap and Hashtable
  • Difference between Enumeration and Iterator ?
  • Difference between fail-fast and fail-safe Iterator
  • Difference Between Interface and Abstract Class in Java
  • Difference between equals() and ==
  • Sort Objects in a ArrayList using Java Comparable Interface
  • Sort Objects in a ArrayList using Java Comparator

Follow

  • Coding Utils

Useful Links

  • Spring 4.1.x Documentation
  • Spring 3.2.x Documentation
  • Spring 2.5.x Documentation
  • Java 6 API
  • Java 7 API
  • Java 8 API
  • Java EE 5 Tutorial
  • Java EE 6 Tutorial
  • Java EE 7 Tutorial
  • Maven Repository
  • Hibernate ORM

About JavaInterviewPoint

javainterviewpoint.com is a tech blog dedicated to all Java/J2EE developers and Web Developers. We publish useful tutorials on Java, J2EE and all latest frameworks.

All examples and tutorials posted here are very well tested in our development environment.

Connect with us on Facebook | Privacy Policy | Sitemap

Copyright ©2023 · Java Interview Point - All Rights Are Reserved ·