db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: jakarta-ojb/src/schema ojbtest-schema.xml
Date Fri, 10 Jan 2003 16:51:26 GMT
arminw      2003/01/10 08:51:26

  Modified:    src/test/org/apache/ojb repository.xml
               src/schema ojbtest-schema.xml
  Added:       src/test/org/apache/ojb repository_ejb.xml
  Log:
  repair, update ejb-examples
  
  Revision  Changes    Path
  1.13      +4 -0      jakarta-ojb/src/test/org/apache/ojb/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/test/org/apache/ojb/repository.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- repository.xml	9 Jan 2003 17:30:49 -0000	1.12
  +++ repository.xml	10 Jan 2003 16:51:25 -0000	1.13
  @@ -8,6 +8,7 @@
   <!ENTITY internal SYSTEM "repository_internal.xml">
   <!ENTITY junit SYSTEM "repository_junit.xml">
   <!ENTITY user SYSTEM "repository_user.xml">
  +<!ENTITY ejb SYSTEM "repository_ejb.xml">
   ]>
   
   
  @@ -25,5 +26,8 @@
   
       <!-- include user defined mappings here -->
       <!-- &user; -->
  +
  +    <!-- include mappings for the EJB-examples -->
  +    <!-- &ejb; -->
   
   </descriptor-repository>
  
  
  
  1.1                  jakarta-ojb/src/test/org/apache/ojb/repository_ejb.xml
  
  Index: repository_ejb.xml
  ===================================================================
  
  <!-- The mappings for the EJB-examples are placed here to make it
       easier to find them for OJB newbies.
  -->
  
  
  <!-- Definitions for org.apache.ojb.ejb.PersonVO
      private Integer personId;
      private String firstName;
      private String lastName;
      private String grade;
  -->
     <class-descriptor
     	  class="org.apache.ojb.ejb.PersonVO"
     	  table="EJB_PERSON"
     >
        <field-descriptor
           name="personId"
           column="PERSON_ID"
           jdbc-type="INTEGER"
           primarykey="true"
           autoincrement="true"
        />
        <field-descriptor
           name="firstName"
           column="FIRST_NAME"
           jdbc-type="VARCHAR"
        />
  
        <field-descriptor
           name="lastName"
           column="LAST_NAME"
           jdbc-type="VARCHAR"
        />
        <field-descriptor
           name="grade"
           column="GRADE"
           jdbc-type="VARCHAR"
        />
     </class-descriptor>
  
  
  <!-- Definitions for org.apache.ojb.ejb.ArticleVO
      private Integer articleId;
      private String name;
      private BigDecimal price;
      private String description;
      private Integer categoryId;
      private CategoryVO category;
  -->
      <class-descriptor
      class="org.apache.ojb.ejb.ArticleVO"
      table="EJB_ARTICLE"
      >
          <field-descriptor
           name="articleId"
           column="ARTICLE_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="DECIMAL"
          />
          <field-descriptor
           name="description"
           column="DESCRIPTION"
           jdbc-type="VARCHAR"
          />
          <field-descriptor
           name="categoryId"
           column="CATEGORY_ID"
           jdbc-type="INTEGER"
          />
  
          <reference-descriptor
          name="category"
          class-ref="org.apache.ojb.ejb.CategoryVO"
          auto-retrieve="false"
          auto-update="true"
          auto-delete="true"
          >
              <foreignkey field-ref="categoryId"/>
          </reference-descriptor>
      </class-descriptor>
  
  
  <!-- Definitions for org.apache.ojb.ejb.CategoryVO
      private Integer categoryId;
      private String categoryName;
      private String description;
      private Collection assignedArticles;
  -->
      <class-descriptor
        class="org.apache.ojb.ejb.CategoryVO"
        table="EJB_CATEGORY"
      >
          <field-descriptor
           name="categoryId"
           column="CATEGORY_ID"
           jdbc-type="INTEGER"
           primarykey="true"
           autoincrement="true"
          />
          <field-descriptor
           name="categoryName"
           column="CATEGORY_NAME"
           jdbc-type="VARCHAR"
          />
          <field-descriptor
           name="description"
           column="DESCRIPTION"
           jdbc-type="VARCHAR"
          />
  
          <collection-descriptor
          name="assignedArticles"
          element-class-ref="org.apache.ojb.ejb.ArticleVO"
          auto-retrieve="false"
          auto-update="true"
          auto-delete="true"
          >
              <inverse-foreignkey field-ref="categoryId"/>
          </collection-descriptor>
      </class-descriptor>
  
  
  <!-- Mapping of User defined classes ends here -->
  
  
  
  1.19      +48 -0     jakarta-ojb/src/schema/ojbtest-schema.xml
  
  Index: ojbtest-schema.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/schema/ojbtest-schema.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ojbtest-schema.xml	27 Dec 2002 23:06:57 -0000	1.18
  +++ ojbtest-schema.xml	10 Jan 2003 16:51:26 -0000	1.19
  @@ -395,6 +395,7 @@
   
   
   
  +
       <!-- =================================================== -->
       <!-- Sequence mangager test tables                       -->
       <!-- =================================================== -->
  @@ -482,6 +483,53 @@
           <column name="STRING_KEY" required="true" type="VARCHAR" size="250"/>
           <column name="LONG_KEY" required="true" type="BIGINT"/>
           <column name="INTEGER_KEY" required="true" type="INTEGER"/>
  +    </table>
  +
  +
  +
  +
  +    <!-- =================================================== -->
  +    <!-- EJB examples tables                                 -->
  +    <!-- =================================================== -->
  +
  +    <!--
  +    private Integer categoryId;
  +    private String categoryName;
  +    private String description;
  +    -->
  +    <table name="EJB_CATEGORY">
  +        <column name="CATEGORY_ID" required="true" primaryKey="true" type="INTEGER"/>
  +        <column name="CATEGORY_NAME" type="VARCHAR" size="80"/>
  +        <column name="DESCRIPTION" type="VARCHAR" size="255"/>
  +    </table>
  +
  +    <!--
  +    private Integer articleId;
  +    private String name;
  +    private BigDecimal price;
  +    private String description;
  +    private Integer categoryId;
  +    -->
  +    <table name="EJB_ARTICLE">
  +        <column name="ARTICLE_ID" required="true" primaryKey="true" type="INTEGER"/>
  +        <column name="NAME" type="VARCHAR" size="80"/>
  +        <column name="PRICE" type="DECIMAL"/>
  +        <column name="DESCRIPTION" type="VARCHAR" size="255"/>
  +        <column name="CATEGORY_ID" required="false" type="INTEGER"/>
  +
  +    </table>
  +
  +  <!--
  +    private Integer personId;
  +    private String firstName;
  +    private String lastName;
  +    private String grade;
  +    -->
  +    <table name="EJB_PERSON">
  +        <column name="PERSON_ID" required="true" primaryKey="true" type="INTEGER"/>
  +        <column name="FIRST_NAME" type="VARCHAR" size="80"/>
  +        <column name="LAST_NAME" type="VARCHAR" size="80"/>
  +        <column name="GRADE" type="VARCHAR" size="80"/>
       </table>
   
   </database>
  
  
  

Mime
View raw message