You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/02/10 19:15:05 UTC

cvs commit: db-ojb/xdocs tutorial1.xml tutorial4.xml

arminw      2003/02/10 10:15:05

  Modified:    src/test/org/apache/ojb repository.xml repository_user.xml
               xdocs    tutorial1.xml tutorial4.xml
  Added:       src/test/org/apache/ojb repository_jdo.xml
  Log:
  fix tutorial documentation,
  split tutorial metadata, now
  jdo tutorial is in a separate
  xml file
  
  Revision  Changes    Path
  1.14      +8 -4      db-ojb/src/test/org/apache/ojb/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- repository.xml	10 Jan 2003 16:51:25 -0000	1.13
  +++ repository.xml	10 Feb 2003 18:15:05 -0000	1.14
  @@ -9,6 +9,7 @@
   <!ENTITY junit SYSTEM "repository_junit.xml">
   <!ENTITY user SYSTEM "repository_user.xml">
   <!ENTITY ejb SYSTEM "repository_ejb.xml">
  +<!ENTITY jdo SYSTEM "repository_jdo.xml">
   ]>
   
   
  @@ -17,17 +18,20 @@
       <!-- include all used database connections -->
       &database;
   
  +    <!-- include ojb internal mappings here -->
  +    &internal;
  +
       <!-- include mappings for JUnit tests -->
       <!-- This could be removed (with <!ENTITY entry), if junit test suite was not used -->
       &junit;
   
  -    <!-- include ojb internal mappings here -->
  -    &internal;
  -
       <!-- include user defined mappings here -->
  -    <!-- &user; -->
  +    &user;
   
       <!-- include mappings for the EJB-examples -->
       <!-- &ejb; -->
  +
  +    <!-- include mappings for the JDO tutorials -->
  +    <!-- &jdo; -->
   
   </descriptor-repository>
  
  
  
  1.5       +8 -67     db-ojb/src/test/org/apache/ojb/repository_user.xml
  
  Index: repository_user.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository_user.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- repository_user.xml	2 Jan 2003 21:27:19 -0000	1.4
  +++ repository_user.xml	10 Feb 2003 18:15:05 -0000	1.5
  @@ -11,24 +11,24 @@
      	  class="org.apache.ojb.tutorial1.Product"
      	  table="PRODUCT"
      >
  -      <field-descriptor 
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor 
  +      <field-descriptor
            name="name"
            column="NAME"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor 
  +      <field-descriptor
            name="price"
            column="PRICE"
            jdbc-type="DOUBLE"
         />
  -      <field-descriptor 
  +      <field-descriptor
            name="stock"
            column="STOCK"
            jdbc-type="INTEGER"
  @@ -40,83 +40,24 @@
      	  class="org.apache.ojb.tutorial2.Product"
      	  table="PRODUCT"
      >
  -      <field-descriptor 
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor 
  +      <field-descriptor
            name="name"
            column="NAME"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor 
  +      <field-descriptor
            name="price"
            column="PRICE"
            jdbc-type="DOUBLE"
         />
  -      <field-descriptor 
  -         name="stock"
  -         column="STOCK"
  -         jdbc-type="INTEGER"
  -      />
  -   </class-descriptor>
  -
  -
  -   <!-- Definitions for org.apache.ojb.tutorial4.Product -->
  -   <class-descriptor
  -   	  class="org.apache.ojb.tutorial4.Product"
  -   	  table="PRODUCT"
  -   >
  -      <field-descriptor 
  -         name="id"
  -         column="ID"
  -         jdbc-type="INTEGER"
  -         primarykey="true"
  -         autoincrement="true"
  -      />
  -      <field-descriptor 
  -         name="name"
  -         column="NAME"
  -         jdbc-type="VARCHAR"
  -      />
  -      <field-descriptor 
  -         name="price"
  -         column="PRICE"
  -         jdbc-type="DOUBLE"
  -      />
  -      <field-descriptor 
  -         name="stock"
  -         column="STOCK"
  -         jdbc-type="INTEGER"
  -      />
  -   </class-descriptor>
  -
  -   <!-- Definitions for org.apache.ojb.tutorial5.Product -->
  -   <class-descriptor
  -   	  class="org.apache.ojb.tutorial5.Product"
  -   	  table="PRODUCT"
  -   >
  -      <field-descriptor 
  -         name="id"
  -         column="ID"
  -         jdbc-type="INTEGER"
  -         primarykey="true"
  -         autoincrement="true"
  -      />
  -      <field-descriptor 
  -         name="name"
  -         column="NAME"
  -         jdbc-type="VARCHAR"
  -      />
  -      <field-descriptor 
  -         name="price"
  -         column="PRICE"
  -         jdbc-type="DOUBLE"
  -      />
  -      <field-descriptor 
  +      <field-descriptor
            name="stock"
            column="STOCK"
            jdbc-type="INTEGER"
  
  
  
  1.1                  db-ojb/src/test/org/apache/ojb/repository_jdo.xml
  
  Index: repository_jdo.xml
  ===================================================================
  
  <!--
  Here you find the mappings used in the JDO tutorials
  -->
  
  <!-- Definitions for org.apache.ojb.tutorial4.Product -->
     <class-descriptor
     	  class="org.apache.ojb.tutorial4.Product"
     	  table="PRODUCT"
     >
        <field-descriptor
           name="id"
           column="ID"
           jdbc-type="INTEGER"
           primarykey="true"
           autoincrement="true"
        />
        <field-descriptor
           name="name"
           column="NAME"
           jdbc-type="VARCHAR"
        />
        <field-descriptor
           name="price"
           column="PRICE"
           jdbc-type="DOUBLE"
        />
        <field-descriptor
           name="stock"
           column="STOCK"
           jdbc-type="INTEGER"
        />
     </class-descriptor>
  
     <!-- Definitions for org.apache.ojb.tutorial5.Product -->
     <class-descriptor
     	  class="org.apache.ojb.tutorial5.Product"
     	  table="PRODUCT"
     >
        <field-descriptor
           name="id"
           column="ID"
           jdbc-type="INTEGER"
           primarykey="true"
           autoincrement="true"
        />
        <field-descriptor
           name="name"
           column="NAME"
           jdbc-type="VARCHAR"
        />
        <field-descriptor
           name="price"
           column="PRICE"
           jdbc-type="DOUBLE"
        />
        <field-descriptor
           name="stock"
           column="STOCK"
           jdbc-type="INTEGER"
        />
     </class-descriptor>
  
  
  
  
  1.18      +2 -2      db-ojb/xdocs/tutorial1.xml
  
  Index: tutorial1.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/tutorial1.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- tutorial1.xml	28 Jan 2003 17:31:31 -0000	1.17
  +++ tutorial1.xml	10 Feb 2003 18:15:05 -0000	1.18
  @@ -103,7 +103,7 @@
        <li><b>Prepare the Tutorials:</b>
            <code>bin/build.sh prepare-tutorials</code></li>
        <li><b>Execute this Tutorial:</b>
  -         <code>bin/tutorial1.bat</code></li>
  +         <code>bin/tutorial1.sh</code></li>
       </ul>
      </li>
     </ul>
  @@ -229,7 +229,7 @@
       try
       {
           broker = PersistenceBrokerFactory.
  -                    createPersistenceBroker(new PBKey("repository.xml"));
  +                    defaultPersistenceBroker();
       }
       catch (Throwable t)
       {
  
  
  
  1.9       +12 -5     db-ojb/xdocs/tutorial4.xml
  
  Index: tutorial4.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/tutorial4.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- tutorial4.xml	21 Dec 2002 16:17:34 -0000	1.8
  +++ tutorial4.xml	10 Feb 2003 18:15:05 -0000	1.9
  @@ -55,15 +55,22 @@
   		<li>
   			Now compile the sources, setup the test database and perform bytecode
   			enhancement
  -		  	by executing <code>bin\build with-jdori prepare-tutorials enhance-jdori</code>
  -		  	under Win32 or
  -		  	<code>bin/build.sh with-jdori prepare-tutorials enhance-jdori</code> under Unix/Linux
  +		  	by executing
  +            <br/><code>bin\build.bat with-jdori prepare-tutorials enhance-jdori</code>
  +		  	<br/>under Win32 or
  +		  	<br/><code>bin/build.sh with-jdori prepare-tutorials enhance-jdori</code>
  +            <br/>under Unix/Linux
   		  	from the ojb toplevel directory.
   	  	</li>
   
   		<li>
  -		    Now you can start the tutorial application by executing
  -		    <code>bin\tutorial5</code> or <code>bin/tutorial5.sh</code>
  +		    Check the repository.xml file and comment in the JDO entity reference:
  +            <source><![CDATA[
  +            <!-- include mappings for the JDO tutorials -->
  +            &jdo;
  +            ]]></source>
  +            Now you can start the tutorial application by executing
  +		    <code>bin\build.bat tutorial5</code> or <code>bin/build.sh tutorial5</code>
   		    from the ojb toplevel directory.
   	    </li>
       </ol>