Chapter 4 Generating Hibernate Persistent Objects and JSF Pages


Creating a model

To support Hibernate, you need to create an Object-Oriented Model (OOM) Class Diagram for Java or Java 5.0. Java is used for JDK 1.4 and Java 5.0 for JDK 5.0. If you choose Java 5.0, the generated Java code will use generics for collections.

There is a model check that ensures that persistent objects for Hibernate are defined under packages.

Steps To add a package:

  1. Open the Class Diagram of the model.
  2. Right-click on the background of the diagram.
  3. Select Add Package Hierarchy.
  4. Enter a fully qualified package name. For example, com.sybase.Orders.

If the package hierarchy contains many packages, you could define only a low level package in the model, and define a package prefix on the Hibernate Default Options tab in the model property sheet.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.