You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by he...@apache.org on 2012/11/21 21:34:03 UTC

svn commit: r1412274 - /openjpa/site/trunk/content/migration-tool.mdtext

Author: helenxu
Date: Wed Nov 21 20:34:02 2012
New Revision: 1412274

URL: http://svn.apache.org/viewvc?rev=1412274&view=rev
Log:
CMS migration

Modified:
    openjpa/site/trunk/content/migration-tool.mdtext

Modified: openjpa/site/trunk/content/migration-tool.mdtext
URL: http://svn.apache.org/viewvc/openjpa/site/trunk/content/migration-tool.mdtext?rev=1412274&r1=1412273&r2=1412274&view=diff
==============================================================================
--- openjpa/site/trunk/content/migration-tool.mdtext (original)
+++ openjpa/site/trunk/content/migration-tool.mdtext Wed Nov 21 20:34:02 2012
@@ -6,41 +6,48 @@ This command-line utility translates pro
 standard JPA mapping descriptors.
 
 <a name="MigrationTool-Download"></a>
-### Download
+## Download
 
 The latest OpenJPA Tools JAR file can be download from the [SNAPSHOT Repository](https://repository.apache.org/content/repositories/snapshots/org/apache/openjpa/tools/openjpa-tools/0.1.0-SNAPSHOT/)
- or can be built from the source code in [svn|https://svn.apache.org/repos/asf/openjpa/tools/trunk]
+ or can be built from the source code in [svn](https://svn.apache.org/repos/asf/openjpa/tools/trunk)
  by using Maven 2.2.1 and Java SE 6.
 
 
 <a name="MigrationTool-Usage:"></a>
-### Usage:
+## Usage:
 
 
-      $ java org.apache.openjpa.tools.MigrationTool -input xyz.xml [-output xyz.orm.xml]
- [-actions migration-actions.xml]
- [-verbose true]
+      $ java org.apache.openjpa.tools.MigrationTool -input xyz.xml [-output xyz.orm.xml] [-actions migration-actions.xml]  [-verbose true]
 
 where
-<table>
-<tr><td>-input </td><td> input location of the proprietary XML mapping descriptor
+
+<table >
+<tr>
+<td class="border">-input </td>
+<td class="border"> input location of the proprietary XML mapping descriptor
 resource. The resource is looked up in the current classpath. If not
 located as a resource, then looked up as an input file in relative to the
-current directory. This option is mandatory</th></tr>
-<tr><td>-output</td><td> output location of the translated mapping descriptor file. This
+current directory. This option is mandatory
+</td>
+</tr>
+<tr>
+<td class="border">-output</td>
+<td class="border"> output location of the translated mapping descriptor file. This
 option is not mandatory. If unspecified, the output is simply printed on
-the standard console. </th></tr>
-<tr><td>-actions</td><td> the actions to be performed on every element of the input
-descriptor elements. These actions are specified as XML elements compliant
-to a [XML schema](http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xsd?r=HEAD)
-. A template of these actions for a _subset_ of Hibernate elements is
-included in [migration-actions.xml</td><td>http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xml?r=HEAD]
-. 
+the standard console. 
+</td>
 </tr>
+<tr><td class="border">-actions</td>
+<td class="border"> the actions to be performed on every element of the input
+descriptor elements. These actions are specified as XML elements compliant
+to a <A href="http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xsd?r=HEAD" class="external-link" rel="nofollow">XML schema</A>. A template of these actions for a _subset_ of Hibernate elements is
+included in <A href="http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xml?r=HEAD" class="external-link" rel="nofollow">migration-actions.xml</A>. 
 This option is not mandatory. The archetype for translating Hibernate
-mapping descriptor is used as a default.||
-<tr><td>-verbose</td><td>prints detailed trace of what the tool is doing. This option is
-not mandatory. If unspecified,	detailed messages are not printed.</th></tr>
+mapping descriptor is used as a default.
+</td>
+</tr>
+<tr><td class="border">-verbose</td><td class="border">prints detailed trace of what the tool is doing. This option is
+not mandatory. If unspecified,	detailed messages are not printed.</td></tr>
 </table>
 
 
@@ -52,8 +59,7 @@ applies one or more actions to translate
 descriptor.
 For example, consider the input fragment
 
-    <class name="com.approuter.deploy.Project" table="PROJECTS"
-select-before-update="false">
+    <class name="com.approuter.deploy.Project" table="PROJECTS" select-before-update="false">
       <id name="id" type="java.lang.Long" column="ID">
     	<generator class="native" />
       </id>
@@ -67,40 +73,27 @@ This fragment will be translated by the 
         <table name="PROJECTS"/>
         <attributes>
           <id name="id">
-    	<column name="ID"/>
-    	<generated-value strategy="AUTO"/>
+    	     <column name="ID"/>
+    	     <generated-value strategy="AUTO"/>
           </id>
         </attributes>
     </entity>
 
 
 The series of actions that translated this fragments are as follows:
+
 * The input element *<class>* is translated to *<entity>* element. 
-* The *name* attribute of input element *<class>* is translated to
-*class* attribute. The value of the attribute remained intact.
-* the *table* attribute of input element *<class>* is translated to a
-new element *<table>*. The value of the *table* attribute appeared as
-*name* attribute in the translated element.
-* the attribute *select-before-update* is ignored as it does not have a
-direct counterpart in standard JPA mapping descriptor. Actually this
-attribute controls runtime behavior and it is debatable whether a mapping
-descriptor is the proper place for such an attribute.
-* a new element *<attributes>* appeared in the translated document which
-had no equivalent counterpart in the original document.
-* the *column* attribute of input element *<id>* is translated to a new
-element *<column>*. The value of the *column* attribute appeared as
-*name* attribute in the translated element.
-* the input element *<generator>* is translated to *<generated-value>*
-element. 
-* the *class* attribute of input element *<generator>* is translated to
-a *strategy* attribute. The value of the attribute is translated from
-*native* to *AUTO*.
-
-
-The translation was carried out by a series of _generic_, _parameterized_
-_actions_. The actions are specified in [migration-actions.xml](http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xml?r=HEAD)
-. Here is a snippet from that archetype to define those generic actions and
-their parameters.
+* The *name* attribute of input element *<class>* is translated to *class* attribute. The value of the attribute remained intact.
+* the *table* attribute of input element *<class>* is translated to a new element *<table>*. The value of the *table* attribute appeared as *name* attribute in the translated element.
+* the attribute *select-before-update* is ignored as it does not have a direct counterpart in standard JPA mapping descriptor. Actually this attribute controls runtime behavior and it is debatable whether a mapping descriptor is the proper place for such an attribute.
+* a new element *<attributes>* appeared in the translated document which had no equivalent counterpart in the original document.
+* the *column* attribute of input element *<id>* is translated to a new element *<column>*. The value of the *column* attribute appeared as *name* attribute in the translated element.
+* the input element *<generator>* is translated to *<generated-value>* element. 
+* the *class* attribute of input element *<generator>* is translated to a *strategy* attribute. The value of the attribute is translated from *native* to *AUTO*.
+
+
+
+The translation was carried out by a series of _generic_, _parameterized_ _actions_. The actions are specified in [migration-actions.xml](http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xml?r=HEAD). Here is a snippet from that archetype to define those generic actions and their parameters.
 
     <actions for="class">
     	<rename-node to="entity"/>
@@ -128,14 +121,12 @@ their parameters.
     </actions>
 
 
-The schema that specifies what actions are supported and their parameters
-are defined in a [XML schema](http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xsd?r=HEAD)
-.
+The schema that specifies what actions are supported and their parameters are defined in a [XML schema](http://fisheye6.atlassian.com/browse/openjpa/tools/trunk/openjpa-tools/src/main/resources/META-INF/migration-actions.xsd?r=HEAD).
 
-{info:title=Work in Progress}
+<span class="info">
    This tool is at experimental stage of development and does not cater to
 all possible variations that such a translation may require. However, that
 is why the design allows new custom actions be defined and applied to cater
 to more complex use cases. 
-{info}
- 
\ No newline at end of file
+</span>
+