blob: fa38a51c971ed1dc527fc1aae37ff797cbae4620 [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 (1.8.0_252) on Thu Sep 03 11:54:25 CEST 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SchemaTool (OpenJPA Parent POM 3.1.2 API)</title>
<meta name="date" content="2020-09-03">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SchemaTool (OpenJPA Parent POM 3.1.2 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":10,"i44":10,"i45":10,"i46":10,"i47":9,"i48":10,"i49":10,"i50":10,"i51":10,"i52":10,"i53":9,"i54":9,"i55":10,"i56":10,"i57":10,"i58":10,"i59":10,"i60":10,"i61":10,"i62":10,"i63":10,"i64":10,"i65":10,"i66":10,"i67":10,"i68":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<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/SchemaTool.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/jdbc/schema/SchemaSerializer.html" title="interface in org.apache.openjpa.jdbc.schema"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.Flags.html" title="class in org.apache.openjpa.jdbc.schema"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/openjpa/jdbc/schema/SchemaTool.html" target="_top">Frames</a></li>
<li><a href="SchemaTool.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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.jdbc.schema</div>
<h2 title="Class SchemaTool" class="title">Class SchemaTool</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/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.jdbc.schema.SchemaTool</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">SchemaTool</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">The SchemaTool is used to manage the database schema. Note that the
tool never adds or drops unique constraints from existing tables, because
JDBC <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html?is-external=true" title="class or interface in java.sql"><code>DatabaseMetaData</code></a> does not include information on these
constraints.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Abe White, Patrick Linskey</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="memberSummary" 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><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.Flags.html" title="class in org.apache.openjpa.jdbc.schema">SchemaTool.Flags</a></span></code>
<div class="block">Run flags.</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="memberSummary" 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>protected <a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_conf">_conf</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/openjpa/jdbc/sql/DBDictionary.html" title="class in org.apache.openjpa.jdbc.sql">DBDictionary</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_dict">_dict</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_ds">_ds</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_fullDB">_fullDB</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../../org/apache/openjpa/lib/util/Localizer.html" title="class in org.apache.openjpa.lib.util">Localizer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_loc">_loc</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/openjpa/lib/log/Log.html" title="interface in org.apache.openjpa.lib.log">Log</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_log">_log</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_scriptToExecute">_scriptToExecute</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#Z:Z_sqlTerminator">_sqlTerminator</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_ADD">ACTION_ADD</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_BUILD">ACTION_BUILD</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_CREATEDB">ACTION_CREATEDB</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_DELETE_TABLE_CONTENTS">ACTION_DELETE_TABLE_CONTENTS</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_DROP">ACTION_DROP</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_DROP_SCHEMA">ACTION_DROP_SCHEMA</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_DROPDB">ACTION_DROPDB</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_EXECUTE_SCRIPT">ACTION_EXECUTE_SCRIPT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_EXPORT">ACTION_EXPORT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_IMPORT">ACTION_IMPORT</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_REFLECT">ACTION_REFLECT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_REFRESH">ACTION_REFRESH</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_RETAIN">ACTION_RETAIN</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTIONS">ACTIONS</a></span></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="memberSummary" 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><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#SchemaTool-org.apache.openjpa.jdbc.conf.JDBCConfiguration-">SchemaTool</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf)</code>
<div class="block">Default constructor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#SchemaTool-org.apache.openjpa.jdbc.conf.JDBCConfiguration-java.lang.String-">SchemaTool</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;action)</code>
<div class="block">Construct a tool to perform the given action.</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#add--">add</a></span>()</code>
<div class="block">Adds any components present in the schema repository but absent from
the database.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#add-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">add</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos)</code>
<div class="block">Adds all database components in the repository schema that are not
present in the given database schema to the database.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#addColumn-org.apache.openjpa.jdbc.schema.Column-">addColumn</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Column.html" title="class in org.apache.openjpa.jdbc.schema">Column</a>&nbsp;col)</code>
<div class="block">Add the given column to the database schema.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#addForeignKey-org.apache.openjpa.jdbc.schema.ForeignKey-">addForeignKey</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;fk)</code>
<div class="block">Add the given foreign key to the database schema.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#addPrimaryKey-org.apache.openjpa.jdbc.schema.PrimaryKey-">addPrimaryKey</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/PrimaryKey.html" title="class in org.apache.openjpa.jdbc.schema">PrimaryKey</a>&nbsp;pk)</code>
<div class="block">Add the given primary key to the database schema.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#assertSchemaGroup--">assertSchemaGroup</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#build--">build</a></span>()</code>
<div class="block">Re-execute all SQL used for the creation of the current database;
this action is usually used when creating SQL scripts.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#buildSchema-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-boolean-">buildSchema</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos,
boolean&nbsp;considerDatabaseState)</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#clear--">clear</a></span>()</code>
<div class="block">Cleanup DataSource after run()/record()</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#createDB--">createDB</a></span>()</code>
<div class="block">Re-execute all SQL used for the creation of the current database;
this action is usually used when creating SQL scripts.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#createIndex-org.apache.openjpa.jdbc.schema.Index-org.apache.openjpa.jdbc.schema.Table-">createIndex</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)</code>
<div class="block">Add the given index to the database schema.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#createIndex-org.apache.openjpa.jdbc.schema.Index-org.apache.openjpa.jdbc.schema.Table-org.apache.openjpa.jdbc.schema.Unique:A-">createIndex</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Unique.html" title="class in org.apache.openjpa.jdbc.schema">Unique</a>[]&nbsp;uniques)</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#createSequence-org.apache.openjpa.jdbc.schema.Sequence-">createSequence</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Sequence.html" title="class in org.apache.openjpa.jdbc.schema">Sequence</a>&nbsp;seq)</code>
<div class="block">Add the given sequence to the database schema.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#createTable-org.apache.openjpa.jdbc.schema.Table-">createTable</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)</code>
<div class="block">Add the given table to the database schema.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#deleteTableContents--">deleteTableContents</a></span>()</code>
<div class="block">Issue DELETE statement against all known tables.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#drop--">drop</a></span>()</code>
<div class="block">Drops all schema components in the schema repository that also exist
in the database.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#drop-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">drop</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos)</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropColumn-org.apache.openjpa.jdbc.schema.Column-">dropColumn</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Column.html" title="class in org.apache.openjpa.jdbc.schema">Column</a>&nbsp;col)</code>
<div class="block">Drop the given column from the database schema.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropDB--">dropDB</a></span>()</code>
<div class="block">Drop the current database.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropForeignKey-org.apache.openjpa.jdbc.schema.ForeignKey-">dropForeignKey</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;fk)</code>
<div class="block">Drop the given foreign key from the database schema.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropIndex-org.apache.openjpa.jdbc.schema.Index-">dropIndex</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx)</code>
<div class="block">Drop the given index from the database schema.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropPrimaryKey-org.apache.openjpa.jdbc.schema.PrimaryKey-">dropPrimaryKey</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/PrimaryKey.html" title="class in org.apache.openjpa.jdbc.schema">PrimaryKey</a>&nbsp;pk)</code>
<div class="block">Drop the given primary key from the database schema.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropSchema--">dropSchema</a></span>()</code>
<div class="block">Drops all schema components in the schema repository.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropSequence-org.apache.openjpa.jdbc.schema.Sequence-">dropSequence</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Sequence.html" title="class in org.apache.openjpa.jdbc.schema">Sequence</a>&nbsp;seq)</code>
<div class="block">Drop the given sequence from the database schema.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropTable-org.apache.openjpa.jdbc.schema.Table-">dropTable</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)</code>
<div class="block">Drop the given table from the database schema.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#dropTables-java.util.Collection-org.apache.openjpa.jdbc.schema.SchemaGroup-">dropTables</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&gt;&nbsp;tables,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;change)</code>
<div class="block">Remove the given collection of tables from the database schema.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#executeScript--">executeScript</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#executeSQL-java.lang.String:A-">executeSQL</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;sql)</code>
<div class="block">Executes the given array of non-selecting SQL statements, correctly
logging the SQL calls and optionally ignoring errors.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#findForeignKey-org.apache.openjpa.jdbc.schema.Table-org.apache.openjpa.jdbc.schema.ForeignKey-">findForeignKey</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;dbTable,
<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;fk)</code>
<div class="block">Find a foreign key in the given table that matches the given one.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#findIndex-org.apache.openjpa.jdbc.schema.Table-org.apache.openjpa.jdbc.schema.Index-">findIndex</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;dbTable,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx)</code>
<div class="block">Find an index in the given table that matches the given one.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getAction--">getAction</a></span>()</code>
<div class="block">The action supplied on construction.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getDBSchemaGroup--">getDBSchemaGroup</a></span>()</code>
<div class="block">Return the database schema.</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getDBSchemaGroup-boolean-">getDBSchemaGroup</a></span>(boolean&nbsp;full)</code>
<div class="block">Return the database schema.</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getDropSequences--">getDropSequences</a></span>()</code>
<div class="block">If true, sequences that appear to be unused will be dropped.</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getDropTables--">getDropTables</a></span>()</code>
<div class="block">If true, tables that appear to be unused will be dropped.</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getForeignKeys--">getForeignKeys</a></span>()</code>
<div class="block">Whether foreign keys on existing tables should be manipulated.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getIgnoreErrors--">getIgnoreErrors</a></span>()</code>
<div class="block">If true, SQLExceptions thrown during schema manipulation will be
printed but ignored.</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getIndexes--">getIndexes</a></span>()</code>
<div class="block">Whether indexes on existing tables should be manipulated.</div>
</td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getOpenJPATables--">getOpenJPATables</a></span>()</code>
<div class="block">Whether to act on special tables used by OpenJPA components
for bookkeeping.</div>
</td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getPrimaryKeys--">getPrimaryKeys</a></span>()</code>
<div class="block">Whether primary keys on existing tables should be manipulated.</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getRollbackBeforeDDL--">getRollbackBeforeDDL</a></span>()</code>
<div class="block">If true, rollback will be performed before each DDL statement is executed.</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getSchemaGroup--">getSchemaGroup</a></span>()</code>
<div class="block">Return the schema group the tool will act on.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getSequences--">getSequences</a></span>()</code>
<div class="block">Whether sequences should be manipulated.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#getWriter--">getWriter</a></span>()</code>
<div class="block">The stream to write to for the creation of SQL scripts.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#handleException-java.sql.SQLException-">handleException</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a>&nbsp;sql)</code>
<div class="block">Handle the given exception, logging it and optionally ignoring it,
depending on the flags this SchemaTool was created with.</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#isDroppable-org.apache.openjpa.jdbc.schema.Sequence-">isDroppable</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Sequence.html" title="class in org.apache.openjpa.jdbc.schema">Sequence</a>&nbsp;seq)</code>
<div class="block">Return true if the sequence is droppable.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#isDroppable-org.apache.openjpa.jdbc.schema.Table-">isDroppable</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)</code>
<div class="block">Return true if the table is droppable.</div>
</td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#main-java.lang.String:A-">main</a></span>(<a href="https://docs.oracle.com/javase/8/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.jdbc.schema.SchemaTool [option]*
[-action/-a &lt;add | retain | drop | refresh | createDB | dropDB
| build | reflect | import | export&gt;]
&lt;.schema file or resource&gt;*
Where the following options are recognized.</div>
</td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#record--">record</a></span>()</code>
<div class="block">Record the changes made to the DB in the current <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaFactory.html" title="interface in org.apache.openjpa.jdbc.schema"><code>SchemaFactory</code></a>.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#refresh--">refresh</a></span>()</code>
<div class="block">Adds any components present in the schema repository but absent from
the database, and drops unused database components.</div>
</td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#retain--">retain</a></span>()</code>
<div class="block">Drops database components that are not mentioned in the schema
repository.</div>
</td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#retain-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-boolean-boolean-">retain</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos,
boolean&nbsp;tables,
boolean&nbsp;sequences)</code>
<div class="block">Drops all database components that are in the given database schema
but not in the repository schema.</div>
</td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#run--">run</a></span>()</code>
<div class="block">Run the tool action.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#run-org.apache.openjpa.jdbc.conf.JDBCConfiguration-java.lang.String:A-org.apache.openjpa.lib.util.Options-">run</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf,
<a href="https://docs.oracle.com/javase/8/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 tool.</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#run-org.apache.openjpa.jdbc.conf.JDBCConfiguration-java.lang.String:A-org.apache.openjpa.jdbc.schema.SchemaTool.Flags-java.lang.ClassLoader-">run</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf,
<a href="https://docs.oracle.com/javase/8/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/jdbc/schema/SchemaTool.Flags.html" title="class in org.apache.openjpa.jdbc.schema">SchemaTool.Flags</a>&nbsp;flags,
<a href="https://docs.oracle.com/javase/8/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 id="i55" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setDBSchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">setDBSchemaGroup</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db)</code>
<div class="block">Set the database schema.</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setDropSequences-boolean-">setDropSequences</a></span>(boolean&nbsp;dropSeqs)</code>
<div class="block">If true, sequences that appear to be unused will be dropped.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setDropTables-boolean-">setDropTables</a></span>(boolean&nbsp;dropTables)</code>
<div class="block">If true, tables that appear to be unused will be dropped.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setForeignKeys-boolean-">setForeignKeys</a></span>(boolean&nbsp;fks)</code>
<div class="block">Whether foreign keys on existing tables should be manipulated.</div>
</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setIgnoreErrors-boolean-">setIgnoreErrors</a></span>(boolean&nbsp;ignoreErrs)</code>
<div class="block">If true, SQLExceptions thrown during schema manipulation will be
printed but ignored.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setIndexes-boolean-">setIndexes</a></span>(boolean&nbsp;indexes)</code>
<div class="block">Whether indexes on existing tables should be manipulated.</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setOpenJPATables-boolean-">setOpenJPATables</a></span>(boolean&nbsp;openjpaTables)</code>
<div class="block">Whether to act on special tables used by OpenJPA components
for bookkeeping.</div>
</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setPrimaryKeys-boolean-">setPrimaryKeys</a></span>(boolean&nbsp;pks)</code>
<div class="block">Whether primary keys on existing tables should be manipulated.</div>
</td>
</tr>
<tr id="i63" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setRollbackBeforeDDL-boolean-">setRollbackBeforeDDL</a></span>(boolean&nbsp;rollbackBeforeDDL)</code>
<div class="block">If true, rollback will be performed before each DDL statement is executed.</div>
</td>
</tr>
<tr id="i64" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setSchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">setSchemaGroup</a></span>(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;group)</code>
<div class="block">Set the schema group the tool will act on.</div>
</td>
</tr>
<tr id="i65" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setScriptToExecute-java.lang.String-">setScriptToExecute</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scriptToExecute)</code>&nbsp;</td>
</tr>
<tr id="i66" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setSequences-boolean-">setSequences</a></span>(boolean&nbsp;seqs)</code>
<div class="block">Whether sequences should be manipulated.</div>
</td>
</tr>
<tr id="i67" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setSQLTerminator-java.lang.String-">setSQLTerminator</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;t)</code>&nbsp;</td>
</tr>
<tr id="i68" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#setWriter-java.io.Writer-">setWriter</a></span>(<a href="https://docs.oracle.com/javase/8/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 stream to write to for the creation of SQL scripts.</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="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" 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="ACTION_ADD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_ADD</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_ADD</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_ADD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_DROP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_DROP</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_DROP</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_DROP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_DROP_SCHEMA">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_DROP_SCHEMA</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_DROP_SCHEMA</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_DROP_SCHEMA">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_RETAIN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_RETAIN</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_RETAIN</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_RETAIN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_REFRESH">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_REFRESH</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_REFRESH</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_REFRESH">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_BUILD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_BUILD</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_BUILD</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_BUILD">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_REFLECT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_REFLECT</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_REFLECT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_REFLECT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_CREATEDB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_CREATEDB</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_CREATEDB</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_CREATEDB">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_DROPDB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_DROPDB</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_DROPDB</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_DROPDB">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_IMPORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_IMPORT</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_IMPORT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_IMPORT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_EXPORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_EXPORT</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_EXPORT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_EXPORT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_DELETE_TABLE_CONTENTS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_DELETE_TABLE_CONTENTS</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_DELETE_TABLE_CONTENTS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_DELETE_TABLE_CONTENTS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTION_EXECUTE_SCRIPT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_EXECUTE_SCRIPT</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> ACTION_EXECUTE_SCRIPT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.apache.openjpa.jdbc.schema.SchemaTool.ACTION_EXECUTE_SCRIPT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="ACTIONS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTIONS</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] ACTIONS</pre>
</li>
</ul>
<a name="Z:Z_loc">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_loc</h4>
<pre>protected static final&nbsp;<a href="../../../../../org/apache/openjpa/lib/util/Localizer.html" title="class in org.apache.openjpa.lib.util">Localizer</a> _loc</pre>
</li>
</ul>
<a name="Z:Z_conf">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_conf</h4>
<pre>protected final&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a> _conf</pre>
</li>
</ul>
<a name="Z:Z_ds">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_ds</h4>
<pre>protected final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a> _ds</pre>
</li>
</ul>
<a name="Z:Z_log">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_log</h4>
<pre>protected final&nbsp;<a href="../../../../../org/apache/openjpa/lib/log/Log.html" title="interface in org.apache.openjpa.lib.log">Log</a> _log</pre>
</li>
</ul>
<a name="Z:Z_dict">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_dict</h4>
<pre>protected final&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/sql/DBDictionary.html" title="class in org.apache.openjpa.jdbc.sql">DBDictionary</a> _dict</pre>
</li>
</ul>
<a name="Z:Z_fullDB">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_fullDB</h4>
<pre>protected&nbsp;boolean _fullDB</pre>
</li>
</ul>
<a name="Z:Z_sqlTerminator">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>_sqlTerminator</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> _sqlTerminator</pre>
</li>
</ul>
<a name="Z:Z_scriptToExecute">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>_scriptToExecute</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> _scriptToExecute</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SchemaTool-org.apache.openjpa.jdbc.conf.JDBCConfiguration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SchemaTool</h4>
<pre>public&nbsp;SchemaTool(<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf)</pre>
<div class="block">Default constructor. Tools constructed this way will not have an
action, so the <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#run--"><code>run()</code></a> method will be a no-op.</div>
</li>
</ul>
<a name="SchemaTool-org.apache.openjpa.jdbc.conf.JDBCConfiguration-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SchemaTool</h4>
<pre>public&nbsp;SchemaTool(<a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;action)</pre>
<div class="block">Construct a tool to perform the given action.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="clear--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;clear()</pre>
<div class="block">Cleanup DataSource after run()/record()</div>
</li>
</ul>
<a name="getAction--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAction</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getAction()</pre>
<div class="block">The action supplied on construction.</div>
</li>
</ul>
<a name="getIgnoreErrors--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIgnoreErrors</h4>
<pre>public&nbsp;boolean&nbsp;getIgnoreErrors()</pre>
<div class="block">If true, SQLExceptions thrown during schema manipulation will be
printed but ignored.</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;ignoreErrs)</pre>
<div class="block">If true, SQLExceptions thrown during schema manipulation will be
printed but ignored.</div>
</li>
</ul>
<a name="getOpenJPATables--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOpenJPATables</h4>
<pre>public&nbsp;boolean&nbsp;getOpenJPATables()</pre>
<div class="block">Whether to act on special tables used by OpenJPA components
for bookkeeping.</div>
</li>
</ul>
<a name="setOpenJPATables-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setOpenJPATables</h4>
<pre>public&nbsp;void&nbsp;setOpenJPATables(boolean&nbsp;openjpaTables)</pre>
<div class="block">Whether to act on special tables used by OpenJPA components
for bookkeeping.</div>
</li>
</ul>
<a name="getDropTables--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDropTables</h4>
<pre>public&nbsp;boolean&nbsp;getDropTables()</pre>
<div class="block">If true, tables that appear to be unused will be dropped. Defaults to
true.</div>
</li>
</ul>
<a name="setDropTables-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDropTables</h4>
<pre>public&nbsp;void&nbsp;setDropTables(boolean&nbsp;dropTables)</pre>
<div class="block">If true, tables that appear to be unused will be dropped. Defaults to
true.</div>
</li>
</ul>
<a name="getDropSequences--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDropSequences</h4>
<pre>public&nbsp;boolean&nbsp;getDropSequences()</pre>
<div class="block">If true, sequences that appear to be unused will be dropped. Defaults
to true.</div>
</li>
</ul>
<a name="setDropSequences-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDropSequences</h4>
<pre>public&nbsp;void&nbsp;setDropSequences(boolean&nbsp;dropSeqs)</pre>
<div class="block">If true, sequences that appear to be unused will be dropped. Defaults
to true.</div>
</li>
</ul>
<a name="getRollbackBeforeDDL--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRollbackBeforeDDL</h4>
<pre>public&nbsp;boolean&nbsp;getRollbackBeforeDDL()</pre>
<div class="block">If true, rollback will be performed before each DDL statement is executed. Defaults to true.</div>
</li>
</ul>
<a name="setRollbackBeforeDDL-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRollbackBeforeDDL</h4>
<pre>public&nbsp;void&nbsp;setRollbackBeforeDDL(boolean&nbsp;rollbackBeforeDDL)</pre>
<div class="block">If true, rollback will be performed before each DDL statement is executed. Defaults to true.</div>
</li>
</ul>
<a name="getSequences--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSequences</h4>
<pre>public&nbsp;boolean&nbsp;getSequences()</pre>
<div class="block">Whether sequences should be manipulated. Defaults to true.</div>
</li>
</ul>
<a name="setSequences-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSequences</h4>
<pre>public&nbsp;void&nbsp;setSequences(boolean&nbsp;seqs)</pre>
<div class="block">Whether sequences should be manipulated. Defaults to true.</div>
</li>
</ul>
<a name="getIndexes--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getIndexes</h4>
<pre>public&nbsp;boolean&nbsp;getIndexes()</pre>
<div class="block">Whether indexes on existing tables should be manipulated.
Defaults to true.</div>
</li>
</ul>
<a name="setIndexes-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIndexes</h4>
<pre>public&nbsp;void&nbsp;setIndexes(boolean&nbsp;indexes)</pre>
<div class="block">Whether indexes on existing tables should be manipulated.
Defaults to true.</div>
</li>
</ul>
<a name="getForeignKeys--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getForeignKeys</h4>
<pre>public&nbsp;boolean&nbsp;getForeignKeys()</pre>
<div class="block">Whether foreign keys on existing tables should be manipulated.
Defaults to true.</div>
</li>
</ul>
<a name="setForeignKeys-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setForeignKeys</h4>
<pre>public&nbsp;void&nbsp;setForeignKeys(boolean&nbsp;fks)</pre>
<div class="block">Whether foreign keys on existing tables should be manipulated.
Defaults to true.</div>
</li>
</ul>
<a name="getPrimaryKeys--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPrimaryKeys</h4>
<pre>public&nbsp;boolean&nbsp;getPrimaryKeys()</pre>
<div class="block">Whether primary keys on existing tables should be manipulated.
Defaults to true.</div>
</li>
</ul>
<a name="setPrimaryKeys-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPrimaryKeys</h4>
<pre>public&nbsp;void&nbsp;setPrimaryKeys(boolean&nbsp;pks)</pre>
<div class="block">Whether primary keys on existing tables should be manipulated.
Defaults to true.</div>
</li>
</ul>
<a name="getWriter--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWriter</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/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 stream to write to for the creation of SQL scripts. If the
stream is non-null, all SQL will be written to this stream rather than
executed against the database.</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="https://docs.oracle.com/javase/8/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 stream to write to for the creation of SQL scripts. If the
stream is non-null, all SQL will be written to this stream rather than
executed against the database.</div>
</li>
</ul>
<a name="setSQLTerminator-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSQLTerminator</h4>
<pre>public&nbsp;void&nbsp;setSQLTerminator(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;t)</pre>
</li>
</ul>
<a name="setScriptToExecute-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setScriptToExecute</h4>
<pre>public&nbsp;void&nbsp;setScriptToExecute(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;scriptToExecute)</pre>
</li>
</ul>
<a name="getSchemaGroup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSchemaGroup</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;getSchemaGroup()</pre>
<div class="block">Return the schema group the tool will act on.</div>
</li>
</ul>
<a name="setSchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSchemaGroup</h4>
<pre>public&nbsp;void&nbsp;setSchemaGroup(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;group)</pre>
<div class="block">Set the schema group the tool will act on.</div>
</li>
</ul>
<a name="run--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public&nbsp;void&nbsp;run()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Run the tool action.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="add--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>protected&nbsp;void&nbsp;add()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Adds any components present in the schema repository but absent from
the database.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="drop--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>drop</h4>
<pre>protected&nbsp;void&nbsp;drop()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drops all schema components in the schema repository that also exist
in the database.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropSchema--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropSchema</h4>
<pre>protected&nbsp;void&nbsp;dropSchema()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drops all schema components in the schema repository.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="retain--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retain</h4>
<pre>protected&nbsp;void&nbsp;retain()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drops database components that are not mentioned in the schema
repository.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="refresh--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>refresh</h4>
<pre>protected&nbsp;void&nbsp;refresh()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Adds any components present in the schema repository but absent from
the database, and drops unused database components.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="createDB--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createDB</h4>
<pre>protected&nbsp;void&nbsp;createDB()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Re-execute all SQL used for the creation of the current database;
this action is usually used when creating SQL scripts.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="build--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>build</h4>
<pre>protected&nbsp;void&nbsp;build()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Re-execute all SQL used for the creation of the current database;
this action is usually used when creating SQL scripts.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropDB--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropDB</h4>
<pre>protected&nbsp;void&nbsp;dropDB()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the current database.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="deleteTableContents--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteTableContents</h4>
<pre>protected&nbsp;void&nbsp;deleteTableContents()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Issue DELETE statement against all known tables.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="executeScript--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executeScript</h4>
<pre>protected&nbsp;void&nbsp;executeScript()
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="record--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>record</h4>
<pre>public&nbsp;void&nbsp;record()</pre>
<div class="block">Record the changes made to the DB in the current <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaFactory.html" title="interface in org.apache.openjpa.jdbc.schema"><code>SchemaFactory</code></a>.</div>
</li>
</ul>
<a name="add-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>protected&nbsp;void&nbsp;add(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Adds all database components in the repository schema that are not
present in the given database schema to the database.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="buildSchema-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildSchema</h4>
<pre>protected&nbsp;void&nbsp;buildSchema(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos,
boolean&nbsp;considerDatabaseState)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="retain-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retain</h4>
<pre>protected&nbsp;void&nbsp;retain(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos,
boolean&nbsp;tables,
boolean&nbsp;sequences)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drops all database components that are in the given database schema
but not in the repository schema.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="drop-org.apache.openjpa.jdbc.schema.SchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>drop</h4>
<pre>protected&nbsp;void&nbsp;drop(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;repos)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="isDroppable-org.apache.openjpa.jdbc.schema.Table-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDroppable</h4>
<pre>protected&nbsp;boolean&nbsp;isDroppable(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)</pre>
<div class="block">Return true if the table is droppable.</div>
</li>
</ul>
<a name="isDroppable-org.apache.openjpa.jdbc.schema.Sequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDroppable</h4>
<pre>protected&nbsp;boolean&nbsp;isDroppable(<a href="../../../../../org/apache/openjpa/jdbc/schema/Sequence.html" title="class in org.apache.openjpa.jdbc.schema">Sequence</a>&nbsp;seq)</pre>
<div class="block">Return true if the sequence is droppable.</div>
</li>
</ul>
<a name="findIndex-org.apache.openjpa.jdbc.schema.Table-org.apache.openjpa.jdbc.schema.Index-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findIndex</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;findIndex(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;dbTable,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx)</pre>
<div class="block">Find an index in the given table that matches the given one.</div>
</li>
</ul>
<a name="findForeignKey-org.apache.openjpa.jdbc.schema.Table-org.apache.openjpa.jdbc.schema.ForeignKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findForeignKey</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;findForeignKey(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;dbTable,
<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;fk)</pre>
<div class="block">Find a foreign key in the given table that matches the given one.</div>
</li>
</ul>
<a name="dropTables-java.util.Collection-org.apache.openjpa.jdbc.schema.SchemaGroup-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropTables</h4>
<pre>protected&nbsp;void&nbsp;dropTables(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&gt;&nbsp;tables,
<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;change)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Remove the given collection of tables from the database schema. Orders
the removals according to foreign key constraints on the tables.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="createTable-org.apache.openjpa.jdbc.schema.Table-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTable</h4>
<pre>public&nbsp;boolean&nbsp;createTable(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Add the given table to the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropTable-org.apache.openjpa.jdbc.schema.Table-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropTable</h4>
<pre>public&nbsp;boolean&nbsp;dropTable(<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the given table from the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="createSequence-org.apache.openjpa.jdbc.schema.Sequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createSequence</h4>
<pre>public&nbsp;boolean&nbsp;createSequence(<a href="../../../../../org/apache/openjpa/jdbc/schema/Sequence.html" title="class in org.apache.openjpa.jdbc.schema">Sequence</a>&nbsp;seq)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Add the given sequence to the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropSequence-org.apache.openjpa.jdbc.schema.Sequence-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropSequence</h4>
<pre>public&nbsp;boolean&nbsp;dropSequence(<a href="../../../../../org/apache/openjpa/jdbc/schema/Sequence.html" title="class in org.apache.openjpa.jdbc.schema">Sequence</a>&nbsp;seq)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the given sequence from the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="createIndex-org.apache.openjpa.jdbc.schema.Index-org.apache.openjpa.jdbc.schema.Table-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createIndex</h4>
<pre>public&nbsp;boolean&nbsp;createIndex(<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Add the given index to the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="createIndex-org.apache.openjpa.jdbc.schema.Index-org.apache.openjpa.jdbc.schema.Table-org.apache.openjpa.jdbc.schema.Unique:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createIndex</h4>
<pre>public&nbsp;boolean&nbsp;createIndex(<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Table.html" title="class in org.apache.openjpa.jdbc.schema">Table</a>&nbsp;table,
<a href="../../../../../org/apache/openjpa/jdbc/schema/Unique.html" title="class in org.apache.openjpa.jdbc.schema">Unique</a>[]&nbsp;uniques)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropIndex-org.apache.openjpa.jdbc.schema.Index-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropIndex</h4>
<pre>public&nbsp;boolean&nbsp;dropIndex(<a href="../../../../../org/apache/openjpa/jdbc/schema/Index.html" title="class in org.apache.openjpa.jdbc.schema">Index</a>&nbsp;idx)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the given index from the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="addColumn-org.apache.openjpa.jdbc.schema.Column-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addColumn</h4>
<pre>public&nbsp;boolean&nbsp;addColumn(<a href="../../../../../org/apache/openjpa/jdbc/schema/Column.html" title="class in org.apache.openjpa.jdbc.schema">Column</a>&nbsp;col)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Add the given column to the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropColumn-org.apache.openjpa.jdbc.schema.Column-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropColumn</h4>
<pre>public&nbsp;boolean&nbsp;dropColumn(<a href="../../../../../org/apache/openjpa/jdbc/schema/Column.html" title="class in org.apache.openjpa.jdbc.schema">Column</a>&nbsp;col)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the given column from the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="addPrimaryKey-org.apache.openjpa.jdbc.schema.PrimaryKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addPrimaryKey</h4>
<pre>public&nbsp;boolean&nbsp;addPrimaryKey(<a href="../../../../../org/apache/openjpa/jdbc/schema/PrimaryKey.html" title="class in org.apache.openjpa.jdbc.schema">PrimaryKey</a>&nbsp;pk)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Add the given primary key to the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropPrimaryKey-org.apache.openjpa.jdbc.schema.PrimaryKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropPrimaryKey</h4>
<pre>public&nbsp;boolean&nbsp;dropPrimaryKey(<a href="../../../../../org/apache/openjpa/jdbc/schema/PrimaryKey.html" title="class in org.apache.openjpa.jdbc.schema">PrimaryKey</a>&nbsp;pk)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the given primary key from the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="addForeignKey-org.apache.openjpa.jdbc.schema.ForeignKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addForeignKey</h4>
<pre>public&nbsp;boolean&nbsp;addForeignKey(<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;fk)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Add the given foreign key to the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="dropForeignKey-org.apache.openjpa.jdbc.schema.ForeignKey-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dropForeignKey</h4>
<pre>public&nbsp;boolean&nbsp;dropForeignKey(<a href="../../../../../org/apache/openjpa/jdbc/schema/ForeignKey.html" title="class in org.apache.openjpa.jdbc.schema">ForeignKey</a>&nbsp;fk)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Drop the given foreign key from the database schema.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the operation was successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="getDBSchemaGroup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDBSchemaGroup</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;getDBSchemaGroup()</pre>
<div class="block">Return the database schema.</div>
</li>
</ul>
<a name="setDBSchemaGroup-org.apache.openjpa.jdbc.schema.SchemaGroup-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDBSchemaGroup</h4>
<pre>public&nbsp;void&nbsp;setDBSchemaGroup(<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;db)</pre>
<div class="block">Set the database schema.</div>
</li>
</ul>
<a name="getDBSchemaGroup-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDBSchemaGroup</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;getDBSchemaGroup(boolean&nbsp;full)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Return the database schema.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>full</code> - if false, only the tables named in the set schema
repository will be generated</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="assertSchemaGroup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assertSchemaGroup</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</a>&nbsp;assertSchemaGroup()</pre>
</li>
</ul>
<a name="executeSQL-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executeSQL</h4>
<pre>protected&nbsp;boolean&nbsp;executeSQL(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;sql)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Executes the given array of non-selecting SQL statements, correctly
logging the SQL calls and optionally ignoring errors.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if there was SQL to execute and the calls were
successful, false otherwise</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="handleException-java.sql.SQLException-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleException</h4>
<pre>protected&nbsp;void&nbsp;handleException(<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a>&nbsp;sql)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Handle the given exception, logging it and optionally ignoring it,
depending on the flags this SchemaTool was created with.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="main-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>main</h4>
<pre>public static&nbsp;void&nbsp;main(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;args)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Usage: java org.apache.openjpa.jdbc.schema.SchemaTool [option]*
[-action/-a &lt;add | retain | drop | refresh | createDB | dropDB
| build | reflect | import | export&gt;]
&lt;.schema file or resource&gt;*
Where the following options are recognized.
<ul>
<li><i>-properties/-p &lt;properties file or resource&gt;</i>: The
path or resource name of a OpenJPA properties file containing
information such as the license key and connection data as
outlined in <a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf"><code>JDBCConfiguration</code></a>. Optional.</li>
<li><i>-&lt;property name&gt; &lt;property value&gt;</i>: All bean
properties of the OpenJPA <a href="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf"><code>JDBCConfiguration</code></a> can be set by
using their names and supplying a value. For example:
<code>-licenseKey adslfja83r3lkadf</code></li>
<li><i>-ignoreErrors/-i &lt;true/t | false/f&gt;</i>: If false, an
exception will will be thrown if the tool encounters any database
exceptions; defaults to <code>false</code>.</li>
<li><i>-file/-f &lt;stdout | output file or resource&gt;</i>: Use this
option to write a SQL script for the planned schema modifications,
rather than committing them to the database. This option also
applies to the <code>export</code> and <code>reflect</code> actions.</li>
<li><i>-openjpaTables/-kt &lt;true/t | false/f&gt;</i>: Under the
<code>reflect</code> action, whether to reflect on tables with
the name <code>OPENJPA_*</code>. Under other actions, whether to
drop such tables. Defaults to <code>false</code>.</li>
<li><i>-dropTables/-dt &lt;true/t | false/f&gt;</i>: Set this option to
true to drop tables that appear to be unused during
<code>retain</code> and <code>refresh</code> actions. Defaults to
<code>true</code>.</li>
<li><i>-dropSequences/-dsq &lt;true/t | false/f&gt;</i>: Set this option
to true to drop sequences that appear to be unused during
<code>retain</code> and <code>refresh</code> actions. Defaults to
<code>true</code>.</li>
<li><i>-rollbackBeforeDDL/-rbddl &lt;true/t | false/f&gt;</i>: Set this option
to true to send an initail rollback on the connection before any DDL statement
is sent</li>
<li><i>-primaryKeys/-pk &lt;true/t | false/f&gt;</i>: Whether primary
keys on existing tables are manipulated. Defaults to true.</li>
<li><i>-foreignKeys/-fk &lt;true/t | false/f&gt;</i>: Whether foreign
keys on existing tables are manipulated. Defaults to true.</li>
<li><i>-indexes/-ix &lt;true/t | false/f&gt;</i>: Whether indexes
on existing tables are manipulated. Defaults to true.</li>
<li><i>-sequences/-sq &lt;true/t | false/f&gt;</i>: Whether to
manipulate sequences. Defaults to true.</li>
<li><i>-record/-r &lt;true/t | false/f&gt;</i>: Set this option to
<code>false</code> to prevent writing the schema changes to the
current <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaFactory.html" title="interface in org.apache.openjpa.jdbc.schema"><code>SchemaFactory</code></a>.</li>
</ul>
Actions can be composed in a comma-separated list. The various actions
are as follows.
<ul>
<li><i>add</i>: Bring the schema up-to-date with the latest
changes to the schema XML data by adding tables, columns,
indexes, etc. This action never drops any data. This is the
default action.</li>
<li><i>retain</i>: Keep all schema components in the schema XML, but
drop the rest from the database. This action never adds any data.</li>
<li><i>drop</i>: Drop all the schema components in the schema XML.</li>
<li><i>refresh</i>: Equivalent to retain, then add.</li>
<li><i>createDB</i>: Execute SQL to re-create the current database.
This action is typically used in conjuction with the
<code>file</code> option.</li>
<li><i>build</i>: Execute SQL to build the schema defined in the XML.
Because it doesn't take the current database schema into account,
this action is typically used in conjuction with the
<code>file</code> option.</li>
<li><i>reflect</i>: Reflect on the current database schema. Write the
schema's XML representation to the file specified with the
<code>file</code> option, or to stdout if no file is given.</li>
<li><i>dropDB</i>: Execute SQL to drop the current database. This
action implies <code>dropTables</code>.</li>
<li><i>deleteTableContents</i>: Execute SQL to delete all rows from
all tables that OpenJPA knows about.</li>
<li><i>import</i>: Import the given XML schema definition into the
current <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaFactory.html" title="interface in org.apache.openjpa.jdbc.schema"><code>SchemaFactory</code></a>.</li>
<li><i>export</i>: Export the current <a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaFactory.html" title="interface in org.apache.openjpa.jdbc.schema"><code>SchemaFactory</code></a>'s recorded
schema to an XML schema definition file.</li>
</ul>
Examples:
<ul>
<li>Write a script to stdout to re-create the current database
schema:<br />
<code>java org.apache.openjpa.jdbc.schema.SchemaTool -f stdout
-a createDB</code></li>
<li>Drop the current database schema:<br />
<code>java org.apache.openjpa.jdbc.schema.SchemaTool
-a dropDB</code></li>
<li>Refresh the schema and delete all records in all tables:<br />
<code>java org.apache.openjpa.jdbc.schema.SchemaTool
-a refresh,deleteTableContents</code></li>
<li>Create a schema based on an XML schema definition file:<br />
<code>java org.apache.openjpa.jdbc.schema.SchemaTool
myschema.xml</code></li>
</ul></div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
</dl>
</li>
</ul>
<a name="run-org.apache.openjpa.jdbc.conf.JDBCConfiguration-java.lang.String:A-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/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf,
<a href="https://docs.oracle.com/javase/8/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="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Run the tool. Returns false if any invalid options were given.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#main-java.lang.String:A-"><code>main(java.lang.String[])</code></a></dd>
</dl>
</li>
</ul>
<a name="run-org.apache.openjpa.jdbc.conf.JDBCConfiguration-java.lang.String:A-org.apache.openjpa.jdbc.schema.SchemaTool.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/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</a>&nbsp;conf,
<a href="https://docs.oracle.com/javase/8/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/jdbc/schema/SchemaTool.Flags.html" title="class in org.apache.openjpa.jdbc.schema">SchemaTool.Flags</a>&nbsp;flags,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html?is-external=true" title="class or interface in java.lang">ClassLoader</a>&nbsp;loader)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Run the tool. Return false if invalid options were given.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</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>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<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/SchemaTool.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/jdbc/schema/SchemaSerializer.html" title="interface in org.apache.openjpa.jdbc.schema"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.Flags.html" title="class in org.apache.openjpa.jdbc.schema"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/openjpa/jdbc/schema/SchemaTool.html" target="_top">Frames</a></li>
<li><a href="SchemaTool.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;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;2020 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>