
Chapter 9 Generating Persistent Objects for Java and JSF Pages
Defining generation options
There are two types of generation options:
- Environment variables - to allow your Eclipse or Ant build script to find the Hibernate library Jar files
- Generation options
To define environment variables:
- Select Tools→General Options
- Select the Variables node.
- Add a variable HIBERNATE_HOME and, in the value field, enter the Hibernate home directory path. For example, D:\Hibernate-3.0.
To define generation options:
- Select Language→Generate Java Code.
- Specify the root directory where you want to generate the code.
- Click the Options tab.
- [optional] To use DAO, set the Generate DAO sources option to true.
- [optional] To use Eclipse to compile and test the Java classes, set the Generate Eclipse project artifacts option to true.
- [optional] To use unit test classes to test the Hibernate persistent objects, set the Generate unit test sources option to true.
- Click on OK to generate code immediately or Apply and then Cancel to save your changes for later.
Copyright (C) 2007. Sybase Inc. All rights reserved.
|
|