blob: 436a76b41161235d4807bc4663720d46ecf057bc [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>Key Concepts | EclipseLink 2.5.x Understanding EclipseLink</title>
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 1.0.17" />
<meta name="date" content="2013-10-03T10:37:14Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Key Concepts" />
<meta name="relnum" content="2.5" />
<link rel="stylesheet" type="text/css" href="../../dcommon/style.css" media="screen" />
<link rel="copyright" href="../../dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="start" href="../../index.htm" title="Home" type="text/html" />
<link rel="contents" href="toc.htm" title="Contents" type="text/html" />
<link rel="prev" href="general003.htm" title="Previous" type="text/html" />
<link rel="next" href="general005.htm" title="Next" type="text/html" />
<!-- START: Disqus --><script type="text/javascript"> var disqus_developer = 0; </script><!-- END: Disqus --><!-- START: Sharethis --><script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript" src="http://s.sharethis.com/loader.js"></script> <!-- END: Sharethis --></head>
<body bgcolor="#FFFFFF"><iframe id="docheader" frameborder="0" framemargin="0" scrolling="no" src="../../dcommon/header.html"></iframe><script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"> google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchOptions = {}; var googleAnalyticsOptions = {}; googleAnalyticsOptions['queryParameter'] = 'q'; googleAnalyticsOptions['categoryParameter'] = ''; customSearchOptions['googleAnalyticsOptions'] = googleAnalyticsOptions; var customSearchControl = new google.search.CustomSearchControl( '016171230611334810008:mdbgdwjv8zu', customSearchOptions); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); var options = new google.search.DrawOptions(); options.setSearchFormRoot('cse-search-form'); customSearchControl.draw('cse', options); }, true);</script><link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /><div id="cse" style="width:100%;"></div>
<div class="header"><a id="top" name="top"></a>
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" valign="top"><div class="booktitle">Understanding EclipseLink,
<b>2.5</b><br /></font></td>
<td valign="bottom" align="right" width="144">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="toc.htm"><img src="../../dcommon/images/contents.png" alt="Go To Table Of Contents" border="0" height="16" width="16" /><br />
</td><td>&nbsp;</td><td align="center"><a href="../../" target="_top" class="external text" title="Search" rel="nofollow"><img src="../../dcommon/images/search.png" alt="Search" style="border:0;" /><br /><span class="mini"></span></a></td><td>&nbsp;</td><td align="center"><a href="../eclipselink_otlcg.pdf" title="PDF" target="_blank"><img src="../../dcommon/images/pdf_icon.png" style="padding-right:5px;border:0" alt="PDF"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
<table class="navigation simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100" align="center">
<tr>
<td align="center"><a href="general003.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td>
<td align="center"><a href="general005.htm"><img src="../../dcommon/images/rarrow.png" alt="Next" border="0" height="16" width="16" /></a></td>
<td>&nbsp;</td>
</tr>
</table>
</div>
<!-- class="header" -->
<div class="ind"><!-- End Header --><a id="CHDBJDEC" name="CHDBJDEC"></a><a id="OTLCG94460" name="OTLCG94460"></a>
<div class="sect1"><!-- infolevel="all" infotype="General" -->
<h1 class="sect1"><font face="arial, helvetica, sans-serif" color="#330099">Key Concepts</font></h1>
<p>This section provides a brief introduction to several of the key concepts described in this documentation. The key concepts highlighted in this section are as follows:</p>
<ul>
<li>
<p><a href="#CHDBJIJE">EclipseLink Metadata</a></p>
</li>
<li>
<p><a href="#CHDGEFJG">Entities</a></p>
</li>
<li>
<p><a href="#CHDBABAD">Descriptors</a></p>
</li>
<li>
<p><a href="#CHDFGCJF">Mappings</a></p>
</li>
<li>
<p><a href="#CHDFFJIA">Data Access</a></p>
</li>
<li>
<p><a href="#CHDEEBFG">Caching</a></p>
</li>
<li>
<p><a href="#CHDBJIEA">Queries</a></p>
</li>
<li>
<p><a href="#CHDJJFCE">Expression Framework</a></p>
</li>
<li>
<p><a href="#CHDGCGDD">NoSQL Databases</a></p>
</li>
<li>
<p><a href="#CHDBIEJD">Performance Monitoring and Profiling</a></p>
</li>
</ul>
<a id="CHDBJIJE" name="CHDBJIJE"></a><a id="OTLCG113" name="OTLCG113"></a>
<div class="sect2">
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">EclipseLink Metadata</font></h2>
<p>EclipseLink metadata is the bridge between the development of an application and its deployed runtime environment. You can capture the metadata using:</p>
<ul>
<li>
<p>JPA annotations in Java files and the JPA-defined properties in the <code>persistence.xml</code>, <code>eclipselink-orm.xml</code>, and <code>orm.xml</code> files.</p>
<p>Metadata is also captured by EclipseLink JPA annotations and property extensions in the <code>persistence.xml</code> file. The <code>eclipselink-orm.xml</code> file can also be used to specify property extensions beyond the JPA specification.</p>
</li>
<li>
<p>JAXB annotations in Java files and JAXB-defined properties in the <code>eclipselink-oxm.xml</code> file.</p>
<p>The <code>eclipselink-oxm.xml</code> file can be used to define property extensions beyond the JAXB specification.</p>
</li>
<li>
<p>Java and the EclipseLink API.</p>
</li>
</ul>
<p>The metadata lets you pass configuration information into the runtime environment. The runtime environment uses the information in conjunction with the persistent classes, such as Java objects, JPA entities, and the code written with the EclipseLink API, to complete the application. See <a href="blocks001.htm#CHDIADII">"Adding Metadata Using Annotations"</a> for more information. See also <em>Java Persistence API (JPA) Extensions Reference for EclipseLink</em>.</p>
<p>Mappings can be stored external to the application. This can be as simple as making the <code>eclipselink-orm.xml</code> or <code>eclipselink-oxm.xml</code> file with the additional mapping information available on a web server as a file. It can also be more complex involving a server process that stores the mapping information and allows the information to be updated dynamically. For more information, see "EclipseLink/Examples/JPA/MetadataSource" in the EclipseLink documentation.</p>
<p><code><a href="http://wiki.eclipse.org/EclipseLink/Examples/JPA/MetadataSource">http://wiki.eclipse.org/EclipseLink/Examples/JPA/MetadataSource</a></code></p>
</div>
<!-- class="sect2" -->
<a id="CHDGEFJG" name="CHDGEFJG"></a><a id="OTLCG94461" name="OTLCG94461"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Entities</font></h2>
<p>An entity is a persistence domain object. Typically, an entity represents a table in a relational database, and each entity instance corresponds to a row in the table. The primary programming artifact of an entity is the entity class, although entities can use helper classes.</p>
<p>The persistent state of an entity is represented either through persistent fields or persistent properties. These fields or properties use object/relational mapping annotations to map the entities and entity relationships to the relational data in the underlying data store.</p>
<p>See <a href="entities.htm#CIHGAJCF">Chapter 4, "Understanding Entities."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDBABAD" name="CHDBABAD"></a><a id="OTLCG94462" name="OTLCG94462"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Descriptors</font></h2>
<p>Descriptors describe how a Java class relates to a data source representation. They relate object classes to the data source at the data model level. For example, persistent class attributes may map to database columns.</p>
<p>EclipseLink uses descriptors to store the information that describes how an instance of a particular class can be represented in a data source. Descriptors are used internally by EclipseLink, and are defined through annotations, XML, or in IDEs such as JDeveloper or Eclipse, then read at run time.</p>
<p>See <a href="descriptors.htm#CHECEAAE">Chapter 6, "Understanding Descriptors."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDFGCJF" name="CHDFGCJF"></a><a id="OTLCG94463" name="OTLCG94463"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Mappings</font></h2>
<p>Mappings describe how individual object attributes relate to a data source representation. Mappings can involve a complex transformation or a direct entry.</p>
<p>EclipseLink uses mappings to determine how to transform data between object and data source representations. Mappings are used internally by EclipseLink, and are defined through annotations, XML, or in IDEs such as Eclipse, then read from the project XML file at run time.</p>
<p>See <a href="mappingintro.htm#CHDFEJIJ">Chapter 7, "Understanding Mappings."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDFFJIA" name="CHDFFJIA"></a><a id="OTLCG94464" name="OTLCG94464"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Data Access</font></h2>
<p>A data source platform includes options specific to a particular data source including binding, use of native SQL, use of batch writing, and sequencing.</p>
<p>See <a href="data_access.htm#CHDJBDEA">Chapter 8, "Understanding Data Access."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDEEBFG" name="CHDEEBFG"></a><a id="OTLCG94465" name="OTLCG94465"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Caching</font></h2>
<p>The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and primary key values. The cache is used to improve performance by avoiding unnecessary trips to the database, manage locking and cache isolation level, and manage object identity.</p>
<p>See <a href="cache.htm#CDEFHHEH">Chapter 9, "Understanding Caching."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDBJIEA" name="CHDBJIEA"></a><a id="OTLCG94466" name="OTLCG94466"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Queries</font></h2>
<p>You can to create, read, update, and delete persistent objects or data using queries in both Java EE and non-Java EE applications for both relational and nonrelational data sources. Queries can be made at the object level or data level.</p>
<p>A number of query languages are supported, such as Java Persistence Query Language (JPQL), SQL, and the Expression Framework. The Java Persistence Criteria API can also be used to define dynamic queries through the construction of object-based query definition objects, rather than use of the string-based approach of JPQL.</p>
<p>See <a href="queries.htm#CHDGGCJB">Chapter 10, "Understanding Queries."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDJJFCE" name="CHDJJFCE"></a><a id="OTLCG94467" name="OTLCG94467"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Expression Framework</font></h2>
<p>By using the EclipseLink Expressions framework, you can specify query search criteria based on your domain object model. Expressions offer a number of advantages over SQL. For example, expressions are easier to maintain, changes to descriptors or database tables do not affect the querying structures in the application, they enhance readability by standardizing the <code>Query</code> interface, and they simplify complex operations.</p>
<p>See <a href="expressions.htm#CHDCAIGD">Chapter 11, "Understanding EclipseLink Expressions."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDGCGDD" name="CHDGCGDD"></a><a id="OTLCG94468" name="OTLCG94468"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">NoSQL Databases</font></h2>
<p>NoSQL is a classification of database systems that do not support the SQL standard. These include document databases, key-value stores, and various other non-standard databases. Persistence of Java objects to NoSQL databases is supported through the Java Persistence API (JPA). EclipseLink's native API is also supported with NoSQL databases.</p>
<p>See <a href="nosql.htm#BJEIGBFD">Chapter 12, "Understanding Non-relational Data Sources."</a></p>
</div>
<!-- class="sect2" -->
<a id="CHDBIEJD" name="CHDBIEJD"></a><a id="OTLCG94469" name="OTLCG94469"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Performance Monitoring and Profiling</font></h2>
<p>A diverse set of features is provided to measure and optimize application performance. You can enable or disable most features in the descriptors or session, making any resulting performance gains global. Tools are provided for performance profiling and performance, fetch group, and query monitoring.</p>
<p>See <a href="monitoring.htm#BABHHIEG">Chapter 13, "Understanding Performance Monitoring and Profiling."</a></p>
</div>
<!-- class="sect2" --></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="navigation simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100" align="center">
<col width="*" />
<col width="48%" />
<col width="48%" />
<tr>
<td>&nbsp;</td>
<td align="center"><a href="general003.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td>
<td align="center"><a href="general005.htm"><img src="../../dcommon/images/rarrow.png" alt="Next" border="0" height="16" width="16" /></a></td>
</tr>
</table>
</td>
<td align="center" width="34%"><a href="http://www.eclipse.org/eclipselink/" title="EclipseLink home"><img src="../../dcommon/images/ellogo.png" alt="EclipseLink" width="150" border="0" /></a><br />
<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="toc.htm"><img src="../../dcommon/images/contents.png" alt="Go To Table Of Contents" border="0" height="16" width="16" /><br />
</td><td>&nbsp;</td><td align="center"><a href="../../" target="_top" class="external text" title="Search" rel="nofollow"><img src="../../dcommon/images/search.png" alt="Search" style="border:0;" /><br /><span class="mini"></span></a></td><td>&nbsp;</td><td align="center"><a href="../eclipselink_otlcg.pdf" title="PDF" target="_blank"><img src="../../dcommon/images/pdf_icon.png" style="padding-right:5px;border:0" alt="PDF"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- class="footer" -->
<div id="copyright">Copyright &copy; 2012 by The Eclipse Foundation under the <a href="http://www.eclipse.org/org/documents/epl-v10.php">Eclipse Public License (EPL)</a><br /> <script type="text/javascript">var LastUpdated = document.lastModified;document.writeln ("Updated: " + LastUpdated);</script> </div><!-- START: Analytics --><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1608008-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script><!-- END: Analytics --><!-- START: Sharethis --><script>var options={ "publisher": "e2fe9e07-fab6-4f84-83ea-0991b429842c", "position": "right", "ad": { "visible": false, "openDelay": 5, "closeDelay": 0}};var st_hover_widget = new sharethis.widgets.hoverbuttons(options);</script><!-- END: Sharethis --></body>
</html>