You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jo...@apache.org on 2001/07/06 20:24:15 UTC

cvs commit: jakarta-turbine/xdocs/howto context-howto.xml peers-howto.xml

jon         01/07/06 11:24:14

  Modified:    docs/howto context-howto.html peers-howto.html
               xdocs/howto context-howto.xml peers-howto.xml
  Log:
  documentation fixes by Park Walker <pa...@tagl.com>
  
  Revision  Changes    Path
  1.7       +6 -5      jakarta-turbine/docs/howto/context-howto.html
  
  Index: context-howto.html
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/docs/howto/context-howto.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- context-howto.html	2001/07/04 15:53:50	1.6
  +++ context-howto.html	2001/07/06 18:24:11	1.7
  @@ -542,10 +542,11 @@
         <tr><td>
           <blockquote>
                                       <p>
  -As the Context is stored as a Hashtable any Object can be placed inside it and
  -be accessed from a template. For instance, in a Velocity Screen in the
  -doBuildTemplate() method, a String could be added to the Context. Please refer
  -to the Getting Started documentation for more examples of using the Velocity
  +As the Context is stored as a Hashtable any Object can be placed inside
  +it and be accessed from a template. For instance, in a Velocity Screen
  +in the doBuildTemplate() method, a String could be added to the Context.
  +Please refer to the <a href="../getting-started.html">Getting
  +Started</a> documentation for more examples of using the Velocity
   Context with screens and events.
   </p>
                                                       <div align="left">
  @@ -791,7 +792,7 @@
   adding the Image object to the Velocity Context. Then use this class as the
   parent class for the Screens that need access to the Image Object. For more
   detail on taking advantage and extending the VelocityScreen Object, please view
  -the <a href="getting-started.html">Getting Started</a> Document.
  +the <a href="../getting-started.html">Getting Started</a> Document.
   </p>
                                                   <p>
   The above Image Object can also be modified to include any static data required
  
  
  
  1.10      +26 -24    jakarta-turbine/docs/howto/peers-howto.html
  
  Index: peers-howto.html
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/docs/howto/peers-howto.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- peers-howto.html	2001/07/04 15:54:00	1.9
  +++ peers-howto.html	2001/07/06 18:24:12	1.10
  @@ -161,8 +161,8 @@
                                                   <p>
   Peers use Turbine's Database adaptor classes that make uniform connection
   to a wide range of databases possible.  If your database is not supported
  -you can read the Database Adapter docs on how to create a new adaptor for
  -your database.
  +you can read the <a href="../db-adapters.html">Database Adapter</a> docs on 
  +how to create a new adaptor for your database.
   </p>
                                                   <p>
   NOTE: If you would like to use Peers outside of the Turbine Servlet
  @@ -515,18 +515,21 @@
         <tr><td>
           <blockquote>
                                       <p>
  -Peer classes are typically generated by invoking one of the
  -<i>build-project</i> scripts that are provided by the TDK.  On a unix
  -host, for example, the relevant script is called
  -<code>build-project.sh</code> and this should be invoked with the
  -<code>init</code> argument to generate the peers.
  +Peer classes are typically generated by invoking the init task in
  +the ant build file (build.xml) provided with an application generated by
  +the TDK. This file is located in the WEB-INF/build directory of a generated 
  +application.
   </p>
                                                   <p>
   Peer class source code is generated based on the project database
   schema.  The definition of this schema is in XML, and the associated DTD
  -is included with the TDK.  For the schema described above, the XML would
  -look something like
  +is included with the TDK. In the TDK, the project schema is located in
  +the WEB-INF/conf directory of the project in a file called
  +<i>project</i>-schema.xml.
   </p>
  +                                                <p>
  +For the schema described above, the XML would look something like
  +</p>
                                                       <div align="left">
       <table cellspacing="4" cellpadding="0" border="0">
       <tr>
  @@ -758,7 +761,7 @@
                                                   <p>
   Updates works pretty much the same as inserts.  You just need to call
   the doUpdate method from your Peer class.  Just keep in mind that you
  -must add and id column if you wish to do Updates.
  +must add an id column if you wish to do updates.
   </p>
                               </blockquote>
           </p>
  @@ -775,7 +778,7 @@
         <tr><td>
           <blockquote>
                                       <p>
  -Deletes work much in the same way than a select.  If you for example
  +Deletes work much in the same way as a select. If you, for example,
   want to delete the item with id = 3 then you simply add it to the
   Criteria and call doDelete.
   </p>
  @@ -817,14 +820,14 @@
         <tr><td>
           <blockquote>
                                       <p>
  -     In this doc I'm going to try and explain a bit more about using Peers than
  -     just run of the mill selects, inserts and updates.  However, this is by no
  -     means the be-all and end-all of Peer usage.  It is just some ideas that I
  -     have found to work well.
  +     In this section I'm going to try and explain a bit more about using
  +     Peers than just run of the mill selects, inserts and updates. 
  +     However, this is by no means the be-all and end-all of Peer usage. 
  +     It is just some ideas that I have found to work well.
      </p>
                                                   <p>
      <strong>Note:</strong> some information here is out of date (Subclassing).
  -   The <a href="classhierarchy.html">Class Hierarchy</a> document provides
  +   The <a href="../classhierarchy.html">Class Hierarchy</a> document provides
      more current information regarding mapping a hierarchy in the OM/Peer 
      system.
     </p>
  @@ -843,7 +846,7 @@
         <tr><td>
           <blockquote>
                                       <p>
  -     Usually when we begin to extra code for Peer classes we end up with the
  +     Usually when we begin to add extra code for Peer classes we end up with the
        problem of where to add the code.  If we add it to the generated Peer
        classes we will loose everything if (and trust me this does happen) we
        need to regenerate the classes.
  @@ -862,8 +865,7 @@
        class.
      </p>
                                                   <p>
  -     Using the example in the <a href="peers.html">Peers docs</a> we are
  -     going to create new classes for the Category and Item tables.
  +     Here's how we are create new classes for the Category and Item tables.
      </p>
                                                       <div align="left">
       <table cellspacing="4" cellpadding="0" border="0">
  @@ -884,7 +886,7 @@
      }
   }
   
  -public class ItemPeer extends ItemPeer
  +public class MyItemPeer extends ItemPeer
   {
      static public Vector doSelect (Criteria criteria) throws Exception
      {
  @@ -1042,7 +1044,7 @@
         <tr><td>
           <blockquote>
                                       <p>
  -      Sometimes you would like to have relations between tables to be available
  +      Sometimes you would like to have relations between tables be available
         in the Peer objects.  For example you want the category of an item to be
         available through a getCategory() method.
       </p>
  @@ -1104,7 +1106,7 @@
       crit.addJoin (ItemPeer.CATEGORY_ID, CategoryPeer.CATEGORY_ID);
   
       addSelectColumns ( criteria );
  -    CategoryPeer.addSelectColumns ( criteria )
  +    CategoryPeer.addSelectColumns ( criteria );
   
       // BasePeer returns a Vector of Value (Village) arrays.  The array
       // order follows the order columns were placed in the Select clause.
  @@ -1121,13 +1123,13 @@
           MyItem itm = row2Object (row,
                                    1,
                                    Class.forName
  -                                 (&quot;com.mycompany.om.MyItem&quot;))
  +                                 (&quot;com.mycompany.om.MyItem&quot;));
   
           MyCategory cat = CategoryPeer.row2Object
                                   (row,
                                   numColumns+1,
                                   Class.forName
  -                                (&quot;com.mycompany.om.MyCategory&quot;))
  +                                (&quot;com.mycompany.om.MyCategory&quot;));
   
           itm.setCategory (cat);
           results.add (itm);
  
  
  
  1.2       +6 -5      jakarta-turbine/xdocs/howto/context-howto.xml
  
  Index: context-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/xdocs/howto/context-howto.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- context-howto.xml	2001/05/13 04:21:31	1.1
  +++ context-howto.xml	2001/07/06 18:24:13	1.2
  @@ -243,10 +243,11 @@
   
   <section name="Adding your own Objects to the Context">
   <p>
  -As the Context is stored as a Hashtable any Object can be placed inside it and
  -be accessed from a template. For instance, in a Velocity Screen in the
  -doBuildTemplate() method, a String could be added to the Context. Please refer
  -to the Getting Started documentation for more examples of using the Velocity
  +As the Context is stored as a Hashtable any Object can be placed inside
  +it and be accessed from a template. For instance, in a Velocity Screen
  +in the doBuildTemplate() method, a String could be added to the Context.
  +Please refer to the <a href="../getting-started.html">Getting
  +Started</a> documentation for more examples of using the Velocity
   Context with screens and events.
   </p>
   
  @@ -369,7 +370,7 @@
   adding the Image object to the Velocity Context. Then use this class as the
   parent class for the Screens that need access to the Image Object. For more
   detail on taking advantage and extending the VelocityScreen Object, please view
  -the <a href="getting-started.html">Getting Started</a> Document.
  +the <a href="../getting-started.html">Getting Started</a> Document.
   </p>
   
   <p>
  
  
  
  1.9       +28 -24    jakarta-turbine/xdocs/howto/peers-howto.xml
  
  Index: peers-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/xdocs/howto/peers-howto.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- peers-howto.xml	2001/06/29 19:33:23	1.8
  +++ peers-howto.xml	2001/07/06 18:24:13	1.9
  @@ -22,8 +22,8 @@
   <p>
   Peers use Turbine's Database adaptor classes that make uniform connection
   to a wide range of databases possible.  If your database is not supported
  -you can read the Database Adapter docs on how to create a new adaptor for
  -your database.
  +you can read the <a href="../db-adapters.html">Database Adapter</a> docs on 
  +how to create a new adaptor for your database.
   </p>
   
   <p>
  @@ -259,20 +259,24 @@
   
   <section name="Schema Definition">
   <p>
  -Peer classes are typically generated by invoking one of the
  -<i>build-project</i> scripts that are provided by the TDK.  On a unix
  -host, for example, the relevant script is called
  -<code>build-project.sh</code> and this should be invoked with the
  -<code>init</code> argument to generate the peers.
  +Peer classes are typically generated by invoking the init task in
  +the ant build file (build.xml) provided with an application generated by
  +the TDK. This file is located in the WEB-INF/build directory of a generated 
  +application.
   </p>
   
   <p>
   Peer class source code is generated based on the project database
   schema.  The definition of this schema is in XML, and the associated DTD
  -is included with the TDK.  For the schema described above, the XML would
  -look something like
  +is included with the TDK. In the TDK, the project schema is located in
  +the WEB-INF/conf directory of the project in a file called
  +<i>project</i>-schema.xml.
   </p>
   
  +<p>
  +For the schema described above, the XML would look something like
  +</p>
  +
   <source><![CDATA[
   <app-data>
   <database>
  @@ -388,13 +392,13 @@
   <p>
   Updates works pretty much the same as inserts.  You just need to call
   the doUpdate method from your Peer class.  Just keep in mind that you
  -must add and id column if you wish to do Updates.
  +must add an id column if you wish to do updates.
   </p>
   </section>
   
   <section name="Deletes">
   <p>
  -Deletes work much in the same way than a select.  If you for example
  +Deletes work much in the same way as a select. If you, for example,
   want to delete the item with id = 3 then you simply add it to the
   Criteria and call doDelete.
   </p>
  @@ -409,15 +413,15 @@
     <section name="Advanced Peer Techniques">
   
      <p>
  -     In this doc I'm going to try and explain a bit more about using Peers than
  -     just run of the mill selects, inserts and updates.  However, this is by no
  -     means the be-all and end-all of Peer usage.  It is just some ideas that I
  -     have found to work well.
  +     In this section I'm going to try and explain a bit more about using
  +     Peers than just run of the mill selects, inserts and updates. 
  +     However, this is by no means the be-all and end-all of Peer usage. 
  +     It is just some ideas that I have found to work well.
      </p>
   
     <p>
      <strong>Note:</strong> some information here is out of date (Subclassing).
  -   The <a href="classhierarchy.html">Class Hierarchy</a> document provides
  +   The <a href="../classhierarchy.html">Class Hierarchy</a> document provides
      more current information regarding mapping a hierarchy in the OM/Peer 
      system.
     </p>
  @@ -426,7 +430,7 @@
   
     <section name="Subclassing">
      <p>
  -     Usually when we begin to extra code for Peer classes we end up with the
  +     Usually when we begin to add extra code for Peer classes we end up with the
        problem of where to add the code.  If we add it to the generated Peer
        classes we will loose everything if (and trust me this does happen) we
        need to regenerate the classes.
  @@ -446,9 +450,9 @@
        class.
      </p>
      <p>
  -     Using the example in the <a href="peers.html">Peers docs</a> we are
  -     going to create new classes for the Category and Item tables.
  +     Here's how we are create new classes for the Category and Item tables.
      </p>
  +   
   <source>
   public class MyCategoryPeer extends CategoryPeer
   {
  @@ -459,7 +463,7 @@
      }
   }
   
  -public class ItemPeer extends ItemPeer
  +public class MyItemPeer extends ItemPeer
   {
      static public Vector doSelect (Criteria criteria) throws Exception
      {
  @@ -536,7 +540,7 @@
   
     <section name="Joins and linking objects">
       <p>
  -      Sometimes you would like to have relations between tables to be available
  +      Sometimes you would like to have relations between tables be available
         in the Peer objects.  For example you want the category of an item to be
         available through a getCategory() method.
       </p>
  @@ -571,7 +575,7 @@
       crit.addJoin (ItemPeer.CATEGORY_ID, CategoryPeer.CATEGORY_ID);
   
       addSelectColumns ( criteria );
  -    CategoryPeer.addSelectColumns ( criteria )
  +    CategoryPeer.addSelectColumns ( criteria );
   
       // BasePeer returns a Vector of Value (Village) arrays.  The array
       // order follows the order columns were placed in the Select clause.
  @@ -588,13 +592,13 @@
           MyItem itm = row2Object (row,
                                    1,
                                    Class.forName
  -                                 ("com.mycompany.om.MyItem"))
  +                                 ("com.mycompany.om.MyItem"));
   
           MyCategory cat = CategoryPeer.row2Object
                                   (row,
                                   numColumns+1,
                                   Class.forName
  -                                ("com.mycompany.om.MyCategory"))
  +                                ("com.mycompany.om.MyCategory"));
   
           itm.setCategory (cat);
           results.add (itm);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org