Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.doc.user/tasks004.htm')
-rw-r--r--jpa/plugins/org.eclipse.jpt.doc.user/tasks004.htm84
1 files changed, 59 insertions, 25 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.doc.user/tasks004.htm b/jpa/plugins/org.eclipse.jpt.doc.user/tasks004.htm
index 90441ad325..ebf5d2e676 100644
--- a/jpa/plugins/org.eclipse.jpt.doc.user/tasks004.htm
+++ b/jpa/plugins/org.eclipse.jpt.doc.user/tasks004.htm
@@ -3,56 +3,90 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<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" />
-<title>Creating an orm.xml file</title>
-<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1.1" />
-<meta name="date" content="2010-05-19T8:12:42Z" />
+<title>Mapped superclass</title>
+<meta name="copyright" content="Copyright (c) 2000, 2009 oracle . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: Oracle - initial API and implementation" />
+<meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 1.0.11" />
+<meta name="date" content="2012-09-11T7:44:4Z" />
<meta name="robots" content="noarchive" />
-<meta name="doctitle" content="Creating an orm.xml file" />
-<meta name="relnum" content="Release 2.3" />
-<meta name="copyright" content="Copyright (c) 2000, 2008 oracle . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: Oracle - initial API and implementation" />
+<meta name="doctitle" content="Mapped superclass" />
+<meta name="relnum" content="Release 3.2" />
+<meta name="partnum" content="Release 3.2" />
<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" />
-<!-- contents -->
</head>
<body>
-<div class="sect2"><!-- infolevel="all" infotype="General" --><a id="sthref60" name="sthref60"></a>
-<h1>Creating an orm.xml file</h1>
-<p><a id="sthref61" name="sthref61"></a>If you opt not to create an <code>orm.xml</code> file when you create a JPA project, you can create one using the <a href="reference002.htm#CIAIJCCE">Mapping File Wizard</a>.</p>
-<p>Use this procedure to create an <code>orm.xml</code> file:</p>
+<p class="betadraftsubtitle">Beta Draft: 2012-09-11</p>
+<p><a id="BABDAGCI" name="BABDAGCI"></a></p>
+<div class="sect2"><!-- infolevel="all" infotype="General" -->
+<h1>Mapped superclass</h1>
+<p><a id="sthref85" name="sthref85"></a><a id="sthref86" name="sthref86"></a>An entity that extends a <span class="bold">Mapped Superclass</span> class inherits the persistent state and mapping information from a superclass. You should use a mapped superclass to define mapping information that is common to multiple entity classes.</p>
+<p>A mapped superclass <span class="italic">can be</span>:</p>
+<ul>
+<li>
+<p>Abstract or concrete classes</p>
+</li>
+</ul>
+<p>A mapped superclass <span class="italic">cannot be</span>:</p>
+<ul>
+<li>
+<p>Be queried or passed as an argument to Entity-Manager or Query operations</p>
+</li>
+<li>
+<p>Be the target of a persistent relationship</p>
+</li>
+</ul>
+<p>A mapped superclass does not have a defined database table. Instead, its mapping information is derived from its superclass. To override the mapping information for a specific subclass, use the <code>@AttributeOverride</code> annotation for that specific class.</p>
+<p><a id="sthref87" name="sthref87"></a><a id="sthref88" name="sthref88"></a><a id="sthref89" name="sthref89"></a><a id="sthref90" name="sthref90"></a>A mapped superclass is identified by the <code>@MappedSuperclass</code> annotation.</p>
+<p>Use this procedure to add Mapped Superclass persistence to an existing entity:</p>
<ol>
<li>
-<p>From the Navigator or Project Explorer, select <span class="bold">File &gt; New &gt; Other</span>. The Select a Wizard dialog appears.</p>
-<div class="figure"><a id="sthref62" name="sthref62"></a>
-<p class="titleinfigure">The Select a Wizard Dialog</p>
-<img src="img/select_a_wizard_mapping.png" alt="The Select a Wizard dialog with Mapping file selected." title="The Select a Wizard dialog with Mapping file selected." /><br /></div>
-<!-- class="figure" --></li>
+<p>Open the Java class in the <span class="gui-object-title">Project Explorer</span>.</p>
+</li>
+<li>
+<p>Select the class in the JPA Structure view.</p>
+</li>
+<li>
+<p>In the JPA Details view, click the mapping type hyperlink to open the <a href="reference063.htm#CACFEGAG">Mapping Type Selection dialog</a>.</p>
+</li>
<li>
-<p>Select <span class="bold">Mapping File</span> and then click <span class="bold">Next</span>. The Mapping File page appears.</p>
-<p>If you are using EclipseLink, you can select <span class="bold">EclipseLink &gt; EclipseLink Mapping File</span>.</p>
-<div class="figure"><a id="sthref63" name="sthref63"></a>
-<p class="titleinfigure">The Mapping File Page</p>
-<img src="img/mapping_file_new.png" alt="The Mapping File page." title="The Mapping File page." /><br /></div>
+<p>Select <span class="bold">Mapped Superclass</span> and then <span class="bold">OK</span>.</p>
+<div class="figure"><a id="sthref91" name="sthref91"></a>
+<p class="titleinfigure">Mapping Type Selection Dialog (Mapped Superclass)</p>
+<img src="img/mapping_type_selection_superclass.png" alt="The Mapping Type Selection dialog with Mapped Superclass selected." title="The Mapping Type Selection dialog with Mapped Superclass selected." /><br /></div>
<!-- class="figure" --></li>
<li>
-<p>Define the properties in the page and click <span class="bold">Finish</span>. The <code>orm.xml</code> file appears in the src directory of the selected JPA project. You can manage the orm.xml file using the JPA Details view or through the XML Editor. See also <a href="ref_details_orm.htm#CACGDGHC">JPA Details view (for orm.xml)</a>.</p>
+<p>Complete the remaining <a href="ref_persistence_prop_view.htm#BABFAEBB">JPA Details view (for entities)</a>.</p>
</li>
</ol>
+<a id="sthref92" name="sthref92"></a>
+<p class="subhead2">Related reference</p>
+<ul>
+<li>
+<p><a href="task_add_persistence.htm#BABHICAI">Adding persistence to a class</a></p>
+</li>
+<li>
+<p><a href="task_additonal_tables.htm#CIHGBIEI">Specifying additional tables</a></p>
+</li>
+<li>
+<p><a href="task_inheritance.htm#CIHCCCJD">Specifying entity inheritance</a></p>
+</li>
+</ul>
</div>
<!-- class="sect2" -->
+<!-- class="sect1" -->
<!-- Start Footer -->
<div class="footer">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="86%" />
<col width="*" />
<tr>
-<td align="left"><span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;2006, 2010,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span><br />
+<td align="left"><span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;2011, 2012,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span><br />
<a href="dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
-</html>
+</html> \ No newline at end of file

Back to the top