|
DB Visual ARCHITECT 4.0 Programmer's Guide for Java
The software and documentation are furnished under the DB Visual ARCHITECT license agreement and may be used only in accordance with the terms of the agreement.
Copyright Information
Copyright © 1999-2007 by Visual Paradigm. All rights reserved.
The material made available by Visual Paradigm in this document is protected under the laws and various international laws and treaties. No portion of this document or the material contained on it may be reproduced in any form or by any means without prior written permission from Visual Paradigm.
Every effort has been made to ensure the accuracy of this document. However, Visual Paradigm makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. The information in this document is subject to change without notice.
All examples with names, company names, or companies that appear in this document are imaginary and do not refer to, or portray, in name or substance, any actual names, companies, entities, or institutions. Any resemblance to any real person, company, entity, or institution is purely coincidental.
Trademark Information
DB Visual ARCHITECT is registered trademark of Visual Paradigm.
Sun, Sun ONE, Java, Java2, J2EE and EJB, NetBeans are all registered trademarks of Sun Microsystems, Inc.
Eclipse is registered trademark of Eclipse.
JBuilder is registered trademark of Borland Corporation.
IntelliJ and IntelliJ IDEA are registered trademarks of JetBrains.
Microsoft, Windows, Windows NT, Visio, and the Windows logo are trademarks or registered trademarks of Microsoft Corporation.
Oracle is a registered trademark, and JDeveloper is a trademark or registered trademark of Oracle Corporation.
BEA is registered trademarks of BEA Systems, Inc.
BEA WebLogic Workshop is trademark of BEA Systems, Inc.
Rational Rose is registered trademark of International Business Machines Corporation.
WinZip is a registered trademark of WinZip Computing, Inc.
Other trademarks or service marks referenced herein are property of their respective owners.
DB Visual ARCHITECT License Agreement
THE USE OF THE SOFTWARE LICENSED TO YOU IS SUBJECT TO THE TERMS AND CONDITIONS OF THIS SOFTWARE LICENSE AGREEMENT. BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, UNDERSTAND IT, AND AGREE TO BE BOUNDED BY ALL OF THE TERMS AND CONDITIONS OF THIS SOFTWARE LICENSE AGREEMENT.
SPECIFIC DISCLAIMER FOR HIGH-RISK ACTIVITIES. The SOFTWARE is not designed or intended for use in high-risk activities including, without restricting the generality of the foregoing, on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. Visual Paradigm disclaims any express or implied warranty of fitness for such purposes or any other purposes.
NOTICE. The Product is not intended for personal, family or household use; rather, it is intended exclusively for professional use. Its utilization requires skills that differ from those needed to use consumer software products such as word processing or spreadsheet software.
GOVERNMENT RIGHTS. If the Software is licensed by or on behalf of a unit or agency of any government, the Licensee agrees that the Software is "commercial computer software", "commercial computer software documentation" or similar terms and that, in the absence of a written agreement to the contrary, the Licensee's rights with respect to the Software are limited by the terms of this Agreement.
Acknowledgements
This Product includes software developed by the Apache Software Foundation (http://www.apache.org). Copyright © 1999 The Apache Software Foundation. All rights reserved.
Table of Contents
Preface
Chapter 1 -Generating Java, Database and Persistent Library
Introduction
Configuring Database
Generating Database
Generating Java Code
Selecting Optional Jar for Persistent Library
Chapter 2 -Configuring Source and Library in Eclipse
Copying Generated Source and Library to Eclipse Project
Configuring the Library
Modifying the Sample Program to Test the Generated Java Model
Chapter 3 -Developing Java Enterprise Web Application
Introduction
Configuring Web Application Deployment Descriptor
Creating Object and Saving to Database
Querying Object from Database
Updating Object and Saving to Database
Deleting Object in Database
Using Persistent Object with HttpSession
Chapter 4 -Developing Standalone Java Application
Introduction
Generating Java Source and Database
Using PersistentManager and TransactionStart TransactionCreating Object and Saving to Database
Commit Transaction
Rollback Transaction
Querying Object from Database
Updating Object and Saving to Database
Deleting Object in Database
Chapter 5 -Querying Database
Introductions
Creating Test Data
Using ORM QualityDefining ORM QualifierUsing Criteria
Retrieving from ORM QualifierConfiguring Criteria Class Generation
Description of Criteria Class
Comparing the Criteria Class and SQL Query
Chapter 6 -Generating Object-Oriented Java Source from Relational Database
Introduction
Creating Simulate Data
Start Generating Code from Database Wizard
Configuring Database
Selecting Table
Configuring Generated Class Details
Specifying Code Generation Details
Using Generated Sample
|
|
|||||||