Tag Archives: Hibernate

Simple CRUD with JSF and Hibernate


via Simple CRUD with JSF and Hibernate | Geek On Java – Hub for Java and Android.

This example shows how to develop a simple CRUD (Create Read Update Delete) by using JSF2, Hibernate and MySQL.
This application lets you manage customer database such as add new customer and update/delete customer info.

Hibernate Criteria Example


via Hibernate Criteria Example | Examples Java Code Geeks.

Hibernate Criteria is a very good interface offered by Hibernate that helps you write queries with comples search criteteria an keep your code readable and elegant.

So these are the tools we are going to use on a Windows 7 platform:

  • JDK 1.7
  • Maven 3.0.5
  • Hibernate 3.6.3.Final
  • MySQL JDBC driver 5.1.9
  • Eclipse 4.2 Juno

The basis of this tutorials is going to be this Eclipse project: Hibernate1to1XMLExample,zip. And it’s based in Hibernate One-to-One Relationship Example (XML Mapping and Annotation). All the code snippets displayed here reffer to App.java file of the aforementioned project. It’s also a good idea to take a look at Hibernate Query Language Example.

Hibernate Logging Configuration – SLF4J + Log4j and Logback


via Hibernate Logging Configuration – SLF4J + Log4j and Logback | Examples Java Code Geeks.

In this example we are going to see how to configure Logging in Hibernate.SLF4J (Simple Logging Facade for Java) is a very nice logging framwork that Hibernate uses, in order to output your logs using your favorite logging tool ( log4j, JCL, JDK logging, logback) to your preferd location. We are going to use SLF4J along with log4j and Logback.

So these are the tools we are going to use on a Windows 7 platform:

  • JDK 1.7
  • Maven 3.0.5
  • Hibernate 4.2.3.Final
  • MySQL JDBC driver 5.1.9
  • Eclipse 4.3 Kepler

The basis of this tutorials is going to be this Eclipse project: HibernateMySQLExample.zip

How to generate different sql scripts through pom.xml


In this post, we will see how to generate different sql scripts using our pom.xml from maven project with a little help from hibernate.

https://howaboutcoding.wordpress.com/2015/08/31/generate-sql-scripts/

Java – Spring MVC using Hibernate (Annotation)


Here is an example of Spring MVC using Hibernate to perform CRUD operations. Tools: IntelliJ 14 IDE Java SDK 7 Maven 3 Hibernate 4 Spring Framework 4 Tomcat 7 MySQL 5 Project Structure Table data To start, we’ll create a database and table in MySQL. To keep things simple, we only create one table. Maven dependencies Next we […]

https://st11223.wordpress.com/2015/08/13/java-spring-mvc-using-hibernate-annotation/

Hibernate One-to-Many Relationship Example (XML Mapping and Annotation)


via Hibernate One-to-Many Relationship Example (XML Mapping and Annotation) | Examples Java Code Geeks.

In this example we are going to see how to map classes to databases tables which have one-to-many relationships. We are going to see the mapping both with XML Mapping and with Annotations.

So these are the tools we are going to use on a Windows 7 platform:

  • JDK 1.7
  • Maven 3.0.5
  • Hibernate 3.6.3.Final
  • MySQL JDBC driver 5.1.9
  • Eclipse 4.2 Juno

Hibernate Cascade example


via Hibernate Cascade example | Examples Java Code Geeks.

In this tutorial we are going to see the use of  the cascade feature of relational databases and how it is applied in Hibernate. This tutorial is based on the previous Hibernate One-to-Many Relationship Example (XML Mapping and Annotation). You can download the Eclipse project from there.

So these are the tools we are going to use on a Windows 7 platform:

  • JDK 1.7
  • Maven 3.0.5
  • Hibernate 3.6.3.Final
  • MySQL JDBC driver 5.1.9
  • Eclipse 4.2 Juno