HP Integrity NonStop J-Series User Manual

Page 136

Advertising
background image

Figure 45 New XML File: Create XML Dialog Box

4.

Select the Create XML file from an XML template and click Finish.

The Employee.hbm.xml file is created in the EmployeeInfo/src directory.

5.

Modify the Employee.hbm.xml file by adding a Hibernate mapping for the Employee.java
class.

The Employee.hbm.xml file now appears as:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping
package="com.hp.domain">

<class name="Employee" table="Emp" >

<id name="id">
<generator class="increment"/>
</id>

<property name="fname"
not-null="true"
length="15"
column="fname"/>

<property name="lname"
not-null="true"

136

Hibernate Framework

Advertising
This manual is related to the following products: