Home » Tag Archives: hibernate

Tag Archives: hibernate

JAX-WS Hibernate Example

In this example, we feature a comprehensive article on JAX-WS Hibernate. We will demonstrate how to create a SOAP-based web service that uses Hibernate to read data from a database. 1. Introduction Java API for XML Web Services (JAX-WS) is a technology for developing SOAP-based web services and clients. The API includes annotations for defining web service endpoints, service implementation beans, ...

Read More »

Spring Boot with Hibernate Example

Welcome readers, in this tutorial, we will integrate Hibernate with a Spring Boot application. 1. Introduction Spring Boot is a module that provides rapid application development feature to the spring framework including auto-configuration, standalone-code, and production-ready code It creates applications that are packaged as jar and are directly started using embedded servlet container (such as Tomcat, Jetty or Undertow). Thus, ...

Read More »

Spring vs Hibernate Example

1. Introduction In this post, we feature a comprehensive Example on Spring vs Hibernate. This is an in-depth article related to differences between the Spring application framework and Hibernate framework. Spring Framework helps in creating stand-alone and production-ready applications. Spring Framework features are Spring MVC, JPA, Spring Boot, Micro Containers and Messaging. In this article, we look at Spring Boot ...

Read More »

Hibernate doReturningWork() method Example

In this tutorial, we will learn Hibernate 4 Returning Work interface and Session.doReturningWork() method for Jdbc. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects to the relational database tables and vice versa. ...

Read More »

Hibernate doWork() method Example

In this tutorial, we will learn Hibernate 4 Work interface and Session.doWork() method for Jdbc. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects to the relational database tables and vice versa. It ...

Read More »

Hibernate CascadeType.PERSIST Example

Greeting readers, in this tutorial, we will create two entity classes related to each other and we will perform the cascading operations between them. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects ...

Read More »

Hibernate CascadeType.REMOVE Example

Greeting readers, in this tutorial, we will create two entity classes related to each other and will perform the cascading operations between them. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for mapping application domain objects to ...

Read More »

Hibernate Optimistic Locking Example

In hibernate, Locking represents a mechanism to safeguard the records that can be simultaneously accessed to avoid the concurrency errors (i.e. when multiple users simultaneously update the records resulting in inconsistencies). Hibernate has two types of locking mechanisms i.e. Optimistic locking Pessimistic locking In this tutorial, we will explore the optimistic locking mechanism in the hibernate framework. 1. Introduction Object-Relational ...

Read More »

Hibernate Calling Stored Procedure Example

Stored Procedures are a set of compiled SQL statements residing in the database. In hibernate; there are three different approaches to call a stored procedure i.e. Query interface – createSQLQuery(. . . .); StoredProcedureQuery interface – createStoredProcedureQuery(. . . .); @NamedNativeQuery annotation In this tutorial, we will explore how to create a simple stored procedure in the MySQL database and ...

Read More »

Hibernate DateTime Mapping Example

In hibernate; @Temporal annotation is used to store java.sql.Time, java.sql.Date or java.sql.Timestamp in the database. In this tutorial, we will explore how to work with Timestamp using the xml and annotation configurations in the Hibernate framework. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a ...

Read More »