openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1004302 [33/41] - in /websites/production/openjpa/content/builds/2.4.2: ./ apache-openjpa/ apache-openjpa/docs/ apache-openjpa/docs/css/ apache-openjpa/docs/img/
Date Fri, 06 Jan 2017 19:19:22 GMT
Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_custom.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_custom.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_custom.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,79 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>7.&nbsp; Custom Log</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_logging.html" title="Chapter&nbsp;3.&nbsp; Logging and Auditing"><link rel="prev" href="ref_guide_logging_slf4j.html" title="6.&nbsp; SLF4J"><link rel="next" href="ref_guide_audit.html" title="8.&nbsp;OpenJPA Audit"></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">7.&nbsp;
+            Custom Log
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_logging_slf4j.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;3.&nbsp;
+        Logging and Auditing
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_audit.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_logging_custom"><div class="titlepage"><div><div><h2 class="title" style="clear: both">7.&nbsp;
+            Custom Log
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e9406"></a>
+        <p>
+If none of available logging systems meet your needs, you can configure the
+logging system with a custom logger. You might use custom logging to integrate
+with a proprietary logging framework used by some applications servers, or for
+logging to a graphical component for GUI applications.
+        </p>
+        <p>
+A custom logging framework must include an implementation of the
+<a class="ulink" href="../javadoc/org/apache/openjpa/lib/log/LogFactory.html" target="_top"><code class="classname">
+org.apache.openjpa.lib.log.LogFactory</code></a> interface. We present
+a custom <code class="classname">LogFactory</code> below.
+        </p>
+        <div class="example" id="ref_guide_logging_custom_ex"><p class="title"><b>Example&nbsp;3.6.&nbsp;
+                Custom Logging Class
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+package com.xyz;
+
+import org.apache.openjpa.lib.log.*;
+
+public class CustomLogFactory
+    implements LogFactory {   
+
+    private String _prefix = "CUSTOM LOG";
+
+    public void setPrefix(String prefix) {
+        _prefix = prefix;
+    }
+ 
+    public Log getLog(String channel) {
+        // Return a simple extension of AbstractLog that will log
+        // everything to the System.err stream. Note that this is 
+        // roughly equivalent to OpenJPA's default logging behavior.
+        return new AbstractLog() {
+
+            protected boolean isEnabled(short logLevel) {
+                // log all levels
+                return true;
+            }
+
+            protected void log(short type, String message, Throwable t) {
+                // just send everything to System.err
+                System.err.println(_prefix + ": " + type + ": "
+                    + message + ": " + t);
+            }
+        };
+    }
+}
+</pre>
+        </div></div><br class="example-break">
+        <p>
+To make OpenJPA use your custom log factory, set the
+<a class="link" href="ref_guide_conf_openjpa.html#openjpa.Log" title="5.44.&nbsp; openjpa.Log"><code class="literal">openjpa.Log</code></a> configuration
+property to your factory's full class name. Because this property is a plugin
+property (see <a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a> ), you can also
+pass parameters to your factory. For example, to use the example factory above
+and set its prefix to "LOG MSG", you would set the <code class="literal">openjpa.Log
+</code> property to the following string:
+        </p>
+<pre class="programlisting">
+com.xyz.CustomLogFactory(Prefix="LOG MSG")
+</pre>
+    </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_logging_slf4j.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_logging.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_audit.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.&nbsp;
+            SLF4J
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;8.&nbsp;OpenJPA Audit</td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_log4j.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_log4j.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_log4j.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,50 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>4.&nbsp; Log4J</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_logging.html" title="Chapter&nbsp;3.&nbsp; Logging and Auditing"><link rel="prev" href="ref_guide_logging_noop.html" title="3.&nbsp; Disabling Logging"><link rel="next" href="ref_guide_logging_commons.html" title="5.&nbsp; Apache Commons Logging"></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">4.&nbsp;
+            Log4J
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_logging_noop.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;3.&nbsp;
+        Logging and Auditing
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_commons.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_logging_log4j"><div class="titlepage"><div><div><h2 class="title" style="clear: both">4.&nbsp;
+            Log4J
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e9350"></a>
+        <p>
+When <code class="literal">openjpa.Log</code> is set to <code class="literal">log4j</code>, OpenJPA
+will delegate to Log4J for logging. In a standalone application, Log4J logging
+levels are controlled by a resource named <code class="filename">log4j.properties</code>
+, which should be available as a top-level resource (either at the top level of
+a jar file, or in the root of one of the <code class="literal">CLASSPATH</code>
+directories). When deploying to a web or EJB application server, Log4J
+configuration is often performed in a <code class="filename">log4j.xml</code> file
+instead of a properties file. For further details on configuring Log4J, please
+see the <a class="ulink" href="http://logging.apache.org/log4j/1.2/manual.html" target="_top">Log4J
+Manual</a>. We present an example <code class="filename">log4j.properties</code> file
+below.
+        </p>
+        <div class="example" id="ref_guide_logging_log4j_ex"><p class="title"><b>Example&nbsp;3.4.&nbsp;
+                Standard Log4J Logging
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+log4j.rootCategory=WARN, console
+log4j.category.openjpa.Tool=INFO
+log4j.category.openjpa.Runtime=INFO
+log4j.category.openjpa.Remote=WARN
+log4j.category.openjpa.DataCache=WARN
+log4j.category.openjpa.MetaData=WARN
+log4j.category.openjpa.Enhance=WARN
+log4j.category.openjpa.Query=WARN
+log4j.category.openjpa.jdbc.SQL=WARN
+log4j.category.openjpa.jdbc.SQLDiag=WARN
+log4j.category.openjpa.jdbc.JDBC=WARN
+log4j.category.openjpa.jdbc.Schema=WARN
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+</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_logging_noop.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_logging.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_commons.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.&nbsp;
+            Disabling Logging
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;5.&nbsp;
+            Apache Commons Logging
+        </td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_noop.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_noop.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_noop.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,26 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>3.&nbsp; Disabling Logging</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_logging.html" title="Chapter&nbsp;3.&nbsp; Logging and Auditing"><link rel="prev" href="ref_guide_logging_openjpa.html" title="2.&nbsp; OpenJPA Logging"><link rel="next" href="ref_guide_logging_log4j.html" title="4.&nbsp; Log4J"></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">3.&nbsp;
+            Disabling Logging
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_logging_openjpa.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;3.&nbsp;
+        Logging and Auditing
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_log4j.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_logging_noop"><div class="titlepage"><div><div><h2 class="title" style="clear: both">3.&nbsp;
+            Disabling Logging
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e9341"></a>
+        <p>
+Disabling logging can be useful to analyze performance without any I/O overhead
+or to reduce verbosity at the console. To do this, set the <code class="literal">openjpa.Log
+</code> property to <code class="literal">none</code>.
+        </p>
+        <p>
+Disabling logging permanently, however, will cause all warnings to be consumed.
+We recommend using one of the more sophisticated mechanisms described in this
+chapter.
+        </p>
+    </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_logging_openjpa.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_logging.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_log4j.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;
+            OpenJPA Logging
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;4.&nbsp;
+            Log4J
+        </td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_openjpa.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_openjpa.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_openjpa.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,83 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>2.&nbsp; OpenJPA Logging</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_logging.html" title="Chapter&nbsp;3.&nbsp; Logging and Auditing"><link rel="prev" href="ref_guide_logging.html" title="Chapter&nbsp;3.&nbsp; Logging and Auditing"><link rel="next" href="ref_guide_logging_noop.html" title="3.&nbsp; Disabling Logging"></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">2.&nbsp;
+            OpenJPA Logging
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_logging.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;3.&nbsp;
+        Logging and Auditing
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_noop.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_logging_openjpa"><div class="titlepage"><div><div><h2 class="title" style="clear: both">2.&nbsp;
+            OpenJPA Logging
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e9295"></a>
+        <p>
+By default, OpenJPA uses a basic logging framework with the following output
+format:
+        </p>
+        <p>
+<code class="literal">millis</code>&nbsp;&nbsp;<code class="literal">diagnostic context</code>&nbsp;&nbsp;<code class="literal">level</code>&nbsp;&nbsp;[<code class="literal">thread name</code>]&nbsp;&nbsp;<code class="literal">channel</code> - <code class="literal">message</code>
+        </p>
+        <p>
+For example, when loading an application that uses OpenJPA, a message like the
+following will be sent to the <code class="literal">openjpa.Runtime</code> channel:
+        </p>
+<pre class="programlisting">
+2107  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.2.0
+</pre>
+        <p>
+The default logging system accepts the following parameters:
+        </p>
+        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+                <p>
+<code class="literal">File</code>: The name of the file to log to, or <code class="literal">stdout
+</code> or <code class="literal">stderr</code> to send messages to standard out and
+standard error, respectively. By default, OpenJPA sends log messages to standard
+error.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">DefaultLevel</code>: The default logging level of unconfigured
+channels. Recognized values are <code class="literal">TRACE, INFO, WARN, ERROR </code> 
+and <code class="literal">FATAL</code>. Defaults to <code class="literal">INFO</code>.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">DiagnosticContext</code>: A string that will be prepended to all
+log messages. If this is not supplied and an <code class="literal">openjpa.Id</code>
+property value is available, that value will be used.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">&lt;channel&gt;</code>: Using the last token of the
+<a class="link" href="ref_guide_logging.html#ref_guide_logging_channels" title="1.&nbsp; Logging Channels">logging channel</a> name, you can
+configure the log level to use for that channel. See the examples below.
+                </p>
+            </li></ul></div>
+        <div class="example" id="ref_guide_logging_openjpa_std_ex"><p class="title"><b>Example&nbsp;3.1.&nbsp;
+                Standard OpenJPA Log Configuration
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+&lt;property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/&gt;
+</pre>
+        </div></div><br class="example-break">
+        <div class="example" id="ref_guide_logging_openjpa_sql_ex"><p class="title"><b>Example&nbsp;3.2.&nbsp;
+                Standard OpenJPA Log Configuration + All SQL Statements
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+&lt;property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/&gt;
+</pre>
+        </div></div><br class="example-break">
+        <div class="example" id="ref_guide_logging_openjpa_file"><p class="title"><b>Example&nbsp;3.3.&nbsp;
+                Logging to a File
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+&lt;property name="openjpa.Log" value="File=/tmp/org.apache.openjpa.log, DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/&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_logging.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_logging.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_noop.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;3.&nbsp;
+        Logging and Auditing
+    &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;3.&nbsp;
+            Disabling Logging
+        </td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_slf4j.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_slf4j.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_logging_slf4j.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,28 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>6.&nbsp; SLF4J</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_logging.html" title="Chapter&nbsp;3.&nbsp; Logging and Auditing"><link rel="prev" href="ref_guide_logging_commons.html" title="5.&nbsp; Apache Commons Logging"><link rel="next" href="ref_guide_logging_custom.html" title="7.&nbsp; Custom Log"></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">6.&nbsp;
+            SLF4J
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_logging_commons.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;3.&nbsp;
+        Logging and Auditing
+    </th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_custom.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_logging_slf4j"><div class="titlepage"><div><div><h2 class="title" style="clear: both">6.&nbsp;
+            SLF4J
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e9393"></a>
+        <p>
+When <code class="literal">openjpa.Log</code> is set to <code class="literal">slf4j</code>, OpenJPA
+will delegate to SLF4J API for logging, which provides several adapters or
+a simple logging mechanism. For further details on logging adapters and
+configuring SLF4J, please see the
+<a class="ulink" href="http://www.slf4j.org/manual.html" target="_top">SLF4J website</a>.
+        </p>
+        <p>
+Note, as SLF4J does not provide a <code class="literal">FATAL</code> log level the
+<code class="literal">SLF4JLogFactory</code> will map it to the <code class="literal">ERROR</code>
+log level.
+        </p>
+    </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ref_guide_logging_commons.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide_logging.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_logging_custom.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.&nbsp;
+            Apache Commons Logging
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;7.&nbsp;
+            Custom Log
+        </td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,456 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>Chapter&nbsp;7.&nbsp; Mapping</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide.html" title="Part&nbsp;3.&nbsp;Reference Guide"><link rel="prev" href="ref_guide_meta_ext.html" title="4.&nbsp; Metadata Extensions"><link rel="next" href="ref_guide_pc_reverse.html" title="2.&nbsp; Reverse Mapping"></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">Chapter&nbsp;7.&nbsp;
+        Mapping
+    </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_meta_ext.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;3.&nbsp;Reference Guide</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ref_guide_pc_reverse.html">Next</a></td></tr></table><hr></div><div class="chapter" id="ref_guide_mapping"><div class="titlepage"><div><div><h2 class="title">Chapter&nbsp;7.&nbsp;
+        Mapping
+    </h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_mapping_mappingtool">1. 
+            Forward Mapping
+        </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_mapping_mappingtool_examples">1.1. 
+                Using the Mapping Tool
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_ddl_examples">1.2. 
+                Generating DDL SQL
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_mapping_synch">1.3. 
+                Runtime Forward Mapping
+            </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_pc_reverse.html">2. 
+            Reverse Mapping
+        </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_pc_reverse.html#ref_guide_pc_reverse_custom">2.1. 
+                Customizing Reverse Mapping
+            </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_middle.html">3. 
+            Meet-in-the-Middle Mapping
+        </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_defaults.html">4. 
+            Mapping Defaults
+        </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_factory.html">5. 
+            Mapping Factory
+        </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_notes_nonstdjoins.html">6. 
+            Non-Standard Joins
+        </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html">7. 
+            Additional JPA Mappings
+        </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_datastoreid">7.1. 
+                Datastore Identity Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_version">7.2. 
+                Surrogate Version Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_columns">7.3. 
+                Multi-Column Mappings
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_fieldjoin">7.4. 
+                Join Column Attribute Targets
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_embed">7.5. 
+                Embedded Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_coll">7.6. 
+                Collections
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_coll_table">7.6.1. 
+                    Container Table
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_coll_joincols">7.6.2. 
+                    Element Join Columns
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_coll_order">7.6.3. 
+                    Order Column
+                </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_onemany">7.7. 
+                One-Sided One-Many Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_map">7.8. 
+                Maps
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_map_keycols">7.8.1. Key Columns</a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_map_keyjoincols">7.8.2. Key Join Columns</a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_map_embedkey">7.8.3. Key Embedded Mapping</a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_map_ex">7.8.4. Examples</a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_constraints">7.9. 
+                Indexes and Constraints
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_index">7.9.1. 
+                    Indexes
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_fk">7.9.2. 
+                    Foreign Keys
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_unique">7.9.3. 
+                    Unique Constraints
+                </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_xmlmapping">7.10. 
+              XML Column Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_jpa.html#ref_guide_streamsupport">7.11. 
+                LOB Streaming
+            </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_limits.html">8. 
+            Mapping Limitations
+        </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_limits.html#ref_guide_mapping_limits_tpc">8.1. 
+                Table Per Class
+            </a></span></dt></dl></dd><dt><span class="section"><a href="ref_guide_mapping_ext.html">9. 
+            Mapping Extensions
+        </a></span></dt><dd><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></dd><dt><span class="section"><a href="ref_guide_mapping_custom.html">10. 
+            Custom Mappings
+        </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_class">10.1. 
+                Custom Class Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_versdiscrim">10.2. 
+                Custom Discriminator and Version Strategies
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_field">10.3. 
+                Custom Field Mapping
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_vhandler">10.3.1. 
+                    Value Handlers
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_fieldstrat">10.3.2. 
+                    Field Strategies
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_field_conf">10.3.3. 
+                    Configuration
+                </a></span></dt></dl></dd></dl></dd><dt><span class="section"><a href="ref_guide_orphan.html">11. 
+            Orphaned Keys
+        </a></span></dt></dl></div>
+    
+    <a class="indexterm" name="d5e13583"></a>
+    <p>
+The JPA Overview's <a class="xref" href="jpa_overview_mapping.html" title="Chapter&nbsp;13.&nbsp; Mapping Metadata">Chapter&nbsp;13, <i>
+        Mapping Metadata
+    </i></a> explains
+object-relational mapping under JPA. This chapter reviews the mapping utilities
+OpenJPA provides and examines OpenJPA features that go beyond the JPA
+specification.
+    </p>
+    <div class="section" id="ref_guide_mapping_mappingtool"><div class="titlepage"><div><div><h2 class="title" style="clear: both">1.&nbsp;
+            Forward Mapping
+        </h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_mapping_mappingtool_examples">1.1. 
+                Using the Mapping Tool
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_ddl_examples">1.2. 
+                Generating DDL SQL
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping.html#ref_guide_mapping_synch">1.3. 
+                Runtime Forward Mapping
+            </a></span></dt></dl></div>
+        
+        <a class="indexterm" name="d5e13589"></a>
+        <a class="indexterm" name="d5e13591"></a>
+        <a class="indexterm" name="d5e13594"></a>
+        <p>
+<span class="emphasis"><em>Forward mapping</em></span> is the process of creating mappings and
+their corresponding database schema from your object model. OpenJPA supports
+forward mapping through the <span class="emphasis"><em>mapping tool</em></span>. The next section
+presents several common mapping tool use cases. You can invoke the tool through
+its Java class,
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/MappingTool" target="_top"><code class="classname">
+org.apache.openjpa.jdbc.meta.MappingTool</code></a>.
+        </p>
+        <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
+            <p>
+<a class="xref" href="ref_guide_integration.html#ref_guide_integration_mappingtool" title="1.4.&nbsp; Mapping Tool Ant Task">Section&nbsp;1.4, &#8220;
+                Mapping Tool Ant Task
+            &#8221;</a> describes the mapping
+tool Ant task.
+            </p>
+        </div>
+        <div class="example" id="ref_guide_mapping_mappingtool_typical"><p class="title"><b>Example&nbsp;7.1.&nbsp;
+                Using the Mapping Tool
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
+</pre>
+        </div></div><br class="example-break">
+        <p>
+In addition to the universal flags of the
+<a class="link" href="ref_guide_conf_devtools.html" title="3.&nbsp; Command Line Configuration">configuration framework</a>, the
+mapping tool accepts the following command line arguments:
+        </p>
+        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+                <p>
+<code class="literal">-schemaAction/-sa &lt;add | refresh | drop | build | retain | reflect | createDB | dropDB | import | export | none&gt;
+</code>: The action to take on the schema. These options correspond to the
+same-named actions on the schema tool described in
+<a class="xref" href="ref_guide_schema_schematool.html" title="13.&nbsp; Schema Tool">Section&nbsp;13, &#8220;
+            Schema Tool
+        &#8221;</a>. Actions can be composed in a
+comma-separated list. Unless you are running the mapping tool on all of
+your persistent types at once or dropping a mapping, we strongly
+recommend you use the default <code class="literal">add</code> action or the
+<code class="literal">build</code> action. Otherwise you may end up inadvertently
+dropping schema components that are used by classes you are not
+currently running the tool over.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-schemaFile/-sf &lt;stdout | output file&gt;</code>: Use this
+option to write the planned schema to an XML document rather than modify the
+database. The document can then be manipulated and committed to the database
+with the <a class="link" href="ref_guide_schema_schematool.html" title="13.&nbsp; Schema Tool"> schema tool</a>.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-sqlFile/-sql &lt;stdout | output file&gt;</code>: Use this option
+to write the planned schema modifications to a SQL script rather than modify the
+database. Combine this with a <code class="literal">schemaAction</code> of <code class="literal">build
+</code> to generate a script that recreates the schema for the current
+mappings, even if the schema already exists.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-sqlEncode/-se &lt;encoding&gt;</code>: Use this option
+with <code class="literal">-sqlFile</code> to write the SQL script in a different
+Java character set encoding than the default JVM locale, such as
+<code class="literal">-sqlTerminator/-st &lt;terminal&gt;</code>: Use this option
+with <code class="literal">-sqlFile</code> to write the SQL terminating with a 
+different character instead of a semicolon.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-dropTables/-dt &lt;true/t | false/f&gt;</code>: Corresponds to the
+same-named option on the schema tool.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-dropSequences/-dsq &lt;true/t | false/f&gt;</code>: Corresponds to
+the same-named option on the schema tool.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-openjpaTables/-ot &lt;true/t | false/f&gt;</code>: Corresponds to
+the same-named option on the schema tool.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-ignoreErrors/-i &lt;true/t | false/f&gt;</code>: Corresponds to
+the same-named option on the schema tool.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-schemas/-s &lt;schema and table names&gt;</code>: Corresponds to
+the same-named option on the schema tool. This option is ignored if <code class="literal">
+readSchema</code> is not set to <code class="literal">true</code>.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-readSchema/-rs &lt;true/t | false/f&gt;</code>: Set this option to
+<code class="literal">true</code> to read the entire existing schema when the tool runs.
+Reading the existing schema ensures that OpenJPA does not generate any mappings
+that use table, index, primary key, or foreign key names that conflict with
+existing names. Depending on the JDBC driver, though, it can be a slow process
+for large schemas.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-primaryKeys/-pk &lt;true/t | false/f&gt;</code>: Whether to read
+and manipulate primary key information of existing tables. Defaults to false.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-foreignKeys/-fk &lt;true/t | false/f&gt;</code>: Whether to read
+and manipulate foreign key information of existing tables. Defaults to false.
+This means that to add any new foreign keys to a class that has already been
+mapped, you must explicitly set this flag to true.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-indexes/-ix &lt;true/t | false/f&gt;</code>: Whether to read and
+manipulate index information of existing tables. Defaults to false. This means
+that to add any new indexes to a class that has already been mapped once, you
+must explicitly set this flag to true.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-sequences/-sq &lt;true/t | false/f&gt;</code>: Whether to
+manipulate sequences. Defaults to true.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">-meta/-m &lt;true/t | false/f&gt;</code>: Whether the given action
+applies to metadata rather than or in addition to mappings.
+                </p>
+            </li></ul></div>
+        <p>
+The mapping tool also uses an <code class="literal">-action/-a</code> argument to specify
+the action to take on each class. The available actions are:
+        </p>
+        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+                <p>
+<code class="literal">buildSchema</code>: This is the default action. It
+makes the database schema match your existing mappings. If your provided
+mappings conflict with your class definitions, OpenJPA will fail with an
+informative exception.
+                </p>
+            </li><li class="listitem">
+                <p>
+<code class="literal">validate</code>: Ensure that the mappings for the given classes are
+valid and that they match the schema. No mappings or tables will be changed. An
+exception is thrown if any mappings are invalid.
+                </p>
+            </li></ul></div>
+        <p>
+Each additional argument to the tool should be one of:
+        </p>
+        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+                <p>
+The full name of a persistent class.
+                </p>
+            </li><li class="listitem">
+                <p>
+The .java file for a persistent class.
+                </p>
+            </li><li class="listitem">
+                <p>
+The <code class="filename">.class</code> file of a persistent class.
+                </p>
+            </li></ul></div>
+        <p>
+If you do not supply any arguments to the mapping tool, it will run on the
+classes in your persistent classes list (see
+<a class="xref" href="ref_guide_pc.html#ref_guide_pc_pcclasses" title="1.&nbsp; Persistent Class List">Section&nbsp;1, &#8220;
+            Persistent Class List
+        &#8221;</a>).
+        </p>
+        <p>
+The mappings generated by the mapping tool are stored by the system <span class="emphasis"><em>
+mapping factory</em></span>. <a class="xref" href="ref_guide_mapping_factory.html" title="5.&nbsp; Mapping Factory">Section&nbsp;5, &#8220;
+            Mapping Factory
+        &#8221;</a>
+discusses your mapping factory options.
+        </p>
+        <div class="section" id="ref_guide_mapping_mappingtool_examples"><div class="titlepage"><div><div><h3 class="title">1.1.&nbsp;
+                Using the Mapping Tool
+            </h3></div></div></div>
+            
+            <a class="indexterm" name="d5e13694"></a>
+            <p>
+The JPA specification defines a comprehensive set of defaults for missing
+mapping information. Thus, forward mapping in JPA is virtually automatic. After
+using the mapping annotations covered in <a class="xref" href="jpa_overview_mapping.html" title="Chapter&nbsp;13.&nbsp; Mapping Metadata">Chapter&nbsp;13, <i>
+        Mapping Metadata
+    </i></a>
+of the JPA Overview to override any unsatisfactory defaults, run the
+mapping tool on your persistent classes.  The default <code class="literal">buildSchema
+</code> mapping tool action manipulates the database schema to
+match your mappings. It fails if any of your mappings don't match your object
+model.
+            </p>
+            <div class="example" id="ref_guide_mapping_mappingtool_buildschema"><p class="title"><b>Example&nbsp;7.2.&nbsp;
+                    Creating the Relational Schema from Mappings
+                </b></p><div class="example-contents">
+                
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
+</pre>
+            </div></div><br class="example-break">
+            <p>
+To drop the schema for a persistent class, set the mapping tool's <code class="literal">
+schemaAction</code> to <code class="literal">drop</code>.
+            </p>
+            <div class="example" id="ref_guide_mapping_mappingtool_cleanup_tables"><p class="title"><b>Example&nbsp;7.3.&nbsp;
+                    Refreshing entire schema and cleaning out tables
+                </b></p><div class="example-contents">
+                
+	            <a class="indexterm" name="d5e13708"></a>
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool -schemaAction add,deleteTableContents
+</pre>
+            </div></div><br class="example-break">
+            <div class="example" id="ref_guide_mapping_mappingtool_dropschema"><p class="title"><b>Example&nbsp;7.4.&nbsp;
+                    Dropping Mappings and Association Schema
+                </b></p><div class="example-contents">
+                
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool -schemaAction drop Magazine.java
+</pre>
+            </div></div><br class="example-break">
+        </div>
+        <div class="section" id="ref_guide_ddl_examples"><div class="titlepage"><div><div><h3 class="title">1.2.&nbsp;
+                Generating DDL SQL
+            </h3></div></div></div>
+            
+            <a class="indexterm" name="d5e13717"></a>
+            <a class="indexterm" name="d5e13720"></a>
+            <p>
+The examples below show how to use the mapping tool to generate DDL SQL scripts,
+rather than modifying the database directly.
+            </p>
+            <div class="example" id="ref_guid_mapping_ddl_full_ddl"><p class="title"><b>Example&nbsp;7.5.&nbsp;
+                    Create DDL for Current Mappings
+                </b></p><div class="example-contents">
+                
+                <p>
+This example uses your existing mappings to determine the needed schema, then
+writes the SQL to create that schema to <code class="filename">create.sql</code>.
+                </p>
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool -schemaAction build -sql create.sql Magazine.java
+</pre>
+            </div></div><br class="example-break">
+            <div class="example" id="ref_guid_mapping_ddl_part_ddl"><p class="title"><b>Example&nbsp;7.6.&nbsp;
+                    Create DDL to Update Database for Current Mappings
+                </b></p><div class="example-contents">
+                
+                <p>
+This example uses your existing mappings to determine the needed schema. It then
+writes the SQL to add any missing tables and columns to the current schema to
+<code class="filename">update.sql</code>.
+                </p>
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool -sql update.sql Magazine.java
+</pre>
+            </div></div><br class="example-break">
+        </div>
+        <div class="section" id="ref_guide_mapping_synch"><div class="titlepage"><div><div><h3 class="title">1.3.&nbsp;
+                Runtime Forward Mapping
+            </h3></div></div></div>
+            
+            <a class="indexterm" name="d5e13736"></a>
+            <a class="indexterm" name="d5e13739"></a>
+            <p>
+You can configure OpenJPA to automatically run the mapping tool at runtime
+through the <a class="link" href="ref_guide_conf_jdbc.html#openjpa.jdbc.SynchronizeMappings" title="6.17.&nbsp; openjpa.jdbc.SynchronizeMappings"><code class="literal">
+openjpa.jdbc.SynchronizeMappings</code></a> configuration property. Using
+this property saves you the trouble of running the mapping tool manually, and is
+meant for use during rapid test/debug cycles.
+            </p>
+            <p>
+In order to enable automatic runtime mapping, you must first list all your
+persistent classes as described in <a class="xref" href="ref_guide_pc.html#ref_guide_pc_pcclasses" title="1.&nbsp; Persistent Class List">Section&nbsp;1, &#8220;
+            Persistent Class List
+        &#8221;</a>.
+            </p>
+            <p>
+OpenJPA will run the mapping tool on these classes when your application obtains
+its first <code class="classname">EntityManager</code>.
+            </p>
+            <p>
+The <code class="literal">openjpa.jdbc.SynchronizeMappings</code> property is a plugin
+string (see <a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>) where the class
+name is the mapping tool action to invoke, and the properties are the
+<code class="classname">MappingTool</code> class' JavaBean properties. These properties
+correspond go the long versions of the tool's command line flags.
+            </p>
+            <div class="example" id="ref_guide_mapping_synchex"><p class="title"><b>Example&nbsp;7.7.&nbsp;
+                    Configuring Runtime Forward Mapping
+                </b></p><div class="example-contents">
+                
+<pre class="programlisting">
+&lt;property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/&gt;
+</pre>
+                <p>
+The setting above corresponds to running the following command:
+                </p>
+<pre class="programlisting">
+java org.apache.openjpa.jdbc.meta.MappingTool -action buildSchema -foreignKeys true
+</pre>
+            </div></div><br class="example-break">
+        </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_meta_ext.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ref_guide.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ref_guide_pc_reverse.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.&nbsp;
+            Metadata Extensions
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;2.&nbsp;
+            Reverse Mapping
+        </td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping_custom.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping_custom.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping_custom.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,174 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>10.&nbsp; Custom Mappings</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_mapping.html" title="Chapter&nbsp;7.&nbsp; Mapping"><link rel="prev" href="ref_guide_mapping_ext.html" title="9.&nbsp; Mapping Extensions"><link rel="next" href="ref_guide_orphan.html" title="11.&nbsp; Orphaned Keys"></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">10.&nbsp;
+            Custom Mappings
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_mapping_ext.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_orphan.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_mapping_custom"><div class="titlepage"><div><div><h2 class="title" style="clear: both">10.&nbsp;
+            Custom Mappings
+        </h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_class">10.1. 
+                Custom Class Mapping
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_versdiscrim">10.2. 
+                Custom Discriminator and Version Strategies
+            </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_field">10.3. 
+                Custom Field Mapping
+            </a></span></dt><dd><dl><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_vhandler">10.3.1. 
+                    Value Handlers
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_fieldstrat">10.3.2. 
+                    Field Strategies
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_field_conf">10.3.3. 
+                    Configuration
+                </a></span></dt></dl></dd></dl></div>
+        
+        <a class="indexterm" name="d5e15057"></a>
+        <a class="indexterm" name="d5e15059"></a>
+        <p>
+In OpenJPA, you are not limited to the set of standard mappings defined by the
+specification. OpenJPA allows you to define custom class, discriminator,
+version, and field mapping strategies with all the power of OpenJPA's built-in
+strategies.
+        </p>
+        <div class="section" id="ref_guide_mapping_custom_class"><div class="titlepage"><div><div><h3 class="title">10.1.&nbsp;
+                Custom Class Mapping
+            </h3></div></div></div>
+            
+            <p>
+To create a custom class mapping, write an implementation of the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/ClassStrategy.html" target="_top">
+<code class="classname">org.apache.openjpa.jdbc.meta.ClassStrategy</code></a>
+interface. You will probably want to extend one of the existing abstract or
+concrete strategies in the <code class="literal">org.apache.openjpa.jdbc.meta.strats
+</code> package.
+            </p>
+            <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>
+annotation allows you to declare a custom class mapping strategy in JPA mapping
+metadata. Set the value of the annotation to the full class name of your custom
+strategy. You can configure your strategy class' bean properties using
+OpenJPA's plugin syntax, detailed in <a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>.
+            </p>
+        </div>
+        <div class="section" id="ref_guide_mapping_custom_versdiscrim"><div class="titlepage"><div><div><h3 class="title">10.2.&nbsp;
+                Custom Discriminator and Version Strategies
+            </h3></div></div></div>
+            
+            <p>
+To define a custom discriminator or version strategy, implement the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/DiscriminatorStrategy.html" target="_top">
+<code class="classname">org.apache.openjpa.jdbc.meta.DiscriminatorStrategy</code>
+</a> or
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/VersionStrategy.html" target="_top">
+<code class="classname">org.apache.openjpa.jdbc.meta.VersionStrategy</code></a>
+interface, respectively. You might extend one of the existing abstract or
+concrete strategies in the <code class="literal">org.apache.openjpa.jdbc.meta.strats
+</code> package.
+            </p>
+            <p>
+OpenJPA includes 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> and
+<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 annotations for declaring a custom discriminator or version
+strategy in JPA mapping metadata. Set the string value of these annotations to
+the full class name of your implementation, or to the class name or alias of an
+existing OpenJPA implementation.
+            </p>
+            <p>
+As with custom class mappings, you can configure your strategy class' bean
+properties using OpenJPA's plugin syntax, detailed in
+<a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>.
+            </p>
+        </div>
+        <div class="section" id="ref_guide_mapping_custom_field"><div class="titlepage"><div><div><h3 class="title">10.3.&nbsp;
+                Custom Field Mapping
+            </h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_vhandler">10.3.1. 
+                    Value Handlers
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_fieldstrat">10.3.2. 
+                    Field Strategies
+                </a></span></dt><dt><span class="section"><a href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_field_conf">10.3.3. 
+                    Configuration
+                </a></span></dt></dl></div>
+            
+            <a class="indexterm" name="d5e15091"></a>
+            <p>
+While custom class, discriminator, and version mapping can be useful, custom
+field mappings are far more common. OpenJPA offers two types of custom field
+mappings: value handlers, and full custom field strategies. The following
+sections examine each.
+            </p>
+            <div class="section" id="ref_guide_mapping_custom_vhandler"><div class="titlepage"><div><div><h4 class="title">10.3.1.&nbsp;
+                    Value Handlers
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e15097"></a>
+                <p>
+Value handlers make it trivial to map any type that you can break down into one
+or more simple values. All value handlers implement the <code class="classname">
+org.apache.openjpa.jdbc.meta.ValueHandler</code> interface; see its
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/ValueHandler.html" target="_top"> Javadoc
+</a> for details.  Also, examine the built-in handlers in the <code class="filename">
+src/openjpa/jdbc/meta/strats</code> directory of your OpenJPA source
+distribution.  Use these functional implementations as examples when you
+create your own value handlers.
+                </p>
+            </div>
+            <div class="section" id="ref_guide_mapping_custom_fieldstrat"><div class="titlepage"><div><div><h4 class="title">10.3.2.&nbsp;
+                    Field Strategies
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e15107"></a>
+                <p>
+OpenJPA interacts with persistent fields through the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/FieldStrategy" target="_top"><code class="classname">
+org.apache.openjpa.jdbc.meta.FieldStrategy</code></a> interface. You
+can implement this interface yourself to create a custom field strategy, or
+extend one of the existing abstract or concrete strategies in the <code class="literal">
+org.apache.openjpa.jdbc.meta.strats</code> package. Creating a custom field
+strategy is more difficult than writing a custom value handler, but gives you
+more freedom in how you interact with the database.
+                </p>
+            </div>
+            <div class="section" id="ref_guide_mapping_custom_field_conf"><div class="titlepage"><div><div><h4 class="title">10.3.3.&nbsp;
+                    Configuration
+                </h4></div></div></div>
+                
+                <a class="indexterm" name="d5e15117"></a>
+                <p>
+OpenJPA gives you two ways to configure your custom field mappings. The
+<code class="literal">FieldStrategies</code> property of the built-in <code class="classname">
+MappingDefaults</code> implementations allows you to globally associate
+field types with their corresponding custom value handler or strategy. OpenJPA
+will automatically use your custom strategies when it encounters a field of the
+associated type. OpenJPA will use your custom value handlers whenever it
+encounters a field of the associated type.
+<a class="xref" href="ref_guide_mapping_defaults.html" title="4.&nbsp; Mapping Defaults">Section&nbsp;4, &#8220;
+            Mapping Defaults
+        &#8221;</a> described mapping
+defaults in detail.
+                </p>
+                <p>
+Your other option is to explicitly install a custom value handler or strategy on
+a particular field. To do so, specify the full name of your implementation class
+in the proper mapping metadata extension. OpenJPA includes 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>
+annotation. You can configure the named strategy or handler's bean
+properties in these extensions using OpenJPA's plugin format (see
+<a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>).
+                </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_ext.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_orphan.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9.&nbsp;
+            Mapping Extensions
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;11.&nbsp;
+            Orphaned Keys
+        </td></tr></table></div></body></html>
\ No newline at end of file

Added: websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping_defaults.html
==============================================================================
--- websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping_defaults.html (added)
+++ websites/production/openjpa/content/builds/2.4.2/apache-openjpa/docs/ref_guide_mapping_defaults.html Fri Jan  6 19:19:20 2017
@@ -0,0 +1,285 @@
+<html><head>
+      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+   <title>4.&nbsp; Mapping Defaults</title><base href="display"><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="manual.html" title="Apache OpenJPA 2.4 User's Guide"><link rel="up" href="ref_guide_mapping.html" title="Chapter&nbsp;7.&nbsp; Mapping"><link rel="prev" href="ref_guide_mapping_middle.html" title="3.&nbsp; Meet-in-the-Middle Mapping"><link rel="next" href="ref_guide_mapping_factory.html" title="5.&nbsp; Mapping Factory"></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">4.&nbsp;
+            Mapping Defaults
+        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ref_guide_mapping_middle.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_factory.html">Next</a></td></tr></table><hr></div><div class="section" id="ref_guide_mapping_defaults"><div class="titlepage"><div><div><h2 class="title" style="clear: both">4.&nbsp;
+            Mapping Defaults
+        </h2></div></div></div>
+        
+        <a class="indexterm" name="d5e14021"></a>
+        <a class="indexterm" name="d5e14023"></a>
+        <p>
+The previous sections showed how to use the mapping tool to generate default
+mappings. But how does the mapping tool know what mappings to generate? The
+answer lies in the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/MappingDefaults.html" target="_top">
+<code class="classname">org.apache.openjpa.jdbc.meta.MappingDefaults</code></a>
+interface. OpenJPA uses an instance of this interface to decide how to name
+tables and columns, where to put foreign keys, and generally how to create a
+schema that matches your object model.
+        </p>
+        <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3>
+            <p>
+OpenJPA relies on foreign key constraint information at runtime to order SQL
+appropriately. Be sure to set your mapping defaults to reflect your existing
+database constraints, set the schema factory to reflect on the database for
+constraint information (see <a class="xref" href="ref_guide_schema_info.html#ref_guide_schema_info_factory" title="12.2.&nbsp; Schema Factory">Section&nbsp;12.2, &#8220;
+                Schema Factory
+            &#8221;</a>),
+or use explicit foreign key mappings as described in
+<a class="xref" href="ref_guide_mapping_jpa.html#ref_guide_mapping_jpa_fk" title="7.9.2.&nbsp; Foreign Keys">Section&nbsp;7.9.2, &#8220;
+                    Foreign Keys
+                &#8221;</a>.
+            </p>
+        </div>
+        <p>
+The <a class="link" href="ref_guide_conf_jdbc.html#openjpa.jdbc.MappingDefaults" title="6.8.&nbsp; openjpa.jdbc.MappingDefaults"><code class="literal">
+openjpa.jdbc.MappingDefaults</code></a> configuration property controls
+the <code class="classname">MappingDefaults</code> interface implementation in use. This
+is a plugin property (see <a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>), so
+you can substitute your own implementation or configure the existing ones.
+OpenJPA includes the following standard implementations:
+        </p>
+        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+                <p>
+<code class="literal">jpa</code>: Provides defaults in compliance with the JPA standard.
+This is an alias for the
+<a class="ulink" href="../javadoc/org/apache/openjpa/persistence/jdbc/PersistenceMappingDefaults.html" target="_top">
+<code class="classname">org.apache.openjpa.persistence.jdbc.PersistenceMappingDefaults
+</code></a> class. This class extends the <code class="classname">
+MappingDefaultsImpl</code> class described below, so it has all the same
+properties (though with different default values), as well as:
+                </p>
+                <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">
+                        <p>
+<code class="literal">PrependFieldNameToJoinTableInverseJoinColumns</code>: Whether to
+prepend the owning field name to the names of inverse join columns in join
+tables.  Defaults to true per the JPA specification.  Set to false for
+compatibility with older OpenJPA versions which did not prepend the field name.
+                        </p>
+                    </li></ul></div>
+            </li><li class="listitem">
+                <p>
+<code class="literal">default</code>: This is an alias for the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/MappingDefaultsImpl.html" target="_top">
+<code class="classname">org.apache.openjpa.jdbc.meta.MappingDefaultsImpl</code></a>
+class. This default implementation is highly configurable. It has the following
+properties:
+                </p>
+                <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">
+                        <p>
+<code class="literal">DefaultMissingInfo</code>: Whether to default missing column and
+table names rather than throw an exception. If set to false, full explicit
+mappings are required at runtime and when using mapping tool actions like
+<code class="literal">buildSchema</code> and <code class="literal">validate</code>.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<a class="indexterm" name="d5e14063"></a>
+<code class="literal">RemoveHungarianNotation</code>: Switches on/off removal of
+Hungarian notation when generating column names.
+Fields such as <code class="literal">mFoobar</code> and <code class="literal">strBarFoo</code>
+would become columns named <code class="literal">foobar</code> and
+<code class="literal">barfoo</code> respectively. OpenJPA will search for the first
+instance of a uppercase character in the field name and then truncate the
+column name to remove anything before it.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">BaseClassStrategy</code>: The default mapping strategy for base
+classes. You can specify a built-in strategy alias or the full class name of a
+<a class="link" href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_class" title="10.1.&nbsp; Custom Class Mapping">custom class strategy</a>.
+You can also use OpenJPA's plugin format (see
+<a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>) to pass arguments to the
+strategy instance. See the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/strats/package-summary.html" target="_top">
+<code class="literal">org.apache.openjpa.jdbc.meta.strats</code></a> package for
+available strategies.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">SubclassStrategy</code>: The default mapping strategy for
+subclasses. You can specify a builtin strategy alias or the full class name of a
+<a class="link" href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_class" title="10.1.&nbsp; Custom Class Mapping"> custom class strategy</a>.
+You can also use OpenJPA's plugin format (see
+<a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>) to pass arguments to the
+strategy instance. Common strategies are <code class="literal">vertical</code> and
+<code class="literal">flat</code>, the default. See the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/strats/package-summary.html" target="_top">
+<code class="literal">org.apache.openjpa.jdbc.meta.strats</code></a> package for all
+available strategies.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">VersionStrategy</code>: The default version strategy for classes
+without a version field. You can specify a builtin strategy alias or the full
+class name of a <a class="link" href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_versdiscrim" title="10.2.&nbsp; Custom Discriminator and Version Strategies"> custom
+version strategy</a>. You can also use OpenJPA's plugin format (see
+<a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>) to pass arguments to the
+strategy instance. Common strategies are <code class="literal">none</code>, <code class="literal">
+state-comparison</code>, <code class="literal"> timestamp</code>, and <code class="literal">
+version-number</code>, the default. See the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/strats/package-summary.html" target="_top">
+<code class="literal">org.apache.openjpa.jdbc.meta.strats</code></a> package for all
+available strategies.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">DiscriminatorStrategy</code>: The default discriminator strategy
+when no discriminator value is given. You can specify a builtin strategy alias
+or the full class name of a
+<a class="link" href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_versdiscrim" title="10.2.&nbsp; Custom Discriminator and Version Strategies"> custom discriminator
+strategy</a>. You can also use OpenJPA's plugin format (see
+<a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a>) to pass arguments to the
+strategy instance. Common strategies are <code class="literal">final</code> for a base
+class without subclasses, <code class="literal">none</code> to use joins to subclass
+tables rather than a discriminator column, and <code class="literal"> class-name</code>,
+the default. See the
+<a class="ulink" href="../javadoc/org/apache/openjpa/jdbc/meta/strats/package-summary.html" target="_top">
+<code class="literal">org.apache.openjpa.jdbc.meta.strats</code></a> package for all
+available strategies.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">FieldStrategies</code>: This property associates field types with
+custom strategies. The format of this property is similar to that of plugin
+strings (see <a class="xref" href="ref_guide_conf_plugins.html" title="4.&nbsp; Plugin Configuration">Section&nbsp;4, &#8220;
+            Plugin Configuration
+        &#8221;</a> ), without the class
+name. It is a comma-separated list of key/value pairs, where each key is a
+possible field type, and each value is itself a plugin string describing the
+strategy for that type. We present an example below. See
+<a class="xref" href="ref_guide_mapping_custom.html#ref_guide_mapping_custom_field" title="10.3.&nbsp; Custom Field Mapping">Section&nbsp;10.3, &#8220;
+                Custom Field Mapping
+            &#8221;</a> for information on custom
+field strategies.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">ForeignKeyDeleteAction</code>: The default delete action of foreign
+keys representing relations to other objects. Recognized values include
+<code class="literal">restrict</code>, <code class="literal">cascade</code>, <code class="literal">null</code>
+, <code class="literal">default</code>. These values correspond exactly to the standard
+database foreign key actions of the same names.
+                        </p>
+                        <p>
+The value <code class="literal">none</code> tells OpenJPA not to create database foreign
+keys on relation columns. This is the default.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">JoinForeignKeyDeleteAction</code>: The default delete action of
+foreign keys that join secondary, collection, map, or subclass tables to
+the primary table. Accepts the same values as the <code class="literal">
+ForeignKeyDeleteAction</code> property above.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">DeferConstraints</code>: Whether to use deferred database
+constraints if possible. Defaults to false.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">IndexLogicalForeignKeys</code>: Boolean property controlling
+whether to create indexes on logical foreign keys. Logical foreign keys are
+columns that represent a link between tables, but have been configured through
+the <code class="literal">ForeignKey</code> properties above not to use a physical
+database foreign key. Defaults to true.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">DataStoreIdColumnName</code>: The default name of datastore
+identity columns.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">DiscriminatorColumnName</code>: The default name of discriminator
+columns.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">IndexDiscriminator</code>: Whether to index the discriminator
+column. Defaults to true.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">VersionColumnName</code>: The default name of version columns.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">IndexVersion</code>: Whether to index the version column. Defaults
+to false.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">AddNullIndicator</code>: Whether to create a synthetic null
+indicator column for embedded mappings. The null indicator column allows OpenJPA
+to distinguish between a null embedded object and one with default values for
+all persistent fields.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">NullIndicatorColumnName</code>: The default name of synthetic null
+indicator columns for embedded objects.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">OrderLists</code>: Whether to create a database ordering column for
+maintaining the order of persistent lists and arrays.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">OrderColumnName</code>: The default name of collection and array
+ordering columns.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">StoreEnumOrdinal</code>: Set to true to store enum fields as
+numeric ordinal values in the database. The default is to store the enum value
+name as a string, which is more robust if the Java enum declaration might be
+rearranged.
+                        </p>
+                    </li><li class="listitem">
+                        <p>
+<code class="literal">StoreUnmappedObjectIdString</code>: Set to true to store the
+stringified identity of related objects when the declared related type is
+unmapped. By default, OpenJPA stores the related object's primary key value(s).
+However, this breaks down if different subclasses of the related type use
+incompatible primary key structures. In that case, stringifying the identity
+value is the better choice.
+                        </p>
+                    </li></ul></div>
+            </li></ul></div>
+        <p>
+The example below turns on foreign key generation during schema creation and
+associates the <code class="classname">org.mag.data.InfoStruct</code> field type with
+the custom <code class="classname">org.mag.mapping.InfoStructHandler</code> value
+handler.
+        </p>
+        <div class="example" id="ref_guide_mapping_defaults_conf"><p class="title"><b>Example&nbsp;7.12.&nbsp;
+                Configuring Mapping Defaults
+            </b></p><div class="example-contents">
+            
+<pre class="programlisting">
+&lt;property name="openjpa.jdbc.MappingDefaults"
+    value="ForeignKeyDeleteAction=restrict,
+    FieldStrategies='org.mag.data.InfoStruct=org.mag.mapping.InfoStructHandler'"/&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_middle.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_factory.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.&nbsp;
+            Meet-in-the-Middle Mapping
+        &nbsp;</td><td width="20%" align="center"><a accesskey="h" href="manual.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;5.&nbsp;
+            Mapping Factory
+        </td></tr></table></div></body></html>
\ No newline at end of file



Mime
View raw message