blob: f586f04f560f80e1eaffc0180ec665d7ab04924b [file] [log] [blame]
<!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>ApplicationIdTool (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="ApplicationIdTool (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/ApplicationIdTool.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>Prev Class</li>
<li><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.Flags.html" title="class 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/ApplicationIdTool.html" target="_top">Frames</a></li>
<li><a href="ApplicationIdTool.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 ApplicationIdTool" class="title">Class ApplicationIdTool</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.ApplicationIdTool</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">ApplicationIdTool</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 a class appropriate for use as an application identity class.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Patrick Linskey, Abe White</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.Flags.html" title="class in org.apache.openjpa.enhance">ApplicationIdTool.Flags</a></strong></code>
<div class="block">Run flags.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.ObjectIdLoader.html" title="interface in org.apache.openjpa.enhance">ApplicationIdTool.ObjectIdLoader</a></strong></code>
<div class="block">Interface implemented by metadata factories that can load non-existant
object id classes.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <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/ApplicationIdTool.html#TOKEN_DEFAULT">TOKEN_DEFAULT</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== 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">&nbsp;</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/ApplicationIdTool.html#ApplicationIdTool(org.apache.openjpa.conf.OpenJPAConfiguration,%20java.lang.Class)">ApplicationIdTool</a></strong>(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;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>&nbsp;type)</code>
<div class="block">Constructs a new ApplicationIdTool capable of generating an
object id class for <code>type</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#ApplicationIdTool(org.apache.openjpa.conf.OpenJPAConfiguration,%20java.lang.Class,%20org.apache.openjpa.meta.ClassMetaData)">ApplicationIdTool</a></strong>(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;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>&nbsp;type,
<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a>&nbsp;meta)</code>
<div class="block">Constructs a new tool instance capable of generating an
object id class for <code>meta</code>.</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">&nbsp;</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><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/ApplicationIdTool.html#getCode()">getCode</a></strong>()</code>
<div class="block">Return the code generated for the application id, or null
if invalid class or the <a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#run()"><code>run()</code></a> method has not been called.</div>
</td>
</tr>
<tr class="rowColor">
<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/ApplicationIdTool.html#getCodeFormat()">getCodeFormat</a></strong>()</code>
<div class="block">The code formatter for the generated 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/ApplicationIdTool.html#getDirectory()">getDirectory</a></strong>()</code>
<div class="block">The directory to write source to.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#getIgnoreErrors()">getIgnoreErrors</a></strong>()</code>
<div class="block">Return false if this tool is configured to throw an exception on
an attempt to generate an id class for a type that does not use
application identity.</div>
</td>
</tr>
<tr class="altColor">
<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/ApplicationIdTool.html#getImportPackages()">getImportPackages</a></strong>()</code>
<div class="block">Returns the collection of packages that need to be imported.</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/ApplicationIdTool.html#getMetaData()">getMetaData</a></strong>()</code>
<div class="block">Return metadata for the type we are generating an application id for.</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/ApplicationIdTool.html#getToken()">getToken</a></strong>()</code>
<div class="block">The token to use to separate stringified primary key field values.</div>
</td>
</tr>
<tr class="rowColor">
<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/ApplicationIdTool.html#getType()">getType</a></strong>()</code>
<div class="block">Return the type we are generating an application id for.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><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></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#getWriter()">getWriter</a></strong>()</code>
<div class="block">The writer to write source to, or null to write to default file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#isInnerClass()">isInnerClass</a></strong>()</code>
<div class="block">Returns true if the application identity class should be an inner class.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#main(java.lang.String[])">main</a></strong>(<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>[]&nbsp;args)</code>
<div class="block">Usage: java org.apache.openjpa.enhance.ApplicationIdTool [option]*
&lt;class name | .java file | .class file | .jdo file&gt;+
Where the following options are recognized.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#record()">record</a></strong>()</code>
<div class="block">Writes the generated code to the proper file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#run()">run</a></strong>()</code>
<div class="block">Generates the sourcecode for the application id class; returns
false if the class is invalid.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#run(org.apache.openjpa.conf.OpenJPAConfiguration,%20java.lang.String[],%20org.apache.openjpa.enhance.ApplicationIdTool.Flags,%20java.lang.ClassLoader)">run</a></strong>(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;conf,
<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>[]&nbsp;args,
<a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.Flags.html" title="class in org.apache.openjpa.enhance">ApplicationIdTool.Flags</a>&nbsp;flags,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;loader)</code>
<div class="block">Run the tool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#run(org.apache.openjpa.conf.OpenJPAConfiguration,%20java.lang.String[],%20org.apache.openjpa.lib.util.Options)">run</a></strong>(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;conf,
<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>[]&nbsp;args,
<a href="../../../../org/apache/openjpa/lib/util/Options.html" title="class in org.apache.openjpa.lib.util">Options</a>&nbsp;opts)</code>
<div class="block">Run the application id tool with the given command-line and
given configuration.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.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>&nbsp;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/ApplicationIdTool.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>&nbsp;dir)</code>
<div class="block">The directory to write source to.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#setIgnoreErrors(boolean)">setIgnoreErrors</a></strong>(boolean&nbsp;ignore)</code>
<div class="block">Set to false if this tool should throw an exception on
an attempt to generate an id class for a type that does not use
application identity.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#setToken(java.lang.String)">setToken</a></strong>(<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>&nbsp;token)</code>
<div class="block">The token to use to separate stringified primary key field values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#setWriter(java.io.Writer)">setWriter</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>&nbsp;writer)</code>
<div class="block">The writer to write source to, or null to write to default file.</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&nbsp;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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="TOKEN_DEFAULT">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TOKEN_DEFAULT</h4>
<pre>public static final&nbsp;<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> TOKEN_DEFAULT</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.openjpa.enhance.ApplicationIdTool.TOKEN_DEFAULT">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="ApplicationIdTool(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ApplicationIdTool</h4>
<pre>public&nbsp;ApplicationIdTool(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;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>&nbsp;type)</pre>
<div class="block">Constructs a new ApplicationIdTool capable of generating an
object id class for <code>type</code>.</div>
</li>
</ul>
<a name="ApplicationIdTool(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.Class, org.apache.openjpa.meta.ClassMetaData)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ApplicationIdTool</h4>
<pre>public&nbsp;ApplicationIdTool(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;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>&nbsp;type,
<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a>&nbsp;meta)</pre>
<div class="block">Constructs a new tool instance capable of generating an
object id class for <code>meta</code>.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getIgnoreErrors()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIgnoreErrors</h4>
<pre>public&nbsp;boolean&nbsp;getIgnoreErrors()</pre>
<div class="block">Return false if this tool is configured to throw an exception on
an attempt to generate an id class for a type that does not use
application identity.</div>
</li>
</ul>
<a name="setIgnoreErrors(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIgnoreErrors</h4>
<pre>public&nbsp;void&nbsp;setIgnoreErrors(boolean&nbsp;ignore)</pre>
<div class="block">Set to false if this tool should throw an exception on
an attempt to generate an id class for a type that does not use
application identity.</div>
</li>
</ul>
<a name="getCodeFormat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCodeFormat</h4>
<pre>public&nbsp;<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a>&nbsp;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&nbsp;void&nbsp;setCodeFormat(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a>&nbsp;format)</pre>
<div class="block">Set the code formatter for the generated Java code.</div>
</li>
</ul>
<a name="getDirectory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDirectory</h4>
<pre>public&nbsp;<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>&nbsp;getDirectory()</pre>
<div class="block">The directory to write source to. Defaults to the directory
of the Java file for the set type. If the given directory does not
match the package of the object id, 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&nbsp;void&nbsp;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>&nbsp;dir)</pre>
<div class="block">The directory to write source to. Defaults to the directory
of the Java file for the set type. If the given directory does not
match the package of the object id, the package structure will be
created below the directory.</div>
</li>
</ul>
<a name="getToken()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getToken</h4>
<pre>public&nbsp;<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>&nbsp;getToken()</pre>
<div class="block">The token to use to separate stringified primary key field values.</div>
</li>
</ul>
<a name="setToken(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setToken</h4>
<pre>public&nbsp;void&nbsp;setToken(<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>&nbsp;token)</pre>
<div class="block">The token to use to separate stringified primary key field values.</div>
</li>
</ul>
<a name="getWriter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWriter</h4>
<pre>public&nbsp;<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>&nbsp;getWriter()</pre>
<div class="block">The writer to write source to, or null to write to default file.</div>
</li>
</ul>
<a name="setWriter(java.io.Writer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setWriter</h4>
<pre>public&nbsp;void&nbsp;setWriter(<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>&nbsp;writer)</pre>
<div class="block">The writer to write source to, or null to write to default file.</div>
</li>
</ul>
<a name="getType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre>public&nbsp;<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>&nbsp;getType()</pre>
<div class="block">Return the type we are generating an application id for.</div>
</li>
</ul>
<a name="getMetaData()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMetaData</h4>
<pre>public&nbsp;<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a>&nbsp;getMetaData()</pre>
<div class="block">Return metadata for the type we are generating an application id for.</div>
</li>
</ul>
<a name="getCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCode</h4>
<pre>public&nbsp;<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>&nbsp;getCode()</pre>
<div class="block">Return the code generated for the application id, or null
if invalid class or the <a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.html#run()"><code>run()</code></a> method has not been called.</div>
</li>
</ul>
<a name="isInnerClass()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInnerClass</h4>
<pre>public&nbsp;boolean&nbsp;isInnerClass()</pre>
<div class="block">Returns true if the application identity class should be an inner class.</div>
</li>
</ul>
<a name="run()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public&nbsp;boolean&nbsp;run()</pre>
<div class="block">Generates the sourcecode for the application id class; returns
false if the class is invalid.</div>
</li>
</ul>
<a name="record()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>record</h4>
<pre>public&nbsp;void&nbsp;record()
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">Writes 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="getImportPackages()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getImportPackages</h4>
<pre>public&nbsp;<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>&nbsp;getImportPackages()</pre>
<div class="block">Returns the collection of packages that need to be imported.</div>
</li>
</ul>
<a name="main(java.lang.String[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>main</h4>
<pre>public static&nbsp;void&nbsp;main(<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>[]&nbsp;args)
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>,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Usage: java org.apache.openjpa.enhance.ApplicationIdTool [option]*
&lt;class name | .java file | .class file | .jdo file&gt;+
Where the following options are recognized.
<ul>
<li><i>-properties/-p &lt;properties file&gt;</i>: The path to a OpenJPA
properties file containing information as outlined in
<a href="../../../../org/apache/openjpa/lib/conf/Configuration.html" title="interface in org.apache.openjpa.lib.conf"><code>Configuration</code></a>; optional.</li>
<li><i>-&lt;property name&gt; &lt;property value&gt;</i>: All bean
properties of the standard OpenJPA <a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf"><code>OpenJPAConfiguration</code></a> can be
set by using their names and supplying a value.</li>
<li><i>-directory/-d &lt;output directory&gt;</i>: Path to the base
source directory. The package structure will be created beneath
this directory if necessary. If not specified, the tool will try
to locate the .java file in the CLASSPATH and output to the same
directory; failing that, it will use the current directory as
the base directory.
<li><i>-ignoreErrors/-i &lt;true/t | false/f&gt;</i>: If false, an
exception will be thrown if the tool encounters any class that
does not use application identity or uses the identity class of
its superclass; defaults to true.</li>
<li><i>-token/-t &lt;token&gt;</i>: The token to use to separate
stingified primary key field values in the stringified oid.</li>
<li><i>-name/-n &lt;id class name&gt;</i>: The name of the identity
class to generate. If this option is specified, you must only
give a single class argument. If the class metadata names an object
id class, this argument is ignored.</li>
<li><i>-suffix/-s &lt;id class suffix&gt;</i>: A string to suffix each
persistent class with to create the identity class name. This is
overridden by <code>-name</code> or by any identity class name
specified in metadata.</li>
<li><i>-codeFormat/-cf.&lt;property name&gt; &lt; property value&gt;</i>
: Arguments like this will be used to configure the bean
properties of the internal <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util"><code>CodeFormat</code></a>.</li>
</ul>
Each additional argument can be either the full class name of the
type to create an id class for, the path to the .java file for the type,
the path to the .class file for the type, or the path to a .jdo file
listing one or more types. If a .java file already exists for an
application id, it will be backed up to a file named
&lt;orig file name&gt;~.</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>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code></dd></dl>
</li>
</ul>
<a name="run(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.String[], org.apache.openjpa.lib.util.Options)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public static&nbsp;boolean&nbsp;run(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;conf,
<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>[]&nbsp;args,
<a href="../../../../org/apache/openjpa/lib/util/Options.html" title="class in org.apache.openjpa.lib.util">Options</a>&nbsp;opts)
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>,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Run the application id tool with the given command-line and
given configuration. Returns false if invalid options were given.</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>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code></dd></dl>
</li>
</ul>
<a name="run(org.apache.openjpa.conf.OpenJPAConfiguration, java.lang.String[], org.apache.openjpa.enhance.ApplicationIdTool.Flags, java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>run</h4>
<pre>public static&nbsp;boolean&nbsp;run(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a>&nbsp;conf,
<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>[]&nbsp;args,
<a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.Flags.html" title="class in org.apache.openjpa.enhance">ApplicationIdTool.Flags</a>&nbsp;flags,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;loader)
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>,
<a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Run the tool. Returns false if invalid options were given.</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>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code></dd></dl>
</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/ApplicationIdTool.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>Prev Class</li>
<li><a href="../../../../org/apache/openjpa/enhance/ApplicationIdTool.Flags.html" title="class 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/ApplicationIdTool.html" target="_top">Frames</a></li>
<li><a href="ApplicationIdTool.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:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &#169; 2006&#x2013;2016 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>