RSS

Archivo de la categoría: Hibernate

Creating java domain objects from a database with an Ant task and Hibernate tools


This is the third way we mentioned in this parent post of creating java domain objects, or data access objects, mapping files.
We need to create an Ant task within our build.xml file in order to generate our domain objects, daos or xml mapping files.
Once this is done, we have to execute ant hbm (our task name) and our files will be generated. Notice that you need to include a reference to every library we are going to use (hibernate-tools, freemarker, log libraries, …).
Read the rest of this entry »

 
2 comentarios

Publicado por en 8 mayo, 2011 en Hibernate

 

Etiquetas: , , ,

Creating Java domain objects with the Maven Hibernate plugin and Hibernate tools.


Visit my new website http://java4developers.com

This is the second way we mentioned in this parent post of creating java domain objects, or data access objects, mapping files. The Hibernate 3 Maven plugin webpage show us which goals are available for this plugin. In this post we are going to use the following four ones:

  • hibernate3:hbm2cfgxml: Generates hibernate.cfg.xml.
  • hibernate3:hbm2hbmxml: Generates a set of hbm.xml files.
  • hibernate3:hbm2java: Generates Java domain objects.
  • hibernate3:hbm2dao: Generates data access objects.

Read the rest of this entry »

 
5 comentarios

Publicado por en 8 mayo, 2011 en Hibernate

 

Etiquetas: , , , ,

Using Hibernate tools through Maven and Ant


Hibernate Tools is a toolset for Hibernate3 implemented as an integrated suite of Eclipse plugins, together with a unified Ant task for integration into the build cycle. Hibernate Tools is a core component of JBoss Tools and hence also part of JBoss Developer Studio.

The previous paragraph is the definition of Hibernate tools that you can find in the Hibernate official webpage. This post is going to show you how to generate your domain Java classes from the database schema using 3 different perspectives:

Read the rest of this entry »

 
9 comentarios

Publicado por en 7 mayo, 2011 en Hibernate

 

Etiquetas: , , , , , ,

Hibernate basic example with Apache Derby and Maven


We’re going to make a really easy test with Hibernate in our laptop. First, we’re going to configure an Apache Derby database. We are using Spring STS as our prefered IDE. Besides we will add Maven for our project’s dependencies .Configuring Hibernate in STS with Maven is an easy task. You only need to add your needings dependencies to our pom.xml file and start to coding.

Read the rest of this entry »

 
10 comentarios

Publicado por en 17 abril, 2011 en Hibernate

 

Etiquetas: , , , ,

Hibernate con Derby en Mac OSX / Linux


Vamos a hacer una prueba muy sencilla para trabajar con Hibernate en nuestro equipo. Para ello vamos a configurar una base de datos Apache Derby. Trabajaremos con el IDE de Spring de STS, además añadiremos Maven para la gestión de dependencias de nuestro proyecto.Configurar Hibernate en STS con Maven es sencillo. Lo único que hay que hacer es añadir las dependencias de Hibernate a nuestro pom.xml y empezar a programar.

Read the rest of this entry »

 
Deja un comentario

Publicado por en 16 abril, 2011 en Hibernate

 

Etiquetas: , , , ,

 
Seguir

Recibe cada nueva publicación en tu buzón de correo electrónico.

Únete a otros 69 seguidores

%d personas les gusta esto: