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 ol...@apache.org on 2003/01/06 15:09:20 UTC

cvs commit: jakarta-ojb/xdocs jdbc-types.xml query.xml repository.xml sequencemanager.xml tutorial1.xml tutorial3.xml

olegnitz    2003/01/06 06:09:20

  Modified:    xdocs    jdbc-types.xml query.xml repository.xml
                        sequencemanager.xml tutorial1.xml tutorial3.xml
  Log:
  Docs updated: batch-mode, no field IDs, field-ref instead of field-id-ref
  
  Revision  Changes    Path
  1.7       +1 -1      jakarta-ojb/xdocs/jdbc-types.xml
  
  Index: jdbc-types.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/jdbc-types.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jdbc-types.xml	21 Dec 2002 16:17:34 -0000	1.6
  +++ jdbc-types.xml	6 Jan 2003 14:09:20 -0000	1.7
  @@ -324,7 +324,7 @@
   
         ...
   
  -      <field-descriptor id="10"
  +      <field-descriptor
            name="isSelloutArticle"
            column="Auslaufartikel"
            jdbc-type="INTEGER"
  
  
  
  1.12      +2 -2      jakarta-ojb/xdocs/query.xml
  
  Index: query.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/query.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- query.xml	21 Dec 2002 18:57:19 -0000	1.11
  +++ query.xml	6 Jan 2003 14:09:20 -0000	1.12
  @@ -224,7 +224,7 @@
            name="productGroup"
            class-ref="org.apache.ojb.broker.ProductGroup"
         >
  -         <foreignkey field-id-ref="4"/>
  +         <foreignkey field-ref="productGroupId"/>
         </reference-descriptor>
      </class-descriptor>
   
  @@ -234,7 +234,7 @@
      	  table="Kategorien"
      >
   	  ...
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="groupName"
            column="KategorieName"
            jdbc-type="VARCHAR"
  
  
  
  1.11      +24 -7     jakarta-ojb/xdocs/repository.xml
  
  Index: repository.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/repository.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- repository.xml	21 Dec 2002 18:57:19 -0000	1.10
  +++ repository.xml	6 Jan 2003 14:09:20 -0000	1.11
  @@ -114,12 +114,23 @@
       a jdbc connections.
       If users don't want to keep this information the repository.xml file,
       they'll have to perform an explicit call to PersistenceBroker.open(...).
  +<br/><br/>
  +	If you are using OJB in an application server, add
  +    eager-release="true" to your connection descriptor
  +    to have OJB return the connection to the pool
  +    as soon as it's done using it.
  +<br/><br/>
  +	You can turn the batch mode on via the batch-mode attribute.
  +    In the batch mode OJB gathers SQL statements into batches
  +    and executes them when transaction commits.
   </p>
   <source><![CDATA[
   <!ATTLIST jdbc-connection-descriptor
   	platform (Db2 | Hsqldb | Informix | MsAccess | MsSQLServer |
   	          MySQL | Oracle | PostgreSQL | Sybase | Sapdb) "Hsqldb"
   	jdbc-level (1.0 | 2.0 | 3.0) "1.0"
  +	eager-release (true | false) "false"
  +	batch-mode (true | false) "false"
   
   	jndi-datasource-name CDATA #IMPLIED
   
  @@ -326,7 +337,7 @@
   <p>
   	The id attribute must contain a unique number identifying the decriptor.
   	The numbers for the attributes of a class must correspond to the order
  -	of columns in the mapped table.
  +	of columns in the mapped table. The id attribute is optional.
   <br/><br/>
   	The name attribute holds the name of the persistent classes attribute.
   	If the PersistentFieldDefaultImpl is used there must be an attribute
  @@ -375,7 +386,7 @@
   </p>
   <source><![CDATA[
   <!ATTLIST field-descriptor
  -	id CDATA #REQUIRED
  +	id CDATA #IMPLIED
   	name CDATA #REQUIRED
   	table CDATA #IMPLIED
   	column CDATA #REQUIRED
  @@ -491,12 +502,15 @@
   ]]></source>
   
   <p>
  -	The field-id-ref contains the id attribute of the field-descriptor
  +    The field-ref and field-id-ref attributes contain
  +    the name and the id attributes of the field-descriptor
   	used as a foreign key.
  +    Exactly one of these attributes must be specified.
   </p>
   <source><![CDATA[
   <!ATTLIST foreignkey
  -	field-id-ref CDATA #REQUIRED
  +	field-id-ref CDATA #IMPLIED
  +	field-ref CDATA #IMPLIED
   >
   ]]></source>
   
  @@ -598,12 +612,15 @@
   ]]></source>
   
   <p>
  -	The field-id-ref contains the id attribute of the field-descriptor
  -	in the class of the collection elements that is used as a foreign key.
  +    The field-ref and field-id-ref attributes contain
  +    the name and the id attributes of the field-descriptor
  +	used as a foreign key.
  +    Exactly one of these attributes must be specified.
   </p>
   <source><![CDATA[
   <!ATTLIST inverse-foreignkey
  -	field-id-ref CDATA #REQUIRED
  +	field-id-ref CDATA #IMPLIED
  +	field-ref CDATA #IMPLIED
   >
   ]]></source>
   
  
  
  
  1.4       +2 -2      jakarta-ojb/xdocs/sequencemanager.xml
  
  Index: sequencemanager.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/sequencemanager.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sequencemanager.xml	22 Dec 2002 18:49:35 -0000	1.3
  +++ sequencemanager.xml	6 Jan 2003 14:09:20 -0000	1.4
  @@ -32,7 +32,7 @@
      	  class="my.Article"
      	  table="ARTICLE"
       >
  -        <field-descriptor id="1"
  +        <field-descriptor
            name="articleId"
            column="ARTICLE_ID"
            jdbc-type="INTEGER"
  @@ -131,7 +131,7 @@
         class="org.apache.ojb.broker.sequence.SMDatabaseSequence"
         table="SM_TAB_DATABASE_SEQUENCE"
       >
  -        <field-descriptor id="1"
  +        <field-descriptor
            name="seqId"
            column="SEQ_ID"
            jdbc-type="INTEGER"
  
  
  
  1.16      +4 -4      jakarta-ojb/xdocs/tutorial1.xml
  
  Index: tutorial1.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/tutorial1.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- tutorial1.xml	23 Dec 2002 17:37:38 -0000	1.15
  +++ tutorial1.xml	6 Jan 2003 14:09:20 -0000	1.16
  @@ -867,24 +867,24 @@
         class="org.apache.ojb.broker.Product"
         table="PRODUCT"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="name"
            column="NAME"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="price"
            column="PRICE"
            jdbc-type="DOUBLE"
         />
  -      <field-descriptor id="4"
  +      <field-descriptor
            name="stock"
            column="STOCK"
            jdbc-type="INTEGER"
  
  
  
  1.16      +45 -45    jakarta-ojb/xdocs/tutorial3.xml
  
  Index: tutorial3.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/xdocs/tutorial3.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- tutorial3.xml	23 Dec 2002 17:37:38 -0000	1.15
  +++ tutorial3.xml	6 Jan 2003 14:09:20 -0000	1.16
  @@ -142,13 +142,13 @@
         <LI>
           A reference-descriptor contains one or more foreignkey elements.
           These elements define foreign key attributes.
  -        The element <code><foreignkey field-id-ref="4"/></code>
  -        contains the id of the field-descriptor describing the
  +        The element <code><foreignkey field-ref="productGroupId"/></code>
  +        contains the name of the field-descriptor describing the
           foreignkey fields.
  -        The FieldDescriptor with the id 4 describes the foreignkey attribute
  +        The FieldDescriptor with the name "productGroupId" describes the foreignkey attribute
           productGroupId:
           <source><![CDATA[
  -<field-descriptor id="4"
  +<field-descriptor
       name="productGroupId"
       column="Kategorie_Nr"
       jdbc-type="INTEGER"
  @@ -169,24 +169,24 @@
      >
         <extent-class class-ref="org.apache.ojb.broker.BookArticle" />
         <extent-class class-ref="org.apache.ojb.broker.CdArticle" />
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="articleId"
            column="Artikel_Nr"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="articleName"
            column="Artikelname"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="supplierId"
            column="Lieferanten_Nr"
            jdbc-type="INTEGER"
         />
  -      <field-descriptor id="4"
  +      <field-descriptor
            name="productGroupId"
            column="Kategorie_Nr"
            jdbc-type="INTEGER"
  @@ -196,7 +196,7 @@
            name="productGroup"
            class-ref="org.apache.ojb.broker.ProductGroup"
         >
  -         <foreignkey field-id-ref="4"/>
  +         <foreignkey field-ref="productGroupId"/>
         </reference-descriptor>
      </class-descriptor>
   
  @@ -226,7 +226,7 @@
       </LI>
     </OL>
     <source><![CDATA[
  -<field-descriptor id="17"
  +<field-descriptor
       name="sampleArticleId"
       column="SAMPLE_ARTICLE_ID"
       jdbc-type="INTEGER"
  @@ -241,7 +241,7 @@
       name="sampleArticle"
       class-ref="org.apache.ojb.broker.Article"
   >
  -    <foreignkey field-id-ref="17"/>
  +    <foreignkey field-ref="sampleArticleId""/>
   </reference-descriptor>
     ]]></source>
   
  @@ -281,9 +281,9 @@
             	(<code>element-class-ref="org.apache.ojb.broker.Article"</code>)
             </LI>
             <LI>
  -	          The ids of field-descriptors of the element class
  +	          The names of field-descriptors of the element class
   	          used as foreign key attributes are defined in inverse-foreignkey elements:
  -	           (<code><inverse-foreignkey field-id-ref="4"/></code>
  +	           (<code><inverse-foreignkey field-ref="productGroupId"/></code>
   	          this is again pointing to the field-descriptor for the attribute
   	          <code>productGoupId</code> in class Article).
             </LI>
  @@ -301,19 +301,19 @@
         class="org.apache.ojb.broker.ProductGroup"
         table="Kategorien"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="groupId"
            column="Kategorie_Nr"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="groupName"
            column="KategorieName"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="description"
            column="Beschreibung"
            jdbc-type="VARCHAR"
  @@ -324,7 +324,7 @@
            orderby="articleId"
            sort="DESC"
         >
  -         <inverse-foreignkey field-id-ref="4"/>
  +         <inverse-foreignkey field-ref="productGroupId"/>
         </collection-descriptor>
      </class-descriptor>
     ]]></source>
  @@ -513,19 +513,19 @@
         class="org.apache.ojb.broker.Person"
         table="PERSON"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="firstname"
            column="FIRSTNAME"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="lastname"
            column="LASTNAME"
            jdbc-type="VARCHAR"
  @@ -534,7 +534,7 @@
            name="roles"
            element-class-ref="org.apache.ojb.broker.Role"
         >
  -         <inverse-foreignkey field-id-ref="1"/>
  +         <inverse-foreignkey field-ref="person_id"/>
         </collection-descriptor>
         ...
      </class-descriptor>
  @@ -544,19 +544,19 @@
         class="org.apache.ojb.broker.Project"
         table="PROJECT"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="title"
            column="TITLE"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="description"
            column="DESCRIPTION"
            jdbc-type="VARCHAR"
  @@ -565,7 +565,7 @@
            name="roles"
            element-class-ref="org.apache.ojb.broker.Role"
         >
  -         <inverse-foreignkey field-id-ref="2"/>
  +         <inverse-foreignkey field-ref="project_id"/>
         </collection-descriptor>
         ...
      </class-descriptor>
  @@ -575,19 +575,19 @@
         class="org.apache.ojb.broker.Role"
         table="PERSON_PROJECT"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="person_id"
            column="PERSON_ID"
            jdbc-type="INTEGER"
            primarykey="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="project_id"
            column="PROJECT_ID"
            jdbc-type="INTEGER"
            primarykey="true"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="roleName"
            column="ROLENAME"
            jdbc-type="VARCHAR"
  @@ -596,13 +596,13 @@
            name="person"
            class-ref="org.apache.ojb.broker.Person"
         >
  -         <foreignkey field-id-ref="1"/>
  +         <foreignkey field-ref="person_id"/>
         </reference-descriptor>
         <reference-descriptor
            name="project"
            class-ref="org.apache.ojb.broker.Project"
         >
  -         <foreignkey field-id-ref="2"/>
  +         <foreignkey field-ref="project_id"/>
         </reference-descriptor>
      </class-descriptor>
   ]]></source>
  @@ -639,19 +639,19 @@
         class="org.apache.ojb.broker.Person"
         table="PERSON"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="firstname"
            column="FIRSTNAME"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="lastname"
            column="LASTNAME"
            jdbc-type="VARCHAR"
  @@ -674,19 +674,19 @@
         class="org.apache.ojb.broker.Project"
         table="PROJECT"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="title"
            column="TITLE"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="description"
            column="DESCRIPTION"
            jdbc-type="VARCHAR"
  @@ -764,7 +764,7 @@
            auto-update="true"
            auto-delete="true"
         >
  -         <foreignkey field-id-ref="4"/>
  +         <foreignkey field-ref="productGroupId"/>
         </reference-descriptor>
   
         <collection-descriptor
  @@ -776,7 +776,7 @@
            orderby="articleId"
            sort="DESC"
         >
  -         <inverse-foreignkey field-id-ref="4"/>
  +         <inverse-foreignkey field-ref="productGroupId"/>
         </collection-descriptor>
   ]]></source>
   
  @@ -990,7 +990,7 @@
     class="org.apache.ojb.broker.ProductGroupWithCollectionProxy"
     table="Kategorien"
   >
  -  <field-descriptor id="1"
  +  <field-descriptor
        name="groupId"
        column="Kategorie_Nr"
        jdbc-type="INTEGER"
  @@ -1002,7 +1002,7 @@
        element-class-ref="org.apache.ojb.broker.Article"
        proxy="true"
     >
  -     <inverse-foreignkey field-id-ref="4"/>
  +     <inverse-foreignkey field-ref="productGroupId"/>
     </collection-descriptor>
   </class-descriptor>
   ]]></source>
  @@ -1033,7 +1033,7 @@
         class="org.apache.ojb.broker.ArticleWithReferenceProxy"
         table="Artikel"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="articleId"
            column="Artikel_Nr"
            jdbc-type="INTEGER"
  @@ -1046,7 +1046,7 @@
            class-ref="org.apache.ojb.broker.ProductGroup"
        proxy="true"
         >
  -         <foreignkey field-id-ref="4"/>
  +         <foreignkey field-ref="productGroupId"/>
         </reference-descriptor>
      </class-descriptor>
   ]]></source>
  @@ -1343,19 +1343,19 @@
         class="org.apache.ojb.broker.A"
         table="AB_TABLE"
      >
  -      <field-descriptor id="1"
  +      <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
         />
  -      <field-descriptor id="2"
  +      <field-descriptor
            name="ojbConcreteClass"
            column="CLASS_NAME"
            jdbc-type="VARCHAR"
         />
  -      <field-descriptor id="3"
  +      <field-descriptor
            name="someValue"
            column="VALUE_"
            jdbc-type="INTEGER"