<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.5.0) on Tue Nov 06 17:41:15 CST 2007 --> | |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<TITLE> | |
MappingTool (OpenJPA 1.0.1 API) | |
</TITLE> | |
<META NAME="keywords" CONTENT="org.apache.openjpa.jdbc.meta.MappingTool class"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
parent.document.title="MappingTool (OpenJPA 1.0.1 API)"; | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MappingTool.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingStrategyInstaller.html" title="class in org.apache.openjpa.jdbc.meta"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.Flags.html" title="class in org.apache.openjpa.jdbc.meta"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/openjpa/jdbc/meta/MappingTool.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="MappingTool.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<A NAME="main"></A> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.openjpa.jdbc.meta</FONT> | |
<BR> | |
Class MappingTool</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.openjpa.jdbc.meta.MappingTool</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html" title="interface in org.apache.openjpa.meta">MetaDataModes</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>MappingTool</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html" title="interface in org.apache.openjpa.meta">MetaDataModes</A></DL> | |
</PRE> | |
<P> | |
Tool for manipulating class mappings and associated schema. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Author:</B></DT> | |
<DD>Abe White</DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- ======== NESTED CLASS SUMMARY ======== --> | |
<A NAME="nested_class_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Nested Class Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static class</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.Flags.html" title="class in org.apache.openjpa.jdbc.meta">MappingTool.Flags</A></B></CODE> | |
<BR> | |
Run flags.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static interface</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.ImportExport.html" title="interface in org.apache.openjpa.jdbc.meta">MappingTool.ImportExport</A></B></CODE> | |
<BR> | |
Helper used to import and export mapping data.</TD> | |
</TR> | |
</TABLE> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_ADD">ACTION_ADD</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_BUILD_SCHEMA">ACTION_BUILD_SCHEMA</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_DROP">ACTION_DROP</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_EXPORT">ACTION_EXPORT</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_IMPORT">ACTION_IMPORT</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_REFRESH">ACTION_REFRESH</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTION_VALIDATE">ACTION_VALIDATE</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#ACTIONS">ACTIONS</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#SCHEMA_ACTION_NONE">SCHEMA_ACTION_NONE</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
<A NAME="fields_inherited_from_class_org.apache.openjpa.meta.MetaDataModes"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Fields inherited from interface org.apache.openjpa.meta.<A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html" title="interface in org.apache.openjpa.meta">MetaDataModes</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html#MODE_ANN_MAPPING">MODE_ANN_MAPPING</A>, <A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html#MODE_MAPPING">MODE_MAPPING</A>, <A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html#MODE_MAPPING_INIT">MODE_MAPPING_INIT</A>, <A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html#MODE_META">MODE_META</A>, <A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html#MODE_NONE">MODE_NONE</A>, <A HREF="../../../../../org/apache/openjpa/meta/MetaDataModes.html#MODE_QUERY">MODE_QUERY</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#MappingTool(org.apache.openjpa.jdbc.conf.JDBCConfiguration, java.lang.String, boolean)">MappingTool</A></B>(<A HREF="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> action, | |
boolean meta)</CODE> | |
<BR> | |
Constructor.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#clear()">clear</A></B>()</CODE> | |
<BR> | |
Reset the internal repository.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getAction()">getAction</A></B>()</CODE> | |
<BR> | |
The action supplied on construction.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getDropUnusedComponents()">getDropUnusedComponents</A></B>()</CODE> | |
<BR> | |
Whether schema components that are unused by any mapping will be | |
dropped from this tool's <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaGroup</CODE></A>, and, depending on | |
the schema action, from the database.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getForeignKeys()">getForeignKeys</A></B>()</CODE> | |
<BR> | |
Whether foreign keys on existing tables should be manipulated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getIgnoreErrors()">getIgnoreErrors</A></B>()</CODE> | |
<BR> | |
Whether and SQL errors should cause a failure or just issue a warning.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getIndexes()">getIndexes</A></B>()</CODE> | |
<BR> | |
Whether indexes on existing tables should be manipulated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getMappingWriter()">getMappingWriter</A></B>()</CODE> | |
<BR> | |
The stream to export the planned mappings to as an XML document.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getMetaDataFile()">getMetaDataFile</A></B>()</CODE> | |
<BR> | |
If adding metadata, the metadata file to add to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getPrimaryKeys()">getPrimaryKeys</A></B>()</CODE> | |
<BR> | |
Whether primary keys on existing tables should be manipulated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getReadSchema()">getReadSchema</A></B>()</CODE> | |
<BR> | |
Set to true to read the entire schema before mapping.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingRepository.html" title="class in org.apache.openjpa.jdbc.meta">MappingRepository</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getRepository()">getRepository</A></B>()</CODE> | |
<BR> | |
Return the repository to use to access mapping information.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getSchemaAction()">getSchemaAction</A></B>()</CODE> | |
<BR> | |
The schema modification policy, or <code>none</code>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getSchemaGroup()">getSchemaGroup</A></B>()</CODE> | |
<BR> | |
Return the schema group to use in mapping.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getSchemaWriter()">getSchemaWriter</A></B>()</CODE> | |
<BR> | |
The stream to export the planned schema to as an XML document.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#getSequences()">getSequences</A></B>()</CODE> | |
<BR> | |
Whether to manipulate sequences.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#isMetaDataAction()">isMetaDataAction</A></B>()</CODE> | |
<BR> | |
Whether the action works on metadata as well as mappings.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#main(java.lang.String[])">main</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args)</CODE> | |
<BR> | |
Usage: java org.apache.openjpa.jdbc.meta.MappingTool [option]* | |
[-action/-a <refresh | add | buildSchema | drop | validate | import | |
| export>] <class name | .java file | .class file | .jdo file>* | |
Where the following options are recognized.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#record()">record</A></B>()</CODE> | |
<BR> | |
Records the changes that have been made to both the mappings and the | |
associated schema, and clears the tool for further use.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#run(java.lang.Class)">run</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> cls)</CODE> | |
<BR> | |
Run the configured action on the given instance.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#run(org.apache.openjpa.jdbc.conf.JDBCConfiguration, java.lang.String[], org.apache.openjpa.jdbc.meta.MappingTool.Flags, java.lang.ClassLoader)">run</A></B>(<A HREF="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args, | |
<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.Flags.html" title="class in org.apache.openjpa.jdbc.meta">MappingTool.Flags</A> flags, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> loader)</CODE> | |
<BR> | |
Run the tool.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#run(org.apache.openjpa.jdbc.conf.JDBCConfiguration, java.lang.String[], org.apache.openjpa.lib.util.Options)">run</A></B>(<A HREF="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args, | |
<A HREF="../../../../../org/apache/openjpa/lib/util/Options.html" title="class in org.apache.openjpa.lib.util">Options</A> opts)</CODE> | |
<BR> | |
Run the tool.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setDropUnusedComponents(boolean)">setDropUnusedComponents</A></B>(boolean dropUnused)</CODE> | |
<BR> | |
Whether schema components that are unused by any mapping will be | |
dropped from this tool's <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaGroup</CODE></A>, and, depending on | |
the schema action, from the database.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setForeignKeys(boolean)">setForeignKeys</A></B>(boolean fks)</CODE> | |
<BR> | |
Whether foreign keys on existing tables should be manipulated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setIgnoreErrors(boolean)">setIgnoreErrors</A></B>(boolean ignoreErrors)</CODE> | |
<BR> | |
Whether and SQL errors should cause a failure or just issue a warning.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setIndexes(boolean)">setIndexes</A></B>(boolean indexes)</CODE> | |
<BR> | |
Whether indexes on existing tables should be manipulated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setMappingWriter(java.io.Writer)">setMappingWriter</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> mappingWriter)</CODE> | |
<BR> | |
The stream to export the planned mappings to as an XML document.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setMetaDataFile(java.io.File)">setMetaDataFile</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file)</CODE> | |
<BR> | |
If adding metadata, the metadata file to add to.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setPrimaryKeys(boolean)">setPrimaryKeys</A></B>(boolean pks)</CODE> | |
<BR> | |
Whether primary keys on existing tables should be manipulated.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setReadSchema(boolean)">setReadSchema</A></B>(boolean readSchema)</CODE> | |
<BR> | |
Set to true to read the entire schema before mapping.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setRepository(org.apache.openjpa.jdbc.meta.MappingRepository)">setRepository</A></B>(<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingRepository.html" title="class in org.apache.openjpa.jdbc.meta">MappingRepository</A> repos)</CODE> | |
<BR> | |
Set the repository to use to access mapping information.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setSchemaAction(java.lang.String)">setSchemaAction</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> schemaAction)</CODE> | |
<BR> | |
The schema modification policy, or <code>none</code>.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setSchemaGroup(org.apache.openjpa.jdbc.schema.SchemaGroup)">setSchemaGroup</A></B>(<A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</A> schema)</CODE> | |
<BR> | |
Set the schema to use in mapping.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setSchemaTool(org.apache.openjpa.jdbc.schema.SchemaTool)">setSchemaTool</A></B>(<A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema">SchemaTool</A> tool)</CODE> | |
<BR> | |
Set the schema tool to use for schema modification.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setSchemaWriter(java.io.Writer)">setSchemaWriter</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> schemaWriter)</CODE> | |
<BR> | |
The stream to export the planned schema to as an XML document.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#setSequences(boolean)">setSequences</A></B>(boolean seqs)</CODE> | |
<BR> | |
Whether to manipulate sequences.</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="SCHEMA_ACTION_NONE"><!-- --></A><H3> | |
SCHEMA_ACTION_NONE</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>SCHEMA_ACTION_NONE</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.SCHEMA_ACTION_NONE">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_ADD"><!-- --></A><H3> | |
ACTION_ADD</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_ADD</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_ADD">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_REFRESH"><!-- --></A><H3> | |
ACTION_REFRESH</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_REFRESH</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_REFRESH">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_BUILD_SCHEMA"><!-- --></A><H3> | |
ACTION_BUILD_SCHEMA</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_BUILD_SCHEMA</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_BUILD_SCHEMA">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_DROP"><!-- --></A><H3> | |
ACTION_DROP</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_DROP</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_DROP">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_VALIDATE"><!-- --></A><H3> | |
ACTION_VALIDATE</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_VALIDATE</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_VALIDATE">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_EXPORT"><!-- --></A><H3> | |
ACTION_EXPORT</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_EXPORT</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_EXPORT">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTION_IMPORT"><!-- --></A><H3> | |
ACTION_IMPORT</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ACTION_IMPORT</B></PRE> | |
<DL> | |
<DL> | |
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.openjpa.jdbc.meta.MappingTool.ACTION_IMPORT">Constant Field Values</A></DL> | |
</DL> | |
<HR> | |
<A NAME="ACTIONS"><!-- --></A><H3> | |
ACTIONS</H3> | |
<PRE> | |
public static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>ACTIONS</B></PRE> | |
<DL> | |
<DL> | |
</DL> | |
</DL> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="MappingTool(org.apache.openjpa.jdbc.conf.JDBCConfiguration, java.lang.String, boolean)"><!-- --></A><H3> | |
MappingTool</H3> | |
<PRE> | |
public <B>MappingTool</B>(<A HREF="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> action, | |
boolean meta)</PRE> | |
<DL> | |
<DD>Constructor. Supply configuration and action. | |
<P> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="getAction()"><!-- --></A><H3> | |
getAction</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAction</B>()</PRE> | |
<DL> | |
<DD>The action supplied on construction. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="isMetaDataAction()"><!-- --></A><H3> | |
isMetaDataAction</H3> | |
<PRE> | |
public boolean <B>isMetaDataAction</B>()</PRE> | |
<DL> | |
<DD>Whether the action works on metadata as well as mappings. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getSchemaAction()"><!-- --></A><H3> | |
getSchemaAction</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getSchemaAction</B>()</PRE> | |
<DL> | |
<DD>The schema modification policy, or <code>none</code>. See the | |
ACTION constants in <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A>. May be a comma-separated | |
list of values. Defaults to <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_ADD"><CODE>SchemaTool.ACTION_ADD</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSchemaAction(java.lang.String)"><!-- --></A><H3> | |
setSchemaAction</H3> | |
<PRE> | |
public void <B>setSchemaAction</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> schemaAction)</PRE> | |
<DL> | |
<DD>The schema modification policy, or <code>none</code>. See the | |
ACTION constants in <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A>. May be a comma-separated | |
list of values. Defaults to <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html#ACTION_ADD"><CODE>SchemaTool.ACTION_ADD</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getReadSchema()"><!-- --></A><H3> | |
getReadSchema</H3> | |
<PRE> | |
public boolean <B>getReadSchema</B>()</PRE> | |
<DL> | |
<DD>Set to true to read the entire schema before mapping. | |
Leaving this option false saves time, but is dangerous when adding | |
new mappings, because without full knowledge of the existing schema the | |
mapping tool might create tables or indexes that conflict with | |
existing components. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setReadSchema(boolean)"><!-- --></A><H3> | |
setReadSchema</H3> | |
<PRE> | |
public void <B>setReadSchema</B>(boolean readSchema)</PRE> | |
<DL> | |
<DD>Set to true to read the entire schema before mapping. | |
Leaving this option false saves time, but is dangerous when adding | |
new mappings, because without full knowledge of the existing schema the | |
mapping tool might create tables or indexes that conflict with | |
existing components. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getSequences()"><!-- --></A><H3> | |
getSequences</H3> | |
<PRE> | |
public boolean <B>getSequences</B>()</PRE> | |
<DL> | |
<DD>Whether to manipulate sequences. Defaults to true. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSequences(boolean)"><!-- --></A><H3> | |
setSequences</H3> | |
<PRE> | |
public void <B>setSequences</B>(boolean seqs)</PRE> | |
<DL> | |
<DD>Whether to manipulate sequences. Defaults to true. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getIndexes()"><!-- --></A><H3> | |
getIndexes</H3> | |
<PRE> | |
public boolean <B>getIndexes</B>()</PRE> | |
<DL> | |
<DD>Whether indexes on existing tables should be manipulated. | |
Defaults to false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setIndexes(boolean)"><!-- --></A><H3> | |
setIndexes</H3> | |
<PRE> | |
public void <B>setIndexes</B>(boolean indexes)</PRE> | |
<DL> | |
<DD>Whether indexes on existing tables should be manipulated. | |
Defaults to false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getForeignKeys()"><!-- --></A><H3> | |
getForeignKeys</H3> | |
<PRE> | |
public boolean <B>getForeignKeys</B>()</PRE> | |
<DL> | |
<DD>Whether foreign keys on existing tables should be manipulated. | |
Defaults to false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setForeignKeys(boolean)"><!-- --></A><H3> | |
setForeignKeys</H3> | |
<PRE> | |
public void <B>setForeignKeys</B>(boolean fks)</PRE> | |
<DL> | |
<DD>Whether foreign keys on existing tables should be manipulated. | |
Defaults to false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getPrimaryKeys()"><!-- --></A><H3> | |
getPrimaryKeys</H3> | |
<PRE> | |
public boolean <B>getPrimaryKeys</B>()</PRE> | |
<DL> | |
<DD>Whether primary keys on existing tables should be manipulated. | |
Defaults to false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setPrimaryKeys(boolean)"><!-- --></A><H3> | |
setPrimaryKeys</H3> | |
<PRE> | |
public void <B>setPrimaryKeys</B>(boolean pks)</PRE> | |
<DL> | |
<DD>Whether primary keys on existing tables should be manipulated. | |
Defaults to false. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getDropUnusedComponents()"><!-- --></A><H3> | |
getDropUnusedComponents</H3> | |
<PRE> | |
public boolean <B>getDropUnusedComponents</B>()</PRE> | |
<DL> | |
<DD>Whether schema components that are unused by any mapping will be | |
dropped from this tool's <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaGroup</CODE></A>, and, depending on | |
the schema action, from the database. Defaults to true. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setDropUnusedComponents(boolean)"><!-- --></A><H3> | |
setDropUnusedComponents</H3> | |
<PRE> | |
public void <B>setDropUnusedComponents</B>(boolean dropUnused)</PRE> | |
<DL> | |
<DD>Whether schema components that are unused by any mapping will be | |
dropped from this tool's <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaGroup</CODE></A>, and, depending on | |
the schema action, from the database. Defaults to true. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setIgnoreErrors(boolean)"><!-- --></A><H3> | |
setIgnoreErrors</H3> | |
<PRE> | |
public void <B>setIgnoreErrors</B>(boolean ignoreErrors)</PRE> | |
<DL> | |
<DD>Whether and SQL errors should cause a failure or just issue a warning. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getIgnoreErrors()"><!-- --></A><H3> | |
getIgnoreErrors</H3> | |
<PRE> | |
public boolean <B>getIgnoreErrors</B>()</PRE> | |
<DL> | |
<DD>Whether and SQL errors should cause a failure or just issue a warning. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSchemaTool(org.apache.openjpa.jdbc.schema.SchemaTool)"><!-- --></A><H3> | |
setSchemaTool</H3> | |
<PRE> | |
public void <B>setSchemaTool</B>(<A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema">SchemaTool</A> tool)</PRE> | |
<DL> | |
<DD>Set the schema tool to use for schema modification. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getSchemaWriter()"><!-- --></A><H3> | |
getSchemaWriter</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> <B>getSchemaWriter</B>()</PRE> | |
<DL> | |
<DD>The stream to export the planned schema to as an XML document. | |
If non-null, then the database schema will not be altered. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSchemaWriter(java.io.Writer)"><!-- --></A><H3> | |
setSchemaWriter</H3> | |
<PRE> | |
public void <B>setSchemaWriter</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> schemaWriter)</PRE> | |
<DL> | |
<DD>The stream to export the planned schema to as an XML document. | |
If non-null, then the database schema will not be altered. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMappingWriter()"><!-- --></A><H3> | |
getMappingWriter</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> <B>getMappingWriter</B>()</PRE> | |
<DL> | |
<DD>The stream to export the planned mappings to as an XML document. | |
If non-null, then the mapping repository will not be altered. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setMappingWriter(java.io.Writer)"><!-- --></A><H3> | |
setMappingWriter</H3> | |
<PRE> | |
public void <B>setMappingWriter</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> mappingWriter)</PRE> | |
<DL> | |
<DD>The stream to export the planned mappings to as an XML document. | |
If non-null, then the mapping repository will not be altered. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getMetaDataFile()"><!-- --></A><H3> | |
getMetaDataFile</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A> <B>getMetaDataFile</B>()</PRE> | |
<DL> | |
<DD>If adding metadata, the metadata file to add to. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setMetaDataFile(java.io.File)"><!-- --></A><H3> | |
setMetaDataFile</H3> | |
<PRE> | |
public void <B>setMetaDataFile</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file)</PRE> | |
<DL> | |
<DD>If adding metadata, the metadata file to add to. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getRepository()"><!-- --></A><H3> | |
getRepository</H3> | |
<PRE> | |
public <A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingRepository.html" title="class in org.apache.openjpa.jdbc.meta">MappingRepository</A> <B>getRepository</B>()</PRE> | |
<DL> | |
<DD>Return the repository to use to access mapping information. | |
Defaults to a new <A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingRepository.html" title="class in org.apache.openjpa.jdbc.meta"><CODE>MappingRepository</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setRepository(org.apache.openjpa.jdbc.meta.MappingRepository)"><!-- --></A><H3> | |
setRepository</H3> | |
<PRE> | |
public void <B>setRepository</B>(<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingRepository.html" title="class in org.apache.openjpa.jdbc.meta">MappingRepository</A> repos)</PRE> | |
<DL> | |
<DD>Set the repository to use to access mapping information. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getSchemaGroup()"><!-- --></A><H3> | |
getSchemaGroup</H3> | |
<PRE> | |
public <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</A> <B>getSchemaGroup</B>()</PRE> | |
<DL> | |
<DD>Return the schema group to use in mapping. If none has been set, the | |
schema will be generated from the database. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="setSchemaGroup(org.apache.openjpa.jdbc.schema.SchemaGroup)"><!-- --></A><H3> | |
setSchemaGroup</H3> | |
<PRE> | |
public void <B>setSchemaGroup</B>(<A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGroup.html" title="class in org.apache.openjpa.jdbc.schema">SchemaGroup</A> schema)</PRE> | |
<DL> | |
<DD>Set the schema to use in mapping. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="clear()"><!-- --></A><H3> | |
clear</H3> | |
<PRE> | |
public void <B>clear</B>()</PRE> | |
<DL> | |
<DD>Reset the internal repository. This is called automatically after | |
every <A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#record()"><CODE>record()</CODE></A>. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="record()"><!-- --></A><H3> | |
record</H3> | |
<PRE> | |
public void <B>record</B>()</PRE> | |
<DL> | |
<DD>Records the changes that have been made to both the mappings and the | |
associated schema, and clears the tool for further use. This also | |
involves clearing the internal mapping repository. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="run(java.lang.Class)"><!-- --></A><H3> | |
run</H3> | |
<PRE> | |
public void <B>run</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> cls)</PRE> | |
<DL> | |
<DD>Run the configured action on the given instance. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="main(java.lang.String[])"><!-- --></A><H3> | |
main</H3> | |
<PRE> | |
public static void <B>main</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></PRE> | |
<DL> | |
<DD>Usage: java org.apache.openjpa.jdbc.meta.MappingTool [option]* | |
[-action/-a <refresh | add | buildSchema | drop | validate | import | |
| export>] <class name | .java file | .class file | .jdo file>* | |
Where the following options are recognized. | |
<ul> | |
<li><i>-properties/-p <properties file or resource></i>: The | |
path or resource name of a OpenJPA properties file containing | |
information as outlined in <A HREF="../../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf"><CODE>OpenJPAConfiguration</CODE></A>. Optional.</li> | |
<li><i>-<property name> <property value></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>-file/-f <stdout | output file or resource></i>: Use | |
this option to write the planned mappings to an XML document rather | |
than store them in the repository. This option also specifies the | |
metadata file to write to if using the <code>add</code> action with | |
the <code>-meta true</code> flag, or the file to dump to if using | |
the <code>export</code> action.</li> | |
<li><i>-schemaAction/-sa <schema action | none></i>: The | |
<A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A> defines the actions possible. The actions will | |
apply to all schema components used by the mappings involved. | |
Unless you are running the mapping tool on all of your persistent | |
types at once, be careful running schema actions that can drop data. | |
It is possible to accidentally drop schema components that are | |
used by classes you aren't currently running the tool over. The | |
action defaults to <code>add</code>.</li> | |
<li><i>-schemaFile/-sf <stdout | output file or resource></i>: Use | |
this option to write the planned schema to an XML document rather | |
than modify the data store.</li> | |
<li><i>-sqlFile/-sql <stdout | output file or resource></i>: Use | |
this option to write the planned schema changes as a SQL | |
script rather than modifying the data store.</li> | |
<li><i>-dropTables/-dt <true/t | false/f></i>: Corresponds to the | |
same-named option in the <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A>.</li> | |
<li><i>-dropSequences/-dsq <true/t | false/f></i>: Corresponds | |
to the same-named option in the <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A>.</li> | |
<li><i>-openjpaTables/-kt <true/t | false/f></i>: Corresponds to | |
the same-named option in the <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A>.</li> | |
<li><i>-ignoreErrors/-i <true/t | false/f></i>: Corresponds to the | |
same-named option in the <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaTool.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaTool</CODE></A>.</li> | |
<li><i>-readSchema/-rs <true/t | false/f></i>: Set this to true | |
to read the entire existing schema (even when false the parts of | |
the schema used by classes the tool is run on will still be read). | |
Turning on schema reading can ensure that no naming conflicts will | |
occur, but it can take a long time.</li> | |
<li><i>-primaryKeys/-pk <true/t | false/f></i>: Whether primary | |
keys on existing tables are manipulated. Defaults to false.</li> | |
<li><i>-foreignKeys/-fk <true/t | false/f></i>: Whether foreign | |
keys on existing tables are manipulated. Defaults to false.</li> | |
<li><i>-indexes/-ix <true/t | false/f></i>: Whether indexes on | |
existing tables are manipulated. Defaults to false.</li> | |
<li><i>-sequences/-sq <true/t | false/f></i>: Whether sequences | |
are manipulated. Defaults to true.</li> | |
<li><i>-schemas/-s <schema and table names></i>: A list of schemas | |
and/or tables to read. Corresponds to the | |
same-named option in the <A HREF="../../../../../org/apache/openjpa/jdbc/schema/SchemaGenerator.html" title="class in org.apache.openjpa.jdbc.schema"><CODE>SchemaGenerator</CODE></A>. This option | |
is ignored if <code>readSchema</code> is false.</li> | |
<li><i>-meta/-m <true/t | false/f></i>: Whether the given action | |
applies to metadata as well as mappings.</li> | |
</ul> | |
The various actions are as follows. | |
<ul> | |
<li><i>refresh</i>: Bring the mapping information up-to-date | |
with the class definitions. OpenJPA will attempt to use any provided | |
mapping information, and fill in missing information. If the | |
provided information conflicts with the class definition, the | |
conflicting information will be discarded and the class/field will | |
be re-mapped to new columns/tables. This is the default action.</li> | |
<li><i>add</i>: If used with the <code>-meta</code> option, adds new | |
default metadata for the given class(es). Otherwise, brings the | |
mapping information up-to-date with the class | |
definitions. OpenJPA will attempt to use any provided mapping | |
information, and fill in missing information. OpenJPA will fail if | |
the provided information conflicts with the class definition.</li> | |
<li><i>buildSchema</i>: Create the schema matching the existing | |
mappings for the given class(es). Any invalid mapping information | |
will cause an exception.</li> | |
<li><i>drop</i>: Delete mappings for the given classes. If used with | |
the <code>-meta</code> option, also deletes metadata.</li> | |
<li><i>validate</i>: Validate the given mappings. The mapping | |
repository and schema will not be affected.</li> | |
<li><i>import</i>: Import mappings from an XML document and store | |
them as the current system mappings.</li> | |
<li><i>export</i>: Dump the current mappings for the given classes to | |
an XML document specified by the <code>file</code> option.</li> | |
If used with the <code>-meta</code> option, the metadata will be | |
included in the export. | |
</ul> | |
Each class supplied as an argument must have valid metadata. If | |
no class arguments are given, the tool runs on all metadata files in | |
the CLASSPATH. | |
Examples: | |
<ul> | |
<li>Refresh the mappings for given package, without dropping any | |
schema components:<br /> | |
<code>java org.apache.openjpa.jdbc.meta.MappingTool | |
mypackage.jdo</code></li> | |
<li>Refresh the mappings for all persistent classes in the classpath, | |
dropping any unused columns and even tables:<br /> | |
<code>java org.apache.openjpa.jdbc.meta.MappingTool -sa refresh | |
-dt true</code></li> | |
<li>Make sure the mappings you've created by hand match the object | |
model and schema:<br /> | |
<code>java org.apache.openjpa.jbdc.meta.MappingTool | |
-a validate Person.java</code></li> | |
<li>Remove the recorded mapping for a given class:<br /> | |
<code>java org.apache.openjpa.jbdc.meta.MappingTool | |
-a drop Person.java</code></li> | |
<li>Record the current mappings in an XML file:<br /> | |
<code>java org.apache.openjpa.jdbc.meta.MappingTool | |
-f mypackage.orm -a export mypackage.jdo</code></li> | |
</ul> | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="run(org.apache.openjpa.jdbc.conf.JDBCConfiguration, java.lang.String[], org.apache.openjpa.lib.util.Options)"><!-- --></A><H3> | |
run</H3> | |
<PRE> | |
public static boolean <B>run</B>(<A HREF="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args, | |
<A HREF="../../../../../org/apache/openjpa/lib/util/Options.html" title="class in org.apache.openjpa.lib.util">Options</A> opts) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></PRE> | |
<DL> | |
<DD>Run the tool. Returns false if invalid options are given. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.html#main(java.lang.String[])"><CODE>main(java.lang.String[])</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="run(org.apache.openjpa.jdbc.conf.JDBCConfiguration, java.lang.String[], org.apache.openjpa.jdbc.meta.MappingTool.Flags, java.lang.ClassLoader)"><!-- --></A><H3> | |
run</H3> | |
<PRE> | |
public static boolean <B>run</B>(<A HREF="../../../../../org/apache/openjpa/jdbc/conf/JDBCConfiguration.html" title="interface in org.apache.openjpa.jdbc.conf">JDBCConfiguration</A> conf, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] args, | |
<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.Flags.html" title="class in org.apache.openjpa.jdbc.meta">MappingTool.Flags</A> flags, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A> loader) | |
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, | |
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></PRE> | |
<DL> | |
<DD>Run the tool. Return false if an invalid option was given. | |
<P> | |
<DD><DL> | |
</DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></CODE></DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MappingTool.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingStrategyInstaller.html" title="class in org.apache.openjpa.jdbc.meta"><B>PREV CLASS</B></A> | |
<A HREF="../../../../../org/apache/openjpa/jdbc/meta/MappingTool.Flags.html" title="class in org.apache.openjpa.jdbc.meta"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../index.html?org/apache/openjpa/jdbc/meta/MappingTool.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="MappingTool.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2006-2007 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |