beautypg.com

HP Integrity NonStop H-Series User Manual

Page 344

background image

Figure 17-13 New XML File: Create XML Dialog Box

4.

Select Create XML from an XML template and click Finish.

The

Employee.hbm.xml

file is created in the

EmployeeInfo/src

directory.

NOTE:

By default, XML files open in the XML Editor. The XML Editor has two views:

Design and Source view. Select the Source view.

5.

Modify the

Employee.hbm.xml

file by adding a Hibernate mapping for the

Employee.java

class.

After modification, the

Employee.hbm.xml

file appears as follows:


"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
package="com.hp.domain">



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

not-null="true"
length="15"
column="lname"/>

344

Getting Started with Hibernate

This manual is related to the following products: