| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (version 1.7.0_79) on Mon Mar 21 21:59:39 CET 2016 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>CodeGenerator (OpenJPA Parent POM 2.4.1 API)</title> |
| <meta name="date" content="2016-03-21"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CodeGenerator (OpenJPA Parent POM 2.4.1 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CodeGenerator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/openjpa/enhance/ClassRedefiner.html" title="class in org.apache.openjpa.enhance"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/openjpa/enhance/DynamicPersistenceCapable.html" title="interface in org.apache.openjpa.enhance"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/openjpa/enhance/CodeGenerator.html" target="_top">Frames</a></li> |
| <li><a href="CodeGenerator.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.openjpa.enhance</div> |
| <h2 title="Class CodeGenerator" class="title">Class CodeGenerator</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.openjpa.enhance.CodeGenerator</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="strong">CodeGenerator</span> |
| extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Generates Java class code from metadata.</div> |
| <dl><dt><span class="strong">Since:</span></dt> |
| <dd>0.3.0</dd> |
| <dt><span class="strong">Author:</span></dt> |
| <dd>Abe White, Stephen Kim</dd></dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#CodeGenerator(org.apache.openjpa.meta.ClassMetaData)">CodeGenerator</a></strong>(<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a> meta)</code> |
| <div class="block">Constructor.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#CodeGenerator(org.apache.openjpa.conf.OpenJPAConfiguration,%20java.lang.Class)">CodeGenerator</a></strong>(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a> conf, |
| <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> type)</code> |
| <div class="block">Constructor.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#closeClassBrace(org.apache.openjpa.lib.util.CodeFormat)">closeClassBrace</a></strong>(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</code> |
| <div class="block">Append the closing code-level brace to the code; this can be |
| overridden to add code to the bottom of the class.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode()">generateCode</a></strong>()</code> |
| <div class="block">Writes the generated code to the proper directory.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getClassAnnotations()">getClassAnnotations</a></strong>()</code> |
| <div class="block">Return class-level annotations.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getClassCode()">getClassCode</a></strong>()</code> |
| <div class="block">Return a code template for the given class, or null to use the standard |
| system-generated Java code.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCode()">getCode</a></strong>()</code> |
| <div class="block">Return the generated code, or null if <a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode()"><code>generateCode()</code></a> has not |
| been called.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCodeDirectory()">getCodeDirectory</a></strong>()</code> |
| <div class="block">The directory to write source to.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCodeFormat()">getCodeFormat</a></strong>()</code> |
| <div class="block">The code formatter for the generated Java code.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getDeclaration(org.apache.openjpa.meta.FieldMetaData)">getDeclaration</a></strong>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return a code template for the declaration of the given field, or null |
| to use the system-generated default Java code.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFieldAnnotations(org.apache.openjpa.meta.FieldMetaData)">getFieldAnnotations</a></strong>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return field-level annotations.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFieldCode(org.apache.openjpa.meta.FieldMetaData)">getFieldCode</a></strong>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return a code template for the get/set methods of the given field, or |
| null to use the system-generated default Java code.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFile()">getFile</a></strong>()</code> |
| <div class="block">Return Java file to write to.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getImportPackages()">getImportPackages</a></strong>()</code> |
| <div class="block">Returns the set of packages that needs to be imported for this code.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getInitialValue(org.apache.openjpa.meta.FieldMetaData)">getInitialValue</a></strong>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return code for the initial value for the given field, or null to use |
| the default generated by the system.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getMetaData()">getMetaData</a></strong>()</code> |
| <div class="block">Return metadata for the type being generated.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getType()">getType</a></strong>()</code> |
| <div class="block">Return the type being generated.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#newCodeFormat()">newCodeFormat</a></strong>()</code> |
| <div class="block">Return a copy of the internal code format.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#openClassBrace(org.apache.openjpa.lib.util.CodeFormat)">openClassBrace</a></strong>(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</code> |
| <div class="block">Append the opening code-level brace to the code; this can be |
| overridden to add code to the top of the class.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#setCodeFormat(org.apache.openjpa.lib.util.CodeFormat)">setCodeFormat</a></strong>(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> format)</code> |
| <div class="block">Set the code formatter for the generated Java code.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#setDirectory(java.io.File)">setDirectory</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> dir)</code> |
| <div class="block">The directory to write source to.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#useGenericCollections()">useGenericCollections</a></strong>()</code> |
| <div class="block">Whether to use generic collections on one-to-many and many-to-many |
| relations instead of untyped collections.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#usePropertyBasedAccess()">usePropertyBasedAccess</a></strong>()</code> |
| <div class="block">Whether to use property-based access on generated code.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#writeCode()">writeCode</a></strong>()</code> |
| <div class="block">Write the generated code to the proper file.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#writeCode(java.io.Writer)">writeCode</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out)</code> |
| <div class="block">Write the code to the specified <a href="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor_detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="CodeGenerator(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CodeGenerator</h4> |
| <pre>public CodeGenerator(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a> conf, |
| <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> type)</pre> |
| <div class="block">Constructor. Supply configuration and class to generate code for.</div> |
| </li> |
| </ul> |
| <a name="CodeGenerator(org.apache.openjpa.meta.ClassMetaData)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>CodeGenerator</h4> |
| <pre>public CodeGenerator(<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a> meta)</pre> |
| <div class="block">Constructor. Supply configuration and metadata to generate code for.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getCodeDirectory()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCodeDirectory</h4> |
| <pre>public <a href="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> getCodeDirectory()</pre> |
| <div class="block">The directory to write source to. Defaults to the current directory. |
| If the given directory does not match the package of the metadata, the |
| package structure will be created below the directory.</div> |
| </li> |
| </ul> |
| <a name="setDirectory(java.io.File)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDirectory</h4> |
| <pre>public void setDirectory(<a href="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> dir)</pre> |
| <div class="block">The directory to write source to. Defaults to the current directory. |
| If the given directory does not match the package of the metadata, the |
| package structure will be created below the directory.</div> |
| </li> |
| </ul> |
| <a name="getCodeFormat()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCodeFormat</h4> |
| <pre>public <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> getCodeFormat()</pre> |
| <div class="block">The code formatter for the generated Java code.</div> |
| </li> |
| </ul> |
| <a name="setCodeFormat(org.apache.openjpa.lib.util.CodeFormat)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCodeFormat</h4> |
| <pre>public void setCodeFormat(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> format)</pre> |
| <div class="block">Set the code formatter for the generated Java code.</div> |
| </li> |
| </ul> |
| <a name="getType()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getType</h4> |
| <pre>public <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> getType()</pre> |
| <div class="block">Return the type being generated.</div> |
| </li> |
| </ul> |
| <a name="getMetaData()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMetaData</h4> |
| <pre>public <a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a> getMetaData()</pre> |
| <div class="block">Return metadata for the type being generated.</div> |
| </li> |
| </ul> |
| <a name="getCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCode</h4> |
| <pre>public <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getCode()</pre> |
| <div class="block">Return the generated code, or null if <a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode()"><code>generateCode()</code></a> has not |
| been called.</div> |
| </li> |
| </ul> |
| <a name="generateCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateCode</h4> |
| <pre>public void generateCode()</pre> |
| <div class="block">Writes the generated code to the proper directory.</div> |
| </li> |
| </ul> |
| <a name="writeCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeCode</h4> |
| <pre>public void writeCode() |
| throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write the generated code to the proper file.</div> |
| <dl><dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="writeCode(java.io.Writer)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeCode</h4> |
| <pre>public void writeCode(<a href="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out) |
| throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write the code to the specified <a href="http://download.oracle.com/javase/6/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a>.</div> |
| <dl><dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="getImportPackages()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getImportPackages</h4> |
| <pre>public <a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a> getImportPackages()</pre> |
| <div class="block">Returns the set of packages that needs to be imported for this code.</div> |
| </li> |
| </ul> |
| <a name="openClassBrace(org.apache.openjpa.lib.util.CodeFormat)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>openClassBrace</h4> |
| <pre>protected void openClassBrace(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</pre> |
| <div class="block">Append the opening code-level brace to the code; this can be |
| overridden to add code to the top of the class.</div> |
| </li> |
| </ul> |
| <a name="closeClassBrace(org.apache.openjpa.lib.util.CodeFormat)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>closeClassBrace</h4> |
| <pre>protected void closeClassBrace(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</pre> |
| <div class="block">Append the closing code-level brace to the code; this can be |
| overridden to add code to the bottom of the class.</div> |
| </li> |
| </ul> |
| <a name="getFile()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFile</h4> |
| <pre>public <a href="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> getFile()</pre> |
| <div class="block">Return Java file to write to.</div> |
| </li> |
| </ul> |
| <a name="newCodeFormat()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newCodeFormat</h4> |
| <pre>protected <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> newCodeFormat()</pre> |
| <div class="block">Return a copy of the internal code format.</div> |
| </li> |
| </ul> |
| <a name="getClassCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClassCode</h4> |
| <pre>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getClassCode()</pre> |
| <div class="block">Return a code template for the given class, or null to use the standard |
| system-generated Java code. To facilitate template reuse, the |
| following parameters can appear in the template; the proper values |
| will be subtituted by the system: |
| <ul> |
| <li>${packageDec}: The package declaration, in the form |
| "package <package name >;", or empty string if no package.</li> |
| <li>${imports}: Imports for the packages used by the declared |
| field types.</li> |
| <li>${className}: The name of the class, without package.</li> |
| <li>${extendsDec}: Extends declaration, in the form |
| "extends <superclass>", or empty string if no superclass.</li> |
| <li>${constructor}: A constructor that takes in all primary key fields |
| of the class, or empty string if the class uses datastore identity.</li> |
| <li>${fieldDecs}: Declarations of all the declared fields.</li> |
| <li>${fieldCode}: Get/set methods for all the declared fields.</li> |
| </ul> Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getInitialValue(org.apache.openjpa.meta.FieldMetaData)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInitialValue</h4> |
| <pre>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getInitialValue(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return code for the initial value for the given field, or null to use |
| the default generated by the system. Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getDeclaration(org.apache.openjpa.meta.FieldMetaData)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDeclaration</h4> |
| <pre>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDeclaration(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return a code template for the declaration of the given field, or null |
| to use the system-generated default Java code. |
| To facilitate template reuse, the following parameters can appear in |
| your template; the proper values will be subtituted by the system: |
| <ul> |
| <li>${fieldName}: The name of the field.</li> |
| <li>${capFieldName}: The capitalized field name.</li> |
| <li>${propertyName}: The field name without leading '_', if any.</li> |
| <li>${fieldType}: The field's type name.</li> |
| <li>${keyType}: Key type name for maps, null otherwise.</li> |
| <li>${elementType}: Element type name for collections, null otherwise. |
| </li> |
| <li>${fieldValue}: The field's initial value, in the form |
| " = <value>", or empty string if none.</li> |
| </ul> Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getFieldCode(org.apache.openjpa.meta.FieldMetaData)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFieldCode</h4> |
| <pre>protected <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getFieldCode(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return a code template for the get/set methods of the given field, or |
| null to use the system-generated default Java code. |
| To facilitate template reuse, the following parameters can appear in |
| your template; the proper values will be subtituted by the system: |
| <ul> |
| <li>${fieldName}: The name of the field.</li> |
| <li>${capFieldName}: The capitalized field name.</li> |
| <li>${propertyName}: The field name without leading '_', if any.</li> |
| <li>${fieldType}: The field's type name.</li> |
| <li>${keyType}: Key type name for maps, null otherwise.</li> |
| <li>${elementType}: Element type name for collections, null otherwise. |
| </li> |
| <li>${fieldValue}: The field's initial value, in the form |
| "= <value>", or empty string if none.</li> |
| </ul></div> |
| </li> |
| </ul> |
| <a name="usePropertyBasedAccess()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>usePropertyBasedAccess</h4> |
| <pre>protected boolean usePropertyBasedAccess()</pre> |
| <div class="block">Whether to use property-based access on generated code. |
| Defaults to false (field-based).</div> |
| </li> |
| </ul> |
| <a name="getClassAnnotations()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClassAnnotations</h4> |
| <pre>protected <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a> getClassAnnotations()</pre> |
| <div class="block">Return class-level annotations. Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getFieldAnnotations(org.apache.openjpa.meta.FieldMetaData)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFieldAnnotations</h4> |
| <pre>protected <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a> getFieldAnnotations(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return field-level annotations. Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="useGenericCollections()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>useGenericCollections</h4> |
| <pre>protected boolean useGenericCollections()</pre> |
| <div class="block">Whether to use generic collections on one-to-many and many-to-many |
| relations instead of untyped collections. |
| |
| Override in descendants to change default behavior.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CodeGenerator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/openjpa/enhance/ClassRedefiner.html" title="class in org.apache.openjpa.enhance"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/openjpa/enhance/DynamicPersistenceCapable.html" title="interface in org.apache.openjpa.enhance"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/openjpa/enhance/CodeGenerator.html" target="_top">Frames</a></li> |
| <li><a href="CodeGenerator.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor_summary">Constr</a> | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor_detail">Constr</a> | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2006–2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |