diff options
author | nhauge | 2007-05-04 19:55:48 +0000 |
---|---|---|
committer | nhauge | 2007-05-04 19:55:48 +0000 |
commit | bc72d754f082fe30ef0d7aeff54f29c64553f02a (patch) | |
tree | d69c3c3f38ea93ee78ce6d4529f80d928ee88030 /jpa/plugins/org.eclipse.jpt.doc.user/tasks017.htm | |
parent | d8139fbb848c9509ae592b5477c85f5fd34b8ceb (diff) | |
download | webtools.dali-bc72d754f082fe30ef0d7aeff54f29c64553f02a.tar.gz webtools.dali-bc72d754f082fe30ef0d7aeff54f29c64553f02a.tar.xz webtools.dali-bc72d754f082fe30ef0d7aeff54f29c64553f02a.zip |
178911 - Initial check-in for user.doc plugin for Dali 1.0.
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.doc.user/tasks017.htm')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.doc.user/tasks017.htm | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.doc.user/tasks017.htm b/jpa/plugins/org.eclipse.jpt.doc.user/tasks017.htm new file mode 100644 index 0000000000..f78f1a6eff --- /dev/null +++ b/jpa/plugins/org.eclipse.jpt.doc.user/tasks017.htm @@ -0,0 +1,74 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<!-- Run date = May 3, 2007 9:19:11 --> +<meta name="OAC_IGNORE_SKIP_NAV" content="true" /> +<title>Generating entities from tables</title> +<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> +<meta http-equiv="Content-Style-Type" content="text/css" /> +<meta http-equiv="Content-Script-Type" content="text/javascript" /> +<meta name="generator" content="Oracle DARB XHTML Converter - Version 4.5.3 Build 02" /> +<meta name="date" content="2005-07-10T12:57:20+08:00" /> +<meta name="robots" content="all" scheme="http://www.robotstxt.org/" /> +<meta name="doctitle" content="Generating entities from tables" /> +<meta name="relnum" content="Release 1.0.0" /> +<meta name="partnum" content="" /> +<link rel="copyright" href="dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> +<link rel="stylesheet" href="dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> +<link rel="start" href="../../index.htm" title="Home" type="text/html" /> +<link rel="contents" href="toc.htm" title="Contents" type="text/html" /> +</head> +<body> +<p><a id="BABBAGFI" name="BABBAGFI"></a></p> +<div class="sect1"> +<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> +<tr valign="bottom"> +<td align="left" width="86%"> +<h1>Generating entities from tables</h1> +</td> +</tr> +</table> +<p><a id="sthref154" name="sthref154"></a><a id="sthref155" name="sthref155"></a>Use this procedure to generate Java persistent entities from database tables. You must create a JPA project and establish a database connection <span class="italic">before</span> generating persistent entities. See <a href="task_create_new_project.htm#CIHHEJCJ">"Creating a new JPA project"</a> for more information.</p> +<ol type="1" start="1"> +<li> +<p>Right-click the JPA project in the <span class="gui-object-title">Package Explorer</span> and select <span class="gui-object-action">JPA Tools > Generate Entities</span>.</p> +<div class="figure"><a id="sthref156" name="sthref156"></a> +<p class="titleinfigure">Generating Entities</p> +<img src="img/generate_entities.png" alt="Using the Java Persistence > Generate Entities menu option." title="Using the Java Persistence > Generate Entities menu option." /><br /></div> +<!-- class="figure" --></li> +<li> +<p>If you are not currently connected to the database, the Database Connection page appears. Select your database connection and schema, and click <span class="bold">Reconnect</span>.</p> +<p>To create a new database connection, click <span class="bold">Add connection</span>.</p> +<p>After connecting to the database, click <span class="bold">Next</span>.</p> +</li> +<li> +<p><a id="sthref157" name="sthref157"></a><a id="sthref158" name="sthref158"></a>On the <a href="task_generate_entities.htm#CACDAFJD">Generate Entities from Tables dialog</a> dialog, select the tables from which to generate Java persistent entities and click <span class="bold">Finish</span>.</p> +</li> +</ol> +<p>Eclipse creates a Java persistent entity for each database table. Each entity contains fields based on the table's columns. Eclipse will also generate entity relationships (such as one-to-one) based on the table constraints. <a href="#CIHJIJJC">Figure: Generating Entities from Tables</a> illustrates how Eclipse generates entities from tables.</p> +<div class="figure"><a id="CIHJIJJC" name="CIHJIJJC"></a> +<p class="titleinfigure">Generating Entities from Tables</p> +<img src="img/table_entity.png" alt="This figure shows the EMPLOYEE and ADDRESS entities generated from database tabels." title="This figure shows the EMPLOYEE and ADDRESS entities generated from database tabels." /><br /></div> +<!-- class="figure" --> +<p> </p> +<img src="img/ngrelt.png" alt="Related task" title="Related task" /><br /> +<br /> +<p> </p> +<img src="img/ngrelr.png" alt="Related reference" title="Related reference" /><br /> +<br /> +<p> </p> +<img src="img/ngrelc.png" alt="Related concept" title="Related concept" /><br /> +<br /></div> +<!-- class="sect1" --> +<!-- Start Footer --> +<div class="footer"> +<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> +<tr> +<td align="left" width="86%"><a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Copyright © 2006, 2007, Oracle. All rights reserved.</span></a></td> +</tr> +</table> +</div> +<!-- class="footer" --> +</body> +</html> |