mirror of https://github.com/apache/openjpa.git
Fixed class names of references to tools
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@446900 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0c34969609
commit
d746a3fd7c
|
@ -168,10 +168,11 @@ files listed above.
|
|||
<para>
|
||||
<indexterm>
|
||||
<primary>
|
||||
openjpac
|
||||
org.apache.openjpa.enhance.PCEnhancer
|
||||
</primary>
|
||||
</indexterm>
|
||||
<command>openjpac</command>: Runs the OpenJPA enhancer against the specified
|
||||
<command>org.apache.openjpa.enhance.PCEnhancer</command>:
|
||||
Runs the OpenJPA enhancer against the specified
|
||||
classes. More information is available in <xref linkend="ref_guide_pc_enhance"/>
|
||||
of the Reference Guide.
|
||||
</para>
|
||||
|
@ -180,10 +181,11 @@ classes. More information is available in <xref linkend="ref_guide_pc_enhance"/>
|
|||
<para>
|
||||
<indexterm>
|
||||
<primary>
|
||||
mappingtool
|
||||
org.apache.openjpa.jdbc.meta.MappingTool
|
||||
</primary>
|
||||
</indexterm>
|
||||
<command>mappingtool</command>: A utility that can be used to create and
|
||||
<command>org.apache.openjpa.jdbc.meta.MappingTool</command>:
|
||||
A utility that can be used to create and
|
||||
maintain the object-relational mappings and schema of all persistent classes in
|
||||
a JDBC-compliant datastore. This functionality allows the underlying mappings
|
||||
and schema to be easily kept up-to-date with the Java classes in the system. See
|
||||
|
@ -369,7 +371,7 @@ You can use any java compiler instead of <command>javac</command>.
|
|||
Enhance the persistent classes.
|
||||
</para>
|
||||
<programlisting>
|
||||
openjpac -p persistence.xml Animal.java Dog.java
|
||||
java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Animal.java Dog.java
|
||||
</programlisting>
|
||||
<para>
|
||||
This step runs the OpenJPA enhancer on the <filename>Animal.java</filename> and
|
||||
|
@ -413,13 +415,13 @@ the Reference Guide.
|
|||
<para>
|
||||
<indexterm>
|
||||
<primary>
|
||||
mappingtool
|
||||
org.apache.openjpa.jdbc.meta.MappingTool
|
||||
</primary>
|
||||
</indexterm>
|
||||
Create the object-relational mappings and database schema.
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -p persistence.xml Animal.java Dog.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Animal.java Dog.java
|
||||
</programlisting>
|
||||
<para>
|
||||
This command propagates the necessary schema for the specified classes to the
|
||||
|
@ -443,7 +445,7 @@ If you are curious, you can view the schema OpenJPA created for the tutorial
|
|||
classes with OpenJPA's schema tool:
|
||||
</para>
|
||||
<programlisting>
|
||||
schematool -p persistence.xml -a reflect -f tmp.schema
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool -p persistence.xml -a reflect -f tmp.schema
|
||||
</programlisting>
|
||||
<para>
|
||||
This will create a <filename>tmp.schema</filename> file with an XML
|
||||
|
@ -801,7 +803,7 @@ javac Rabbit.java
|
|||
Enhance the <classname>Rabbit</classname> class.
|
||||
</para>
|
||||
<programlisting>
|
||||
openjpac -p persistence.xml Rabbit.java
|
||||
java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Rabbit.java
|
||||
</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -809,7 +811,7 @@ openjpac -p persistence.xml Rabbit.java
|
|||
Refresh the object-relational mappings and database schema.
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -p persistence.xml Rabbit.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Rabbit.java
|
||||
</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
@ -889,7 +891,7 @@ javac Snake.java
|
|||
Enhance the class.
|
||||
</para>
|
||||
<programlisting>
|
||||
openjpac -p persistence.xml Snake.java
|
||||
java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Snake.java
|
||||
</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -901,7 +903,7 @@ As we have created a new persistent class, we must map it to the database and
|
|||
change the schema to match. So run the mapping tool:
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -p persistence.xml Snake.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Snake.java
|
||||
</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -1101,7 +1103,7 @@ enhance the classes.
|
|||
</para>
|
||||
<programlisting>
|
||||
javac Snake.java Rabbit.java
|
||||
openjpac -p persistence.xml Snake.java Rabbit.java
|
||||
java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Snake.java Rabbit.java
|
||||
</programlisting>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
@ -1109,7 +1111,7 @@ openjpac -p persistence.xml Snake.java Rabbit.java
|
|||
Refresh the mappings and database.
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -p persistence.xml Snake.java Rabbit.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Snake.java Rabbit.java
|
||||
</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
@ -1302,7 +1304,7 @@ javac *.java ejb/*.java jsp/*.java
|
|||
Enhance the Car class.
|
||||
</para>
|
||||
<programlisting>
|
||||
openjpac -p persistence.xml Car.java
|
||||
java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Car.java
|
||||
</programlisting>
|
||||
<para>
|
||||
Run the mapping tool; make sure that your <filename> META-INF/persistence.xml
|
||||
|
@ -1315,7 +1317,7 @@ include <classname>samples.persistence.j2ee.Car</classname> in the
|
|||
<config-property name="MetaDataFactory">Types=samples.persistence.j2ee.Car</config-property/>
|
||||
</programlisting>
|
||||
<programlisting>
|
||||
mappingtool -p persistence.xml Car.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml Car.java
|
||||
</programlisting>
|
||||
<para>
|
||||
Build an J2EE application archive by running Ant against the <filename>
|
||||
|
|
|
@ -235,7 +235,7 @@ number of lines to skip between sections of code. Defaults to 2.
|
|||
Code Formatting with the Reverse Mapping Tool
|
||||
</title>
|
||||
<programlisting>
|
||||
reversemappingtool -cf.spaceBeforeParen true -cf.tabSpaces 4
|
||||
java org.apache.openjpa.jdbc.meta.ReverseMappingTool -cf.spaceBeforeParen true -cf.tabSpaces 4
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
|
|
@ -4420,7 +4420,7 @@ Add the necessary schema components to the database to match the given XML
|
|||
document, but don't drop any data:
|
||||
</para>
|
||||
<programlisting>
|
||||
schematool targetSchema.xml
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool targetSchema.xml
|
||||
</programlisting>
|
||||
</example>
|
||||
<example id="ref_guide_schema_schematool_script">
|
||||
|
@ -4432,13 +4432,13 @@ Repeat the same action as the first example, but this time don't change the
|
|||
database. Instead, write any planned changes to a SQL script:
|
||||
</para>
|
||||
<programlisting>
|
||||
schematool -f script.sql targetSchema.xml
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool -f script.sql targetSchema.xml
|
||||
</programlisting>
|
||||
<para>
|
||||
Write a SQL script that will re-create the current database:
|
||||
</para>
|
||||
<programlisting>
|
||||
schematool -a createDB -f script.sql
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool -a createDB -f script.sql
|
||||
</programlisting>
|
||||
</example>
|
||||
<example id="ref_guide_schema_schematool_drop">
|
||||
|
@ -4449,7 +4449,7 @@ schematool -a createDB -f script.sql
|
|||
Drop the current database:
|
||||
</para>
|
||||
<programlisting>
|
||||
schematool -a dropDB
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool -a dropDB
|
||||
</programlisting>
|
||||
</example>
|
||||
<example id="ref_guide_schema_schematool_reflect">
|
||||
|
@ -4472,7 +4472,7 @@ Write an XML representation of the current schema to file <filename>schema.xml
|
|||
</filename>.
|
||||
</para>
|
||||
<programlisting>
|
||||
schematool -a reflect -f schema.xml
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool -a reflect -f schema.xml
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
|
|
@ -330,7 +330,7 @@ object-relational mapping data is always synchronized with your persistent class
|
|||
definitions, without needing to remember to invoke the mapping tool manually.
|
||||
The task's parameters correspond exactly to the long versions of the
|
||||
command-line arguments to the <link linkend="ref_guide_mapping_mappingtool">
|
||||
<literal> mappingtool</literal></link>.
|
||||
<literal>mappingtool</literal></link>.
|
||||
</para>
|
||||
<para>
|
||||
The mapping tool task accepts a nested <literal>fileset</literal> tag to specify
|
||||
|
|
|
@ -62,7 +62,7 @@ tool Ant task.
|
|||
Using the Mapping Tool
|
||||
</title>
|
||||
<programlisting>
|
||||
mappingtool Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
@ -260,7 +260,7 @@ model.
|
|||
Creating the Relational Schema from Mappings
|
||||
</title>
|
||||
<programlisting>
|
||||
mappingtool Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
@ -272,7 +272,7 @@ schemaAction</literal> to <literal>drop</literal>.
|
|||
Dropping Mappings and Association Schema
|
||||
</title>
|
||||
<programlisting>
|
||||
mappingtool -sa drop Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -sa drop Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
@ -309,7 +309,7 @@ This example uses your existing mappings to determine the needed schema, then
|
|||
writes the SQL to create that schema to <filename>create.sql</filename>.
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -a buildSchema -sa build -sql create.sql Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -a buildSchema -sa build -sql create.sql Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
<example id="ref_guid_mapping_ddl_part_ddl">
|
||||
|
@ -323,7 +323,7 @@ writes the SQL to add any missing tables and columns to the current schema to
|
|||
<filename>update.sql</filename>.
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -a buildSchema -sql update.sql Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -a buildSchema -sql update.sql Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
@ -381,7 +381,7 @@ correspond go the long versions of the tool's command line flags.
|
|||
The setting above corresponds to running the following command:
|
||||
</para>
|
||||
<programlisting>
|
||||
mappingtool -a buildSchema -fk true
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -a buildSchema -fk true
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
@ -446,7 +446,7 @@ database.
|
|||
Reflection with the Schema Tool
|
||||
</title>
|
||||
<programlisting>
|
||||
schematool -a reflect -f schema.xml
|
||||
java org.apache.openjpa.jdbc.schema.SchemaTool -a reflect -f schema.xml
|
||||
</programlisting>
|
||||
</example>
|
||||
</listitem>
|
||||
|
@ -480,7 +480,7 @@ the database. The tool can be run via the included <literal>reversemappingtool
|
|||
Using the Reverse Mapping Tool
|
||||
</title>
|
||||
<programlisting>
|
||||
reversemappingtool -pkg com.xyz -d ~/src -cp customizer.properties schema.xml
|
||||
java org.apache.openjpa.jdbc.meta.ReverseMappingTool -pkg com.xyz -d ~/src -cp customizer.properties schema.xml
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
@ -824,7 +824,7 @@ default value generated by the reverse mapping tool.
|
|||
Customizing Reverse Mapping with Properties
|
||||
</title>
|
||||
<programlisting>
|
||||
reversemappingtool -pkg com.xyz -cp custom.properties schema.xml
|
||||
java org.apache.openjpa.jdbc.meta.ReverseMappingTool -pkg com.xyz -cp custom.properties schema.xml
|
||||
</programlisting>
|
||||
<para>
|
||||
Example <filename>custom.properties</filename>:
|
||||
|
@ -894,7 +894,7 @@ when your mappings are incorrect.
|
|||
Validating Mappings
|
||||
</title>
|
||||
<programlisting>
|
||||
mappingtool -a validate Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool -a validate Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
@ -916,7 +916,7 @@ defaults ( <xref linkend="ref_guide_mapping_defaults"/> ).
|
|||
Creating the Relational Schema from Mappings
|
||||
</title>
|
||||
<programlisting>
|
||||
mappingtool Magazine.java
|
||||
java org.apache.openjpa.jdbc.meta.MappingTool Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
</section>
|
||||
|
|
|
@ -138,9 +138,9 @@ are loaded into the JVM. The following sections describe each option.
|
|||
</secondary>
|
||||
</indexterm>
|
||||
<para>
|
||||
The enhancer can be invoked at build time via the included <literal>openjpac
|
||||
</literal> script or via its Java class, <classname>
|
||||
org.apache.openjpa.enhance.PCEnhancer</classname>.
|
||||
The enhancer can be invoked at build time
|
||||
via the Java tool,
|
||||
<classname>org.apache.openjpa.enhance.PCEnhancer</classname>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
|
@ -153,7 +153,7 @@ You can also enhance via Ant; see <xref linkend="ref_guide_integration_enhance"/
|
|||
Using the OpenJPA Enhancer
|
||||
</title>
|
||||
<programlisting>
|
||||
openjpac Magazine.java
|
||||
java org.apache.openjpa.enhance.PCEnhancer Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
@ -513,8 +513,7 @@ generated identity class. Once the application identity tool has generated the
|
|||
class code, you can set the <literal>@IdClass</literal> annotation.
|
||||
</para>
|
||||
<para>
|
||||
The application identity tool can be invoked via the included <literal>
|
||||
appidtool</literal> shell/bat script or via its Java class,
|
||||
The application identity tool can be invoked via the Java class,
|
||||
<ulink url="../apidocs/org/apache/openjpa/enhance/ApplicationIdTool">
|
||||
<classname>org.apache.openjpa.enhance.ApplicationIdTool</classname></ulink>.
|
||||
</para>
|
||||
|
@ -529,7 +528,7 @@ application identity tool's Ant task.
|
|||
Using the Application Identity Tool
|
||||
</title>
|
||||
<programlisting>
|
||||
appidtool -s Id Magazine.java
|
||||
java org.apache.openjpa.enhance.ApplicationIdTool -s Id Magazine.java
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
|
|
|
@ -86,31 +86,23 @@ You should then proceed to pass in the configuration file you are using to the
|
|||
enhancer:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>openjpac -p persistence.xml Machine.java Crane.java Bulldozer.java
|
||||
Operator.java</userinput>
|
||||
</para>
|
||||
<para>
|
||||
or
|
||||
</para>
|
||||
<para>
|
||||
<userinput>jdoc -p jdo.properties Machine.java Crane.java Bulldozer.java
|
||||
<userinput>java org.apache.openjpa.enhance.PCEnhancer -p persistence.xml Machine.java Crane.java Bulldozer.java
|
||||
Operator.java</userinput>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Similarly, you should pass in the same argument to <literal>mappingtool
|
||||
</literal>:
|
||||
Similarly, you should pass in the same argument to <literal>org.apache.openjpa.jdbc.meta.MappingTool</literal>:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>mappingtool -p persistence.xml -a buildSchema Machine.java
|
||||
<userinput>java org.apache.openjpa.jdbc.meta.MappingTool -p persistence.xml -a buildSchema Machine.java
|
||||
Crane.java Bulldozer.java Operator.java</userinput>
|
||||
</para>
|
||||
<para>
|
||||
or
|
||||
</para>
|
||||
<para>
|
||||
<userinput>mappingtool -p jdo.properties -a buildSchema Machine.java Crane.java
|
||||
<userinput>java org.apache.openjpa.jdbc.meta.MappingTool -p jdo.properties -a buildSchema Machine.java Crane.java
|
||||
Bulldozer.java Operator.java</userinput>
|
||||
</para>
|
||||
</listitem>
|
||||
|
|
Loading…
Reference in New Issue