Author: tfischer
Date: Sun Nov 26 06:04:06 2006
New Revision: 479360
URL: http://svn.apache.org/viewvc?view=rev&rev=479360
Log:
- Some fixes in the tutorial.
- talking of "Maven 1 Plugin" instead of "Generator" in the tutorial
Modified:
db/torque/tutorial/trunk/xdocs/index.xml
db/torque/tutorial/trunk/xdocs/step1.xml
db/torque/tutorial/trunk/xdocs/step2.xml
db/torque/tutorial/trunk/xdocs/step3.xml
db/torque/tutorial/trunk/xdocs/step4.xml
db/torque/tutorial/trunk/xdocs/step5.xml
db/torque/tutorial/trunk/xdocs/step6.xml
Modified: db/torque/tutorial/trunk/xdocs/index.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/index.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/index.xml (original)
+++ db/torque/tutorial/trunk/xdocs/index.xml Sun Nov 26 06:04:06 2006
@@ -39,7 +39,7 @@
setting up a database, and writing a sample application
to demonstrate the power of Torque. The tutorial is not
meant to be an exhaustive introduction to Torque, please
- refer to the documentation on the
+ refer to the
<a href="../../../documentation/index.html">Torque documentation</a>
for more detailed information.
</p>
@@ -93,7 +93,8 @@
the <a href="../">runtime</a> and provides a
<a href="../maven-plugin/">Maven 1 plugin</a> for executing
the generator using <a href="http://maven.apache.org/maven-1.x">
- Maven 1</a>.
+ Maven 1</a>, and further been updated to reflect the changes in Torque 3.2
+ and Torque 3.3.
</p>
</section>
Modified: db/torque/tutorial/trunk/xdocs/step1.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/step1.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/step1.xml (original)
+++ db/torque/tutorial/trunk/xdocs/step1.xml Sun Nov 26 06:04:06 2006
@@ -30,7 +30,7 @@
<section name="Step 1: Installing Maven 1 and the Torque Maven Plugin">
<p>
- First of all, note that Torque is divided into three parts.
+ First of all, note that Torque is divided into four parts.
<ul>
<li>
The generator generates your persistence classes from an xml
@@ -40,11 +40,12 @@
The generator comes packaged in two jars: The templates in
torque-gen-templates.jar, and the rest in torque-gen.jar.
In this tutorial, you will not use the generator directly, but you
- will invoke it using the Maven plugin.
+ will invoke it using the Maven 1 plugin. This also means that you do
+ not have to download the generator separately from the maven 1 plugin.
</li>
<li>
The Maven 1 plugin integrates the generator into
- <a href="http://maven.apache.org/maven1">Maven</a>, a software
+ <a href="http://maven.apache.org/maven1">Maven 1</a>, a software
project management tool. In other words, the maven plugin is
a frontend for the generator.
</li>
@@ -52,8 +53,12 @@
The runtime has to be included in your projects for the generated classes
to work properly.
</li>
+ <li>
+ There is also a Maven 2 plugin available, but this is not covered
+ in this tutorial.
+ </li>
</ul>
- For this tutorial, we will be using the maven plugin for Torque 3.3
+ For this tutorial, we will be using the maven 1 plugin for Torque 3.3
(which will silently invoke the generator) to
generate our object model classes and sql scripts. For working with the
generated classes, we will use the Torque 3.3 runtime for our
@@ -64,7 +69,7 @@
If you have not already done so, download and install
<a href="http://maven.apache.org/maven-1.x">Maven 1</a>.
It is highly recommended to use version 1.0.2 of Maven.
- You can not use the Torque Maven plugin with Maven 2.
+ You can not use the Torque Maven 1 plugin with Maven 2.
</p>
<p>
Modified: db/torque/tutorial/trunk/xdocs/step2.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/step2.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/step2.xml (original)
+++ db/torque/tutorial/trunk/xdocs/step2.xml Sun Nov 26 06:04:06 2006
@@ -20,21 +20,21 @@
<document>
<properties>
- <title>Torque Tutorial - Step 2: Configuring the Torque generator</title>
+ <title>Torque Tutorial - Step 2: Configuring the Torque generation
process</title>
<author email="[EMAIL PROTECTED]">Pete Kazmier</author>
<author email="[EMAIL PROTECTED]">Scott Eade</author>
<author email="[EMAIL PROTECTED]">Thomas Fischer</author>
</properties>
<body>
-<section name="Step 2: Configuring the Torque generator">
+<section name="Step 2: Configuring the Torque generation process">
<p>
The following section outlines the necessary steps to
- define your database schema and configure the Torque generator
+ define your database schema and configure the Torque maven 1 plugin
to use your schema. Upon completion, you'll be able to use
the generator to create your object model and all of the Java
- classes that support it. In addition, the generator can
+ classes that support it. In addition, the maven 1 plugin can
generate and execute all of the appropriate SQL commands
to create your database, freeing you from having to do it
manually.
@@ -42,8 +42,8 @@
<p>
To accomplish all of the above, you need to
- create/edit the Torque generator properties file
- (which is providing the generator with the
+ create/edit the Torque maven 1 plugin properties file
+ (which is providing the maven 1 plugin with the
necessary information)
and the Torque database schema file(s)
(which contain the structure of your database).
@@ -62,17 +62,19 @@
</section>
-<section name="Torque Generator Properties">
+<section name="Torque Maven 1 Plugin Properties">
<p>
- The Torque generator literally generates Java
+ The maven 1 plugin generates Java
source/class files representing your object model,
SQL statements for your specific database, and
documentation.
- You configure the generator by setting properties in the
+ You configure the maven 1 plugin by setting properties in the
<em>project.properties</em> file in root directory of your
project. As a starting point, use the following template
- and edit it to reflect your specific needs
+ and edit it to reflect your specific needs (
+ typically you need to change the database, the database urls,
+ the database driver, the database host, the database user and password):
</p>
<source><![CDATA[
@@ -119,6 +121,8 @@
</p>
<p>
+ The properties that can be used in the maven 1 plugin are identical to those
+ that can be used in the ant-based generator.
For a reference as to what each property, and others, controls, please
see the <a href="../generator/properties-reference.html">properties
reference</a> for the Torque generator.
@@ -174,7 +178,7 @@
<source><![CDATA[
<!DOCTYPE database SYSTEM
- "http://db.apache.org/torque/dtd/database_3_2.dtd">
+ "http://db.apache.org/torque/dtd/database_3_3.dtd">
<database
name="bookstore"
@@ -395,7 +399,8 @@
and creating your database.
</p>
<p>
- Next we will look <a href="step3.html">Invoking the Torque generator</a>.
+ Next we will look at
+ <a href="step3.html">Invoking the Torque Maven 1 plugin</a>.
</p>
</section>
Modified: db/torque/tutorial/trunk/xdocs/step3.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/step3.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/step3.xml (original)
+++ db/torque/tutorial/trunk/xdocs/step3.xml Sun Nov 26 06:04:06 2006
@@ -20,23 +20,20 @@
<document>
<properties>
- <title>Torque Tutorial - Step 3: Invoking the Torque generator</title>
+ <title>Torque Tutorial - Step 3: Invoking the Torque Maven 1 Plugin</title>
<author email="[EMAIL PROTECTED]">Pete Kazmier</author>
<author email="[EMAIL PROTECTED]">Scott Eade</author>
<author email="[EMAIL PROTECTED]">Thomas Fischer</author>
</properties>
<body>
-<section name="Step 3: Invoking the Torque generator">
+<section name="Step 3: Invoking the Torque Maven 1 Plugin">
<p>
- With the configuration of the Torque generator completed, you can now
+ With the configuration of the Torque Maven 1 Plugin completed, you can now
generate the object model to support your database, and
- optionally create your database and all of its
- associated tables. As mentioned earlier in this
- tutorial, Torque utilizes Maven to perform these tasks.
- Each of these tasks is covered in the following
- sections.
+ optionally create your database and all of its associated tables.
+ Each of these tasks is covered in the following sections.
</p>
<p>
@@ -227,15 +224,13 @@
</p>
<p>
- For example, if the downloaded driver was put into the local
- repository as
- <em>mysql/jars/mysql-connector-java-3.1.6-bin.jar</em>,
+ For example, if you use the mysql 5.0.4 driver,
<code>${artifactId}</code> would be set to
<code>mysql-connector-java</code>,
<code>${groupId}</code> would be set to
<code>mysql</code>,
and <code>${version}</code> would be set to
- <code>3.1.6-bin</code> in the <em>project.xml</em>.
+ <code>5.0.4</code> in the <em>project.xml</em>.
</p>
</subsection>
Modified: db/torque/tutorial/trunk/xdocs/step4.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/step4.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/step4.xml (original)
+++ db/torque/tutorial/trunk/xdocs/step4.xml Sun Nov 26 06:04:06 2006
@@ -65,7 +65,7 @@
<dependency>
<artifactId>torque</artifactId>
<groupId>torque</groupId>
- <version>3.3</version>
+ <version>3.3-RC1</version>
</dependency>
<dependency>
Modified: db/torque/tutorial/trunk/xdocs/step5.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/step5.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/step5.xml (original)
+++ db/torque/tutorial/trunk/xdocs/step5.xml Sun Nov 26 06:04:06 2006
@@ -83,7 +83,7 @@
<p>
Now that we've covered the basics of the object model
that Torque generated for you, the rest of this section
-describes the Torque-way of doing database inserts,
+describes the Torque way of doing database inserts,
selects, updates, and deletes illustrated with small
segments of code. These segments of code are part of a
sample application that is presented in full after a
@@ -533,7 +533,6 @@
public class Book
extends com.kazmier.om.BaseBook
- implements Persistent
{
public String toString()
{
@@ -555,7 +554,6 @@
// Author.java
public class Author
extends com.kazmier.om.BaseAuthor
- implements Persistent
{
public String toString()
{
@@ -566,7 +564,6 @@
// Publisher.java
public class Publisher
extends com.kazmier.om.BasePublisher
- implements Persistent
{
public String toString()
{
Modified: db/torque/tutorial/trunk/xdocs/step6.xml
URL:
http://svn.apache.org/viewvc/db/torque/tutorial/trunk/xdocs/step6.xml?view=diff&rev=479360&r1=479359&r2=479360
==============================================================================
--- db/torque/tutorial/trunk/xdocs/step6.xml (original)
+++ db/torque/tutorial/trunk/xdocs/step6.xml Sun Nov 26 06:04:06 2006
@@ -133,11 +133,12 @@
<p>
Now everything is in one place, and you can start the
- application by typing
+ application by typing (note:exchange the mysql-connector-java-5.0.4.jar
+ by the datatbase driver jar you are using)
</p>
<source><![CDATA[
-java -cp
classes:lib/avalon-framework-4.1.4.jar:lib/commons-beanutils-1.7.0.jar:lib/commons-collections-3.1.jar:lib/commons-configuration-1.1.jar:lib/commons-dbcp-1.2.1.jar:lib/commons-lang-2.1.jar:lib/commons-logging-1.0.4.jar:lib/commons-pool-1.2.jar:lib/jcs-20030822.182132.jar:lib/mysql-connector-java-5.0.4-bin.jar:lib/torque-3.3-rc3.jar:lib/village-2.0.jar
com.kazmier.Bookstore
+java -cp
classes:lib/avalon-framework-4.1.4.jar:lib/commons-beanutils-core-1.7.0.jar:lib/commons-collections-3.1.jar:lib/commons-configuration-1.2.jar:lib/commons-dbcp-1.2.1.jar:lib/commons-lang-2.1.jar:lib/commons-logging-1.0.4.jar:lib/commons-pool-1.2.jar:lib/jcs-20030822.182132.jar:lib/mysql-connector-java-5.0.4.jar:lib/torque-3.3-RC1.jar:lib/village-2.0.jar
com.kazmier.Bookstore
]]></source>
<p>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]