kaz         02/05/09 15:59:35

  Modified:    xdocs    tutorial.xml
  Log:
  Updated the tutorial for the latest release.  Now all I have to do is
  get a zip distribution of b2 up on the site for download.
  
  Revision  Changes    Path
  1.5       +35 -33    jakarta-turbine-torque/xdocs/tutorial.xml
  
  Index: tutorial.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/xdocs/tutorial.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- tutorial.xml      6 May 2002 02:06:53 -0000       1.4
  +++ tutorial.xml      9 May 2002 22:59:35 -0000       1.5
  @@ -42,7 +42,7 @@
                   First, you need to obtain the Torque distribution.  As
                   of this writing, the standalone version of Torque has
                   not been released; however, there is a beta version <a
  -                
href="http://jakarta.apache.org/builds/jakarta-turbine/torque/release/3.0-b1/torque-3.0-b1.zip";>available</a>.
  +                
href="http://jakarta.apache.org/builds/jakarta-turbine/torque/release/3.0-b2/torque-3.0-b2.zip";>available</a>.
                   After you have obtained your copy of the Torque
                   distribution, you need to unpack it to a directory where
                   you want to develop your application.  This will create
  @@ -90,13 +90,16 @@
                       if you have a question regarding part of the file
                       that is not covered here.  Make the following
                       changes and edit appropriately for your environment.
  -                    The properties are described in the table following:
  +                    The properties are described in the table following
  +                    (note: you'll need to add the
  +                    <em>buildDatabaseUrl</em> property):
                   </p>
                   <source><![CDATA[
     project = bookstore
     database = mysql
     targetPackage = com.kazmier.om 
     createDatabaseUrl = jdbc:mysql://127.0.0.1/mysql  
  +  buildDatabaseUrl = jdbc:mysql://127.0.0.1/bookstore
     databaseUrl = jdbc:mysql://127.0.0.1/bookstore
     databaseDriver = org.gjt.mm.mysql.Driver
     databaseUser = adminuser
  @@ -151,7 +154,7 @@
                           </td>
                       </tr>
                       <tr>
  -                        <td>databaseURL</td>
  +                        <td>buildDatabaseURL</td>
                           <td>
                               The URL that will be used to access your
                               database.  Torque can use this to create
  @@ -162,6 +165,14 @@
                           </td>
                       </tr>
                       <tr>
  +                        <td>databaseURL</td>
  +                        <td>
  +                            This should contain the same value as
  +                            <em>buildDatabaseURL</em>.  [not quite sure
  +                            why both of these properties exist]
  +                        </td>
  +                    </tr>
  +                    <tr>
                           <td>databaseDriver</td>
                           <td>
                               The JDBC database driver to use when
  @@ -701,7 +712,7 @@
                       <em>torque</em> directory:
                   </p>
                   <source><![CDATA[
  -  ant  
  +  ant -f build-torque.xml 
                   ]]></source>
                   <p/>
                   <p>
  @@ -766,32 +777,23 @@
                       in the top-level <em>torque</em> directory:
                   </p>
                   <source><![CDATA[
  -  ant project-create-db  
  +  ant -f build-torque.xml project-create-db  
                   ]]></source>
                   <p>
  -                    Note: this will fail in the current beta version of
  -                    Torque due to an oversight that will be corrected in
  -                    the next beta.  The fix is relatively simple, remove
  -                    the following attributes from the
  -                    <em>project-create-db</em> Ant task in
  -                    <em>build.xml</em> (don't delete the '&gt;' on the
  -                    <em>databaseHost</em> line!):
  -                </p>
  -                <source><![CDATA[
  -  targetPlatform="${platform}"
  -  databaseUser="${databaseUser}"
  -  databasePassword="${databasePassword}"
  -  databaseHost="${databaseHost}"
  -                 ]]></source>
  -                <p>
  -                    To create your tables, type the following command in
  +                    To create your tables, type the following commands in
                       the top-level <em>torque</em> directory:
                   </p>
                   <source><![CDATA[
  -  ant id-table-init-sql
  -  ant project-insert-sql  
  +  ant -f build-torque.xml id-table-init-sql
  +  ant -f build-torque.xml project-insert-sql  
                   ]]></source>
                   <p>
  +                    Note: if this tutorial had not utilized Torque's
  +                    <em>idbroker</em> method (as described earlier), it
  +                    would not have been necessary to execute the
  +                    <em>id-table-init-sql</em> target.
  +                </p>
  +                <p>
                       Success will be indicated by the &#145;BUILD
                       SUCCESSFUL&#146; message.  You can also validate
                       this by checking your database.  For example, the
  @@ -1030,7 +1032,7 @@
                   </p>
                   <source><![CDATA[
     Criteria crit = new Criteria();
  -  Vector v = BookPeer.doSelect(crit);  
  +  List v = BookPeer.doSelect(crit);  
                   ]]></source>
                   <p>
                       The results are stored in a vector which can then be
  @@ -1117,7 +1119,7 @@
                   <source><![CDATA[
     Criteria crit = new Criteria();
     crit.add(BookPeer.ISBN, "0-618-12902-2");  
  -  Vector v = BookPeer.doSelect(crit);
  +  List v = BookPeer.doSelect(crit);
                   ]]></source>
                   <p>
                       This section has only skimmed the surface of
  @@ -1329,7 +1331,7 @@
                       suggestion in the 
                       <a href="peers-howto.html#Useful%20Methods">Peers
                       Howto</a>) we'll add <em>doSelectAll</em>
  -                    methods which will return a Vector of all the Data
  +                    methods which will return a List of all the Data
                       Objects in a table.  The following are the modified
                       <em>BookPeer</em>, <em>AuthorPeer</em>, and
                       <em>PublisherPeer</em> classes which are located in
  @@ -1342,7 +1344,7 @@
   public class BookPeer 
       extends com.kazmier.om.BaseBookPeer
   {
  -    public static Vector doSelectAll() throws Exception
  +    public static List doSelectAll() throws Exception
       {
           Criteria crit = new Criteria();
           return doSelect(crit);
  @@ -1355,7 +1357,7 @@
   public class AuthorPeer 
       extends com.kazmier.om.BaseAuthorPeer
   {
  -    public static Vector doSelectAll() throws Exception
  +    public static List doSelectAll() throws Exception
       {
           Criteria crit = new Criteria();
           return doSelect(crit);
  @@ -1368,7 +1370,7 @@
   public class PublisherPeer 
       extends com.kazmier.om.BasePublisherPeer
   {
  -    public static Vector doSelectAll() throws Exception
  +    public static List doSelectAll() throws Exception
       {
           Criteria crit = new Criteria();
           return doSelect(crit);
  @@ -1461,8 +1463,8 @@
                * helper method defined in BookPeer
                * (doSelectAll).
                */
  -            System.out.println("Full booklist:\n"); Vector
  -            booklist = BookPeer.doSelectAll();
  +            System.out.println("Full booklist:\n"); 
  +            List booklist = BookPeer.doSelectAll();
               printBooklist(booklist);
   
               /*
  @@ -1525,7 +1527,7 @@
       /*
        * Helper method to print a booklist to standard out.
        */
  -    private static void printBooklist(Vector booklist) 
  +    private static void printBooklist(List booklist) 
           throws Exception
       {
           Iterator i = booklist.iterator();
  @@ -1557,7 +1559,7 @@
                       following in the Torque top-level directory:
                   </p>
                   <source><![CDATA[
  -  ant compile  
  +  ant -f build-torque.xml compile  
                   ]]></source>
                   <p>
                       If you've done everything correctly, this should
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to