blob: cc1ada06b6428086b402eb8a2f8ccfe406434e99 [file] [log] [blame]
<!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>
<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>Adding virtual attributes</title>
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 1.0.11" />
<meta name="date" content="2012-12-19T9:17:41Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Adding virtual attributes" />
<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" />
<link rel="contents" href="toc.htm" title="Contents" type="text/html" />
<link rel="up" href="../../index.htm" title="Home" type="text/html" />
<link rel="up" href="toc.htm" title="User Guide" type="text/html" />
<link rel="up" href="tasks.htm" title="Tasks" type="text/html" />
<link rel="up" href="tasks004.htm" title="Adding virtual attributes" type="text/html" />
<link rel="index" href="index.htm" title="Index" type="text/html" />
<link rel="prev" href="task_add_persistence.htm" title="Adding persistence to a class " type="text/html" />
<link rel="next" href="task_manage_persistence.htm" title="Managing the persistence.xml file" type="text/html" />
</head>
<body>
<div class="header"><a id="top" name="top"></a>
<div class="zz-skip-header"><a href="#BEGIN">Skip Headers</a></div>
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" valign="top"><b>Dali Java Persistence Tools User Guide</b><br />
<b>Release 3.2</b><br />
Release 3.2</td>
<td valign="bottom" align="right">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="225">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="../dali_user_guide.pdf"><img src="dcommon/gifs/pdf_icon.png" alt="PDF" height="24" /><br /><span class="icon">PDF</span></a></td><td align="center" valign="top"><a href="toc.htm"><img src="dcommon/gifs/toc.gif" alt="Go To Table Of Contents" /><br />
<span class="icon">Contents</span></a></td>
<td align="center" valign="top"><a href="index.htm"><img src="dcommon/gifs/index.gif" alt="Go To Index" /><br />
<span class="icon">Index</span></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100">
<tr>
<td align="center"><a href="task_add_persistence.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br />
<span class="icon">Adding persistence to a class</span></a> &nbsp;</td>
<td align="center"><a href="task_manage_persistence.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br />
<span class="icon">Managing the persistence.xml file</span></a></td>
<td>&nbsp;</td>
</tr>
</table>
<p id="BREADCRUMBING"><a href="../../index.htm" title="Home">Home</a> &gt; <a href="toc.htm" title="User Guide">User Guide</a> &gt; <a href="tasks.htm" title="Tasks">Tasks</a> &gt; Adding virtual attributes</p>
<a name="BEGIN" id="BEGIN"></a></div>
<!-- class="header" -->
<div class="ind"><!-- End Header --><a id="CIHIAJHC" name="CIHIAJHC"></a>
<div class="sect1"><!-- infolevel="all" infotype="General" -->
<h1 class="sect1"><a id="sthref122" name="sthref122"></a><a id="sthref123" name="sthref123"></a>Adding virtual attributes</h1>
<p>To add a virtual attribute to an entity:</p>
<ol>
<li>
<p>Open the <code>eclipselink-orm.xml</code> mapping file.</p>
</li>
<li>
<p>In the <a href="reference002.htm#BABEGGFE">JPA Structure view</a>, right-click an entity and select <span class="bold">Add Virtual Attribute</span>. The Add Virtual Attribute dialog appears.</p>
<div class="figure"><a id="sthref124" name="sthref124"></a>
<p class="titleinfigure">Figure 3-24 Add Virtual Attribute Dialog</p>
<img src="img/add_virtual_attribute_dialog.png" alt="" title="" /><br /></div>
<!-- class="figure" --></li>
<li>
<p>Complete the fields on the <a href="reference004.htm#CACHEFCH">Add Virtual Attribute dialog</a> and click <span class="bold">OK</span>. Dali adds the virtual attribute to the entity.</p>
<div class="figure"><a id="sthref125" name="sthref125"></a>
<p class="titleinfigure">Figure 3-25 Virtual Attribute</p>
<img src="img/jpa_structure_virtual_attribute.png" alt="" title="" /><br /></div>
<!-- class="figure" --></li>
</ol>
<a id="sthref126" name="sthref126"></a>
<p class="subhead2">Related reference</p>
<ul>
<li>
<p><a href="reference004.htm#CACHEFCH">Add Virtual Attribute dialog</a></p>
</li>
</ul>
</div>
<!-- class="sect1" --></div>
<!-- class="ind" -->
<!-- Start Footer -->
<div class="footer">
<hr />
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="33%" />
<col width="*" />
<col width="33%" />
<tr>
<td valign="bottom">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100">
<col width="*" />
<col width="48%" />
<col width="48%" />
<tr>
<td>&nbsp;</td>
<td align="center"><a href="task_add_persistence.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br />
<span class="icon">Adding persistence to a class</span></a> &nbsp;</td>
<td align="center"><a href="task_manage_persistence.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br />
<span class="icon">Managing the persistence.xml file</span></a></td>
</tr>
</table>
</td>
<td class="copyrightlogo"><img class="copyrightlogo" src="http://www.eclipse.org/eclipse.org-common/themes/Nova/images/eclipse.png" alt="Eclipse Logo" width="150"/><br />
<span class="copyrightlogo">Copyright&nbsp;&copy;&nbsp;2011, 2012,&nbspby The Eclipse Foundation under the Eclipse Public License (EPL).</span> <a href="legal.htm"><br />
<span class="copyrightlogo">Legal Notices</span></a></td>
<td valign="bottom" align="right">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="225">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="../dali_user_guide.pdf"><img src="dcommon/gifs/pdf_icon.png" alt="PDF" height="24" /><br /><span class="icon">PDF</span></a></td><td align="center" valign="top"><a href="toc.htm"><img src="dcommon/gifs/toc.gif" alt="Go To Table Of Contents" /><br />
<span class="icon">Contents</span></a></td>
<td align="center" valign="top"><a href="index.htm"><img src="dcommon/gifs/index.gif" alt="Go To Index" /><br />
<span class="icon">Index</span></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- class="footer" -->
</body>
</html>