HP Integrity NonStop J-Series User Manual

Page 211

Advertising
background image

Figure 63 New XML File: Create XML Dialog Box

4.

Select the Create XML 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"

Overview of EmpIoyeeInfo

211

Advertising
This manual is related to the following products: