You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by kw...@apache.org on 2014/05/15 00:22:26 UTC

svn commit: r908837 [30/37] - /websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/

Added: websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_ext.html
==============================================================================
--- websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_ext.html (added)
+++ websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_ext.html Wed May 14 22:22:23 2014
@@ -0,0 +1,263 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>9.&nbsp; Mapping Extensions</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.3 User's Guide"><link rel="up" href="ref_guide_mapping.html" title="Chapter&nbsp;7.&nbsp; Mapping"><link rel="prev" href="ref_guide_mapping_limits.html" title="8.&nbsp; Mapping Limitations"><link rel="next" href="ref_guide_mapping_custom.html" title="10.&nbsp; Custom Mappings"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">9.&nbsp;
+            Mapping Extensions
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_mapping_limits.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;7.&nbsp;
+        Mapping
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_mapping_custom.html">Next</a></td></tr></table><hr></div><div class="section" title="9.&nbsp; Mapping Extensions"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ref_guide_mapping_ext">9.&nbsp;
+            Mapping Extensions
+        </h2></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ref_guide_mapping_ext.html#ref_guide_mapping_ext_cls">9.1. 
+                Class Extensions
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_ext.html#subclass-fetch-mode">9.1.1. 
+                    Subclass Fetch Mode
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#class-strategy">9.1.2. 
+                    Strategy
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#discriminator-strategy">9.1.3. 
+                    Discriminator Strategy
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#version-strategy">9.1.4. 
+                    Version Strategy
+                </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_ext.html#ref_guide_mapping_ext_field">9.2. 
+                Field Extensions
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_ext.html#eager-fetch-mode">9.2.1. 
+                    Eager Fetch Mode
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#nonpolymorphic">9.2.2. 
+                    Nonpolymorphic
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#class-criteria">9.2.3. 
+                    Class Criteria
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#strategy">9.2.4. 
+                    Strategy
+                </a></span></dt></dl></dd></dl></div>
+        
+        <p>
+Mapping extensions allow you to access OpenJPA-specific functionality from your
+mappings. Note that all extensions below are specific to mappings. If you store
+your mappings separately from your persistence metadata, these extensions must
+be specified along with the mapping information, not the persistence metadata
+information.
+        </p>
+        <div class="section" title="9.1.&nbsp; Class Extensions"><div class="titlepage"><div><div><h3 class="title" id="ref_guide_mapping_ext_cls">9.1.&nbsp;
+                Class Extensions
+            </h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ref_guide_mapping_ext.html#subclass-fetch-mode">9.1.1. 
+                    Subclass Fetch Mode
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#class-strategy">9.1.2. 
+                    Strategy
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#discriminator-strategy">9.1.3. 
+                    Discriminator Strategy
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#version-strategy">9.1.4. 
+                    Version Strategy
+                </a></span></dt></dl></div>
+            
+            <p>
+OpenJPA recognizes the following class extensions.
+            </p>
+            <div class="section" title="9.1.1.&nbsp; Subclass Fetch Mode"><div class="titlepage"><div><div><h4 class="title" id="subclass-fetch-mode">9.1.1.&nbsp;
+                    Subclass Fetch Mode
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14816"></a>
+                <p>
+This extension specifies how to eagerly fetch subclass state. It overrides the
+global <a class="link" href="ref_guide_conf_jdbc.html#openjpa.jdbc.SubclassFetchMode" title="6.16.&nbsp; openjpa.jdbc.SubclassFetchMode"><code class="literal">
+openjpa.jdbc.SubclassFetchMode</code></a> property. Set the OpenJPA
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/SubclassFetchMode.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.SubclassFetchMode</code>
+</a> annotation to a value from the
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/FetchMode.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.FetchMode</code>
+</a> enum: <code class="literal">JOIN</code>, <code class="literal">PARALLEL</code>, or
+<code class="literal">NONE</code>. See <a class="xref" href="ref_guide_perfpack_eager.html" title="8.&nbsp; Eager Fetching">Section&nbsp;8, &#8220;
+            Eager Fetching
+        &#8221;</a>
+ for a discussion of eager fetching.
+                </p>
+            </div>
+            <div class="section" title="9.1.2.&nbsp; Strategy"><div class="titlepage"><div><div><h4 class="title" id="class-strategy">9.1.2.&nbsp;
+                    Strategy
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14834"></a>
+                <p>
+The <a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/Strategy.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.Strategy</code></a>
+class annotation allows you to specify a custom mapping strategy for your class.
+See <a class="xref" href="ref_guide_mapping_custom.html" title="10.&nbsp; Custom Mappings">Section&nbsp;10, &#8220;
+            Custom Mappings
+        &#8221;</a> for information on custom
+mappings.
+                </p>
+            </div>
+            <div class="section" title="9.1.3.&nbsp; Discriminator Strategy"><div class="titlepage"><div><div><h4 class="title" id="discriminator-strategy">9.1.3.&nbsp;
+                    Discriminator Strategy
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14845"></a>
+                <p>
+The
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/DiscriminatorStrategy.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.DiscriminatorStrategy</code>
+</a> class annotation allows you to specify a custom discriminator strategy.
+See <a class="xref" href="ref_guide_mapping_custom.html" title="10.&nbsp; Custom Mappings">Section&nbsp;10, &#8220;
+            Custom Mappings
+        &#8221;</a> for information on custom
+mappings.
+                </p>
+            </div>
+            <div class="section" title="9.1.4.&nbsp; Version Strategy"><div class="titlepage"><div><div><h4 class="title" id="version-strategy">9.1.4.&nbsp;
+                    Version Strategy
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14856"></a>
+                <p>
+The
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/VersionStrategy.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.VersionStrategy</code>
+</a> class annotation allows you to specify a custom version strategy. See
+<a class="xref" href="ref_guide_mapping_custom.html" title="10.&nbsp; Custom Mappings">Section&nbsp;10, &#8220;
+            Custom Mappings
+        &#8221;</a> for information on custom
+mappings.
+                </p>
+            </div>
+        </div>
+        <div class="section" title="9.2.&nbsp; Field Extensions"><div class="titlepage"><div><div><h3 class="title" id="ref_guide_mapping_ext_field">9.2.&nbsp;
+                Field Extensions
+            </h3></div></div></div><div class="toc"><dl><dt><span class="section"><a href="ref_guide_mapping_ext.html#eager-fetch-mode">9.2.1. 
+                    Eager Fetch Mode
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#nonpolymorphic">9.2.2. 
+                    Nonpolymorphic
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#class-criteria">9.2.3. 
+                    Class Criteria
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_ext.html#strategy">9.2.4. 
+                    Strategy
+                </a></span></dt></dl></div>
+            
+            <p>
+OpenJPA recognizes the following field extensions.
+            </p>
+            <div class="section" title="9.2.1.&nbsp; Eager Fetch Mode"><div class="titlepage"><div><div><h4 class="title" id="eager-fetch-mode">9.2.1.&nbsp;
+                    Eager Fetch Mode
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14870"></a>
+                <p>
+This extension specifies how to eagerly fetch related objects. It overrides the
+global <a class="link" href="ref_guide_conf_jdbc.html#openjpa.jdbc.EagerFetchMode" title="6.4.&nbsp; openjpa.jdbc.EagerFetchMode"><code class="literal">
+openjpa.jdbc.EagerFetchMode</code></a> property. Set the OpenJPA
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/EagerFetchMode.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.EagerFetchMode</code>
+</a> annotation to a value from the
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/FetchMode.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.FetchMode</code>
+</a> enum: <code class="literal">JOIN</code>, <code class="literal">PARALLEL</code>, or
+<code class="literal">NONE</code>. See <a class="xref" href="ref_guide_perfpack_eager.html" title="8.&nbsp; Eager Fetching">Section&nbsp;8, &#8220;
+            Eager Fetching
+        &#8221;</a>
+ for a discussion of eager fetching.
+                </p>
+            </div>
+            <div class="section" title="9.2.2.&nbsp; Nonpolymorphic"><div class="titlepage"><div><div><h4 class="title" id="nonpolymorphic">9.2.2.&nbsp;
+                    Nonpolymorphic
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14888"></a>
+                <p>
+All fields in Java are polymorphic. If you declare a field of type <code class="literal">T
+</code>, you can assign any subclass of <code class="literal">T</code> to the field as
+well. This is very convenient, but can make relation traversal very inefficient
+under some inheritance strategies. It can even make querying across the field
+impossible. Often, you know that certain fields do not need to be entirely
+polymorphic. By telling OpenJPA about such fields, you can improve the
+efficiency of your relations.
+                </p>
+                <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+                    <p>
+OpenJPA also includes the <code class="literal">type</code> metadata extension for
+narrowing the declared type of a field. See <a class="xref" href="ref_guide_meta_ext.html#type" title="4.2.6.&nbsp; Type">Section&nbsp;4.2.6, &#8220;
+                    Type
+                &#8221;</a>.
+                    </p>
+                </div>
+                <p>
+OpenJPA defines the following extensions for nonpolymorphic values:
+                </p>
+                <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+                        <p>
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/Nonpolymorphic.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.Nonpolymorphic</code>
+</a>
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/ElementNonpolymorphic.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.ElementNonpolymorphic</code>
+</a>
+                        </p>
+                    </li></ul></div>
+                <p>
+The value of these extensions is a constant from the
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/NonpolymorphicType.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.NonpolymorphicType</code>
+</a> enumeration. The default value, <code class="literal">EXACT</code>, indicates
+that the relation will always be of the exact declared type. A value of
+<code class="literal">JOINABLE</code>, on the other hand, means that the relation might
+be to any joinable subclass of the declared type. This value only excludes
+table-per-class subclasses.
+                </p>
+            </div>
+            <div class="section" title="9.2.3.&nbsp; Class Criteria"><div class="titlepage"><div><div><h4 class="title" id="class-criteria">9.2.3.&nbsp;
+                    Class Criteria
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14916"></a>
+                <a class="indexterm" name="d5e14921"></a>
+                <p>
+This family of boolean extensions determines whether OpenJPA will use the
+expected class of related objects as criteria in the SQL it issues to load a
+relation field. Typically, this is not needed. The foreign key values uniquely
+identify the record for the related object. Under some rare mappings, however,
+you may need to consider both foreign key values and the expected class of the
+related object - for example, if you have an inverse relation that shares the
+foreign key with another inverse relation to an object of a different subclass.
+In these cases, set the proper class criteria extension to <code class="literal">true
+</code> to force OpenJPA to append class criteria to its select SQL.
+                </p>
+                <p>
+OpenJPA defines the following class criteria annotations for field relations and
+array or collection element relations, respectively:
+                </p>
+                <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+                        <p>
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/ClassCriteria.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.ClassCriteria</code></a>
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/ElementClassCriteria.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.ElementClassCriteria</code>
+</a>
+                        </p>
+                    </li></ul></div>
+            </div>
+            <div class="section" title="9.2.4.&nbsp; Strategy"><div class="titlepage"><div><div><h4 class="title" id="strategy">9.2.4.&nbsp;
+                    Strategy
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e14938"></a>
+                <p>
+OpenJPA's
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/Strategy.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.Strategy</code></a>
+extension allows you to specify a custom mapping
+strategy or value handler for a field. See
+<a class="xref" href="ref_guide_mapping_custom.html" title="10.&nbsp; Custom Mappings">Section&nbsp;10, &#8220;
+            Custom Mappings
+        &#8221;</a> for information on custom
+mappings.
+                </p>
+            </div>
+        </div>
+    </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_mapping_limits.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_mapping.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_mapping_custom.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">8.&nbsp;
+            Mapping Limitations
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;10.&nbsp;
+            Custom Mappings
+        </td></tr></table></div></body></html>
\ No newline at end of file

Propchange: websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_ext.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_factory.html
==============================================================================
--- websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_factory.html (added)
+++ websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_factory.html Wed May 14 22:22:23 2014
@@ -0,0 +1,56 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>5.&nbsp; Mapping Factory</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.3 User's Guide"><link rel="up" href="ref_guide_mapping.html" title="Chapter&nbsp;7.&nbsp; Mapping"><link rel="prev" href="ref_guide_mapping_defaults.html" title="4.&nbsp; Mapping Defaults"><link rel="next" href="ref_guide_mapping_notes_nonstdjoins.html" title="6.&nbsp; Non-Standard Joins"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">5.&nbsp;
+            Mapping Factory
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_mapping_defaults.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;7.&nbsp;
+        Mapping
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_mapping_notes_nonstdjoins.html">Next</a></td></tr></table><hr></div><div class="section" title="5.&nbsp; Mapping Factory"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="ref_guide_mapping_factory">5.&nbsp;
+            Mapping Factory
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e14065"></a>
+        <a class="indexterm" name="d5e14067"></a>
+        <p>
+An important decision in the object-relational mapping process is how and where
+to store the data necessary to map your persistent classes to the database
+schema.
+        </p>
+        <p>
+<a class="xref" href="ref_guide_meta.html#ref_guide_meta_factory" title="1.&nbsp; Metadata Factory">Section&nbsp;1, &#8220;
+            Metadata Factory
+        &#8221;</a> introduced OpenJPA's <code class="classname">
+MetaDataFactory</code> interface. OpenJPA uses this same interface to
+abstract the storage and retrieval of mapping information. OpenJPA includes the
+built-in mapping factories below, and you can create your own factory if you
+have custom needs. You control which mapping factory OpenJPA uses with the
+<a class="link" href="ref_guide_conf_jdbc.html#openjpa.jdbc.MappingFactory" title="6.9.&nbsp; openjpa.jdbc.MappingFactory"><code class="literal">
+openjpa.jdbc.MappingFactory</code></a> configuration property.
+        </p>
+        <p>
+The bundled mapping factories are:
+        </p>
+        <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+                <p>
+<code class="literal">-</code>: Leaving the <code class="literal"> openjpa.jdbc.MappingFactory
+</code> property unset allows your metadata factory to take over mappings as
+well.  If you are using the default <code class="literal">jpa</code> metadata factory,
+OpenJPA will read mapping information from your annotations and
+<code class="filename">orm.xml</code> when you leave the mapping factory unspecified.
+                </p>
+            </li></ul></div>
+        <div class="example"><a name="ref_guide_mapping_factory_jpa"></a><p class="title"><b>Example&nbsp;7.13.&nbsp;
+                Standard JPA Configuration
+            </b></p><div class="example-contents">
+            
+            <p>
+In the standard JPA configuration, the mapping factory is left unset.
+            </p>
+<pre class="programlisting">
+&lt;property name="openjpa.MetaDataFactory" value="jpa"/&gt;
+</pre>
+        </div></div><br class="example-break">
+    </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_mapping_defaults.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_mapping.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_mapping_notes_nonstdjoins.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.&nbsp;
+            Mapping Defaults
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;6.&nbsp;
+            Non-Standard Joins
+        </td></tr></table></div></body></html>
\ No newline at end of file

Propchange: websites/production/openjpa/content/builds/2.3.0/apache-openjpa/docs/ref_guide_mapping_factory.html
------------------------------------------------------------------------------
    svn:mime-type = text/plain