db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r473821 [5/7] - in /db/torque: runtime/trunk/ runtime/trunk/conf/ runtime/trunk/etc/ runtime/trunk/notes/ runtime/trunk/proposals/eric/statement/ runtime/trunk/proposals/fedor/nqm/ runtime/trunk/proposals/henning/idtable-peer/ runtime/trunk...
Date Sat, 11 Nov 2006 22:37:32 GMT
Modified: db/torque/runtime/trunk/xdocs/reference/read-from-db.xml
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/xdocs/reference/read-from-db.xml?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/runtime/trunk/xdocs/reference/read-from-db.xml (original)
+++ db/torque/runtime/trunk/xdocs/reference/read-from-db.xml Sat Nov 11 14:37:25 2006
@@ -1,18 +1,21 @@
 <?xml version="1.0"?>
 <!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
 -->
 
 <document>
@@ -906,4 +909,4 @@
   </section>
 
  </body>
-</document>
\ No newline at end of file
+</document>

Modified: db/torque/runtime/trunk/xdocs/reference/relevant-classes.xml
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/xdocs/reference/relevant-classes.xml?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/runtime/trunk/xdocs/reference/relevant-classes.xml (original)
+++ db/torque/runtime/trunk/xdocs/reference/relevant-classes.xml Sat Nov 11 14:37:25 2006
@@ -1,243 +1,246 @@
-<?xml version="1.0"?>
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<document>
- <properties>
-   <title>Torque Runtime Reference - Relevant classes and Resources</title>
-   <author email="leon@opticode.co.za">Leon Messerschmidt</author>
-   <author email="jvanzyl@periapt.com">Jason van Zyl</author>
-   <author email="seade@backstagetech.com.au">Scott Eade</author>
- </properties>
-
- <body>
-  <section name="Peers">
-    <p>
-      Everything in Peers resolve around Peer classes.  A Peer class has a
-      one-to-one mapping to a Database table.  You use each table's associated
-      Peer class to do operations on that table.  Peer classes are generated
-      for you automatically.
-    </p>
-
-    <p>
-      Peer classes have static methods only, so you would never create objects 
-      of Peer classes.  It is not necessary to have objects on this level 
-      because of the one-to-one mapping with a table.  Peer methods are thread
-      safe.
-    </p>
-     
-    <p>
-      Peer classes are generated for you automatically. For each table, two 
-      Peer classes are generated: Base&lt;table-name&gt;Peer and 
-      &lt;table-name&gt;Peer. The Base&lt;table-name&gt;Peer class contains 
-      all the functionality and should not be changed. The other class is 
-      empty but can be extended to add or change functionality. If you 
-      regenerate with torque only the Base* class changes. This allows you 
-      to change the schema, but still keep your existing code.
-    </p>
-
-  </section>
-
-  <section name="Data Objects">
-
-    <p>
-      A Data Object holds information about a single row of a specific table.
-      Data Objects can be generated automatically for you.  It takes the form
-      of Bean properties for each field of the table.
-    </p>
-
-    <p>
-      The Data Object classes also generated automatically. For each table, two 
-      Data Object classes are generated: Base&lt;table-name&gt; and 
-      &lt;table-name&gt;.  As with the Peers, the Base&lt;table-name&gt; class
-      contains all the functionality and should not be changed. The other class 
-      is empty but can be extended to add or change functionality.  If you 
-      regenerate the classes, only the Base* classes will be overwritten. 
-    </p>
-
-    <p>
-      Data Objects are used almost exclusively with their related Peer classes.
-      Where peer classes "wrap around" around a database table, a Data Object
-      "wrap around" individual rows of the table.  The two always go together.
-    </p>
-
-    <p>
-      You normally use Data Objects in one of two ways.  The most common way
-      is to extract data after you called a doSelect on a Peer class.  The
-      doSelect method returns a List of Data Objects that holds the data of
-      the resultset.  Secondly you can create Data Objects and call their save
-      methods to insert or update the related row into the database.
-    </p>
-
-  </section>
-
-  <section name="Criteria">
-
-    <p>
-      Criteria is an abstraction of the criteria of an sql query.  We use
-      criteria objects to specify the criteria of a sql statement.  The
-      database adaptor classes contains information on how this Criteria object
-      will be translated to different flavours of sql.
-    </p>
-
-    <p>
-      Criteria is in effect a map of field names and values that forms the
-      criteria of a query.  By default the comparison  is equals (=) but you
-      can define any comparison operator (&lt;, &gt;, &lt;=, &gt; =, IN, etc.).
-    </p>
-
-    <p>
-      Criteria can also be used to do some other sql function like ORDER BY or
-      DISTINCT.  If Criteria is too limited for your purposes (which should not
-      happen often) you are still free to use raw sql queries.
-    </p>
-
-  </section>
-
-  <section name="Database Maps">
-
-    <p>
-      The Peers make use of a DatabaseMap class that holds internal data about
-      the relational schema.  You will seldom, if ever, need to work with the
-      DatabaseMap class.  It is used internally by Peers to discover information
-      about the database at runtime.
-    </p>
-
-    <p>
-      There is exactly one DatabaseMap for each relational database that you
-      connect to.  You may wish to connect to more than one database in your
-      application.  You should then have one DatabaseMap for each of the
-      databases.
-    </p>
-
-    <p>
-      DatabaseMaps are constructed by classes called MapBuilders.  Torque
-      generates MapBuilder classes for each of the tables in your schema.
-      The MapBuilder for a table  is called when the Peer class for the table
-      is loaded.
-    </p>
-    
-    <p>
-      All DatabaseMaps are instances of the class 
-      <code>org.apache.torque.map.DatabaseMap</code>.
-      They are kept in the instance variable <code>TorqueInstance.dbMaps</code>.
-      The Map for the database with the name key can be retrieved
-      by the method Torque.getDatabaseMap(key).
-    </p>
-
-  </section>
-
-  <section name="ID Broker">
-
-    <p>
-      The ID Broker is used to automatically create unique primary keys for 
-      tables.  It creates id's from a database table called id_table.
-    </p>
-
-    <p>
-      Of course Torque also supports using the ID generation provided by the
-      underlying database system - just set the <code>idMethod</code> attributes
-      as desired in your schema.
-    </p>
-
-    <p>
-      The ID Broker is used in the underlying Peer code.  After you have 
-      generated your object model classes you need not worry about it anymore.
-    </p>
-
-  </section>
-  
-  <section name="Database adaptors">
-
-    <p>
-      Although all databases supported by Torque understand SQL, there are
-      differences in the behaviour of the databases which the Torque runtime
-      needs to know about. For example, the standard (String) format
-      of a date object in an Oracle9i database is different from a
-      postgresql database.
-      The adapter for a database provides the necessary methods to hide such
-      differences from the user.
-      For example, the adapter provides a method to create a String in the
-      database's preferred format from a Date object.
-    </p>
-
-    <p>
-      Adapters are subclasses of the <code>org.apache.torque.adapter.DB</code>
-      class.
-      The adapters are stored in the private map TorqueInstance.apdapterMap;
-      the key of the map is the name of the database (e.g. "bookstore"),
-      and the value of the map is the adapter. The adapter for a given key
-      can be retrieved via the method Torque.getDB(key).
-    </p>
-
-    <p>
-      If your database is not yet supported, you can read the 
-      <a href="new-database-support.html">Support for new Databases</a> 
-      docs on how to create a new adapter for your database.
-    </p>
-
-  <section name="DataSourceFactories">
-    <p>
-      To access a database, a connection must be made to the database.
-      A DataSource is an object which can provide Connections to the 
-      database.  A DataSourceFactory is used to configure and provide
-      one DataSource.
-    </p>
-
-    <p>
-      All DataSourceFactories used by Torque must implement the interface
-      <code>org.apache.torque.dsfactory.DataSourceFactory</code>.
-      The DataSourceFactories are stored in the private map
-      <code>TorqueInstance.dsFactoryMap</code>; the key of the map is the
-      name of the database (e.g. "bookstore"), and the
-      value of the map is the DataSourceFactory.
-      The DataSourceFactory for a given key can not be retrieved 
-      by a public method; however, a connection from the DataSource
-      for the DataSourceFactory for a given key can be obtained 
-      by Torque.getConnection(key);
-    </p>
-  </section>
-
-    
-  </section>
-
-  <section name="Internal resources used by the Torque Runtime">
-
-    <subsection name="Default database name">
-
-      <p>
-        Torque can be used with several databases at once.
-        The resources for each database are usually kept in Maps
-        where the key is the name of the database.  To make things easier
-        for people who use only one database, Torque supports the notion
-        of a default database. This allows it to provide convenience
-        methods like <code>Torque.getConnection()</code> where no database name 
-        must be specified.  These methods refer to the default database,
-        in contrast to e.g. <code>Torque.getConnection(String)</code>
-        where the name of the database must be supplied explicitly.
-      </p>
-      
-      <p>
-        The name of the default database can be retrieved by 
-        <code>Torque.getDefaultDB()</code>.
-      </p>
-
-    </subsection>
-
-  </section>
-   
- </body>
-</document>
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<document>
+ <properties>
+   <title>Torque Runtime Reference - Relevant classes and Resources</title>
+   <author email="leon@opticode.co.za">Leon Messerschmidt</author>
+   <author email="jvanzyl@periapt.com">Jason van Zyl</author>
+   <author email="seade@backstagetech.com.au">Scott Eade</author>
+ </properties>
+
+ <body>
+  <section name="Peers">
+    <p>
+      Everything in Peers resolve around Peer classes.  A Peer class has a
+      one-to-one mapping to a Database table.  You use each table's associated
+      Peer class to do operations on that table.  Peer classes are generated
+      for you automatically.
+    </p>
+
+    <p>
+      Peer classes have static methods only, so you would never create objects 
+      of Peer classes.  It is not necessary to have objects on this level 
+      because of the one-to-one mapping with a table.  Peer methods are thread
+      safe.
+    </p>
+     
+    <p>
+      Peer classes are generated for you automatically. For each table, two 
+      Peer classes are generated: Base&lt;table-name&gt;Peer and 
+      &lt;table-name&gt;Peer. The Base&lt;table-name&gt;Peer class contains 
+      all the functionality and should not be changed. The other class is 
+      empty but can be extended to add or change functionality. If you 
+      regenerate with torque only the Base* class changes. This allows you 
+      to change the schema, but still keep your existing code.
+    </p>
+
+  </section>
+
+  <section name="Data Objects">
+
+    <p>
+      A Data Object holds information about a single row of a specific table.
+      Data Objects can be generated automatically for you.  It takes the form
+      of Bean properties for each field of the table.
+    </p>
+
+    <p>
+      The Data Object classes also generated automatically. For each table, two 
+      Data Object classes are generated: Base&lt;table-name&gt; and 
+      &lt;table-name&gt;.  As with the Peers, the Base&lt;table-name&gt; class
+      contains all the functionality and should not be changed. The other class 
+      is empty but can be extended to add or change functionality.  If you 
+      regenerate the classes, only the Base* classes will be overwritten. 
+    </p>
+
+    <p>
+      Data Objects are used almost exclusively with their related Peer classes.
+      Where peer classes "wrap around" around a database table, a Data Object
+      "wrap around" individual rows of the table.  The two always go together.
+    </p>
+
+    <p>
+      You normally use Data Objects in one of two ways.  The most common way
+      is to extract data after you called a doSelect on a Peer class.  The
+      doSelect method returns a List of Data Objects that holds the data of
+      the resultset.  Secondly you can create Data Objects and call their save
+      methods to insert or update the related row into the database.
+    </p>
+
+  </section>
+
+  <section name="Criteria">
+
+    <p>
+      Criteria is an abstraction of the criteria of an sql query.  We use
+      criteria objects to specify the criteria of a sql statement.  The
+      database adaptor classes contains information on how this Criteria object
+      will be translated to different flavours of sql.
+    </p>
+
+    <p>
+      Criteria is in effect a map of field names and values that forms the
+      criteria of a query.  By default the comparison  is equals (=) but you
+      can define any comparison operator (&lt;, &gt;, &lt;=, &gt; =, IN, etc.).
+    </p>
+
+    <p>
+      Criteria can also be used to do some other sql function like ORDER BY or
+      DISTINCT.  If Criteria is too limited for your purposes (which should not
+      happen often) you are still free to use raw sql queries.
+    </p>
+
+  </section>
+
+  <section name="Database Maps">
+
+    <p>
+      The Peers make use of a DatabaseMap class that holds internal data about
+      the relational schema.  You will seldom, if ever, need to work with the
+      DatabaseMap class.  It is used internally by Peers to discover information
+      about the database at runtime.
+    </p>
+
+    <p>
+      There is exactly one DatabaseMap for each relational database that you
+      connect to.  You may wish to connect to more than one database in your
+      application.  You should then have one DatabaseMap for each of the
+      databases.
+    </p>
+
+    <p>
+      DatabaseMaps are constructed by classes called MapBuilders.  Torque
+      generates MapBuilder classes for each of the tables in your schema.
+      The MapBuilder for a table  is called when the Peer class for the table
+      is loaded.
+    </p>
+    
+    <p>
+      All DatabaseMaps are instances of the class 
+      <code>org.apache.torque.map.DatabaseMap</code>.
+      They are kept in the instance variable <code>TorqueInstance.dbMaps</code>.
+      The Map for the database with the name key can be retrieved
+      by the method Torque.getDatabaseMap(key).
+    </p>
+
+  </section>
+
+  <section name="ID Broker">
+
+    <p>
+      The ID Broker is used to automatically create unique primary keys for 
+      tables.  It creates id's from a database table called id_table.
+    </p>
+
+    <p>
+      Of course Torque also supports using the ID generation provided by the
+      underlying database system - just set the <code>idMethod</code> attributes
+      as desired in your schema.
+    </p>
+
+    <p>
+      The ID Broker is used in the underlying Peer code.  After you have 
+      generated your object model classes you need not worry about it anymore.
+    </p>
+
+  </section>
+  
+  <section name="Database adaptors">
+
+    <p>
+      Although all databases supported by Torque understand SQL, there are
+      differences in the behaviour of the databases which the Torque runtime
+      needs to know about. For example, the standard (String) format
+      of a date object in an Oracle9i database is different from a
+      postgresql database.
+      The adapter for a database provides the necessary methods to hide such
+      differences from the user.
+      For example, the adapter provides a method to create a String in the
+      database's preferred format from a Date object.
+    </p>
+
+    <p>
+      Adapters are subclasses of the <code>org.apache.torque.adapter.DB</code>
+      class.
+      The adapters are stored in the private map TorqueInstance.apdapterMap;
+      the key of the map is the name of the database (e.g. "bookstore"),
+      and the value of the map is the adapter. The adapter for a given key
+      can be retrieved via the method Torque.getDB(key).
+    </p>
+
+    <p>
+      If your database is not yet supported, you can read the 
+      <a href="new-database-support.html">Support for new Databases</a> 
+      docs on how to create a new adapter for your database.
+    </p>
+
+  <section name="DataSourceFactories">
+    <p>
+      To access a database, a connection must be made to the database.
+      A DataSource is an object which can provide Connections to the 
+      database.  A DataSourceFactory is used to configure and provide
+      one DataSource.
+    </p>
+
+    <p>
+      All DataSourceFactories used by Torque must implement the interface
+      <code>org.apache.torque.dsfactory.DataSourceFactory</code>.
+      The DataSourceFactories are stored in the private map
+      <code>TorqueInstance.dsFactoryMap</code>; the key of the map is the
+      name of the database (e.g. "bookstore"), and the
+      value of the map is the DataSourceFactory.
+      The DataSourceFactory for a given key can not be retrieved 
+      by a public method; however, a connection from the DataSource
+      for the DataSourceFactory for a given key can be obtained 
+      by Torque.getConnection(key);
+    </p>
+  </section>
+
+    
+  </section>
+
+  <section name="Internal resources used by the Torque Runtime">
+
+    <subsection name="Default database name">
+
+      <p>
+        Torque can be used with several databases at once.
+        The resources for each database are usually kept in Maps
+        where the key is the name of the database.  To make things easier
+        for people who use only one database, Torque supports the notion
+        of a default database. This allows it to provide convenience
+        methods like <code>Torque.getConnection()</code> where no database name 
+        must be specified.  These methods refer to the default database,
+        in contrast to e.g. <code>Torque.getConnection(String)</code>
+        where the name of the database must be supplied explicitly.
+      </p>
+      
+      <p>
+        The name of the default database can be retrieved by 
+        <code>Torque.getDefaultDB()</code>.
+      </p>
+
+    </subsection>
+
+  </section>
+   
+ </body>
+</document>

Modified: db/torque/runtime/trunk/xdocs/reference/write-to-db.xml
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/xdocs/reference/write-to-db.xml?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/runtime/trunk/xdocs/reference/write-to-db.xml (original)
+++ db/torque/runtime/trunk/xdocs/reference/write-to-db.xml Sat Nov 11 14:37:25 2006
@@ -1,117 +1,120 @@
-<?xml version="1.0"?>
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<document>
- <properties>
-   <title>Torque Runtime Reference - Writing to the database</title>
-   <author email="leon@opticode.co.za">Leon Messerschmidt</author>
-   <author email="jvanzyl@periapt.com">Jason van Zyl</author>
-   <author email="seade@backstagetech.com.au">Scott Eade</author>
- </properties>
-
- <body>
-  <section name="Saving an object (inserts and updates)">
-
-    <p>
-      To write an object into the database, call its save() method.  Depending 
-      on whether the data object was newly created or was read from the
-      database, the corresponding row in the database table is inserted or 
-      updated.  If the object is new, its primary key(s) is/are generated 
-      automatically if the id method was set to &quot;idbroker&quot; or
-      &quot;native&quot; in the schema.xml.
-    </p>
-    
-    <p>
-      As an example, consider the following code, which creates an Author 
-      object and inserts it into the database. Then the object is loaded again,
-      modified. and updates the corresponding row in the databse.
-    </p>
-
-<source>
-Author stevens = new Author();
-stevens.setFirstName("W.");
-stevens.setLastName("Stevens");
-stevens.save();
-</source>
-    
-    <p>
-      If the generator properties &quot;torque.complexObjectModel&quot; and 
-      &quot;torque.objectIsCaching&quot; were not set to false at generation 
-      time, any objects which are referenced in the foreign key Lists of the
-      object are also saved.  
-    </p>
-
-    <p>
-      For example, in the following code, calling
-      book.save() also saves the author added to the book:
-    </p>
-    
-<source>
-Author bloch = new Author();
-bloch.setFirstName("Joshua");
-bloch.setLastName("Bloch");
-Book effective = new Book();
-effective.setTitle("Effective Java");
-effective.setISBN("0-618-12902-2");
-effective.setPublisher(addison);
-bloch.addBook(effective);
-bloch.save(); //also saves the book "effective"
-</source>
-
-    <p>
-      Note that the save is only propagated in the 1->n directions of foreign 
-      keys, not in the n->1 direction. I.e. in the above example, calling 
-      <code>effective.save()</code> would NOT save the corresponding author.
-    </p>
-
-    <p>
-      If the object which save method is called is neither new nor modified,
-      it is not saved. Internally, this is handled via the <code>isNew</code>
-      and <code>modifed</code> flags of the object.
-    </p>
-      
-    <p>
-      There are alternative ways to insert or update an object in the database:
-      you can pass the objects to the <code>doInsert()</code> or 
-      <code>doUpdate</code> methods of their corresponding Peers, or you can 
-      create a criteria object which contains the data of the object and pass
-      the Criteria object to the <code>doInsert()</code> or 
-      <code>doUpdate</code> methods of the Peer class.  
-      Note that if you construct a criteria, the id field is not added to the 
-      Criteria.  It is taken care of by underlying database system (or perhaps 
-      the ID BROKER when it is in use).
-      The object that is returned by doInsert is the id of the newly added row.
-    </p>
-
-  </section>
-
-  <section name="Deleting objects">
-    <p>
-      Deletes work much in the same way as a select. If you, for example,
-      want to delete the author with id = 3 then you simply add it to the
-      Criteria and call doDelete.
-    </p>
-
-<source>
-Criteria criteria = new Criteria();
-crit.add(AuthorPeer.AUTHOR_ID, 3);
-AuthorPeer.doDelete(criteria);
-</source>
-
-  </section>
- </body>
-</document>
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<document>
+ <properties>
+   <title>Torque Runtime Reference - Writing to the database</title>
+   <author email="leon@opticode.co.za">Leon Messerschmidt</author>
+   <author email="jvanzyl@periapt.com">Jason van Zyl</author>
+   <author email="seade@backstagetech.com.au">Scott Eade</author>
+ </properties>
+
+ <body>
+  <section name="Saving an object (inserts and updates)">
+
+    <p>
+      To write an object into the database, call its save() method.  Depending 
+      on whether the data object was newly created or was read from the
+      database, the corresponding row in the database table is inserted or 
+      updated.  If the object is new, its primary key(s) is/are generated 
+      automatically if the id method was set to &quot;idbroker&quot; or
+      &quot;native&quot; in the schema.xml.
+    </p>
+    
+    <p>
+      As an example, consider the following code, which creates an Author 
+      object and inserts it into the database. Then the object is loaded again,
+      modified. and updates the corresponding row in the databse.
+    </p>
+
+<source>
+Author stevens = new Author();
+stevens.setFirstName("W.");
+stevens.setLastName("Stevens");
+stevens.save();
+</source>
+    
+    <p>
+      If the generator properties &quot;torque.complexObjectModel&quot; and 
+      &quot;torque.objectIsCaching&quot; were not set to false at generation 
+      time, any objects which are referenced in the foreign key Lists of the
+      object are also saved.  
+    </p>
+
+    <p>
+      For example, in the following code, calling
+      book.save() also saves the author added to the book:
+    </p>
+    
+<source>
+Author bloch = new Author();
+bloch.setFirstName("Joshua");
+bloch.setLastName("Bloch");
+Book effective = new Book();
+effective.setTitle("Effective Java");
+effective.setISBN("0-618-12902-2");
+effective.setPublisher(addison);
+bloch.addBook(effective);
+bloch.save(); //also saves the book "effective"
+</source>
+
+    <p>
+      Note that the save is only propagated in the 1->n directions of foreign 
+      keys, not in the n->1 direction. I.e. in the above example, calling 
+      <code>effective.save()</code> would NOT save the corresponding author.
+    </p>
+
+    <p>
+      If the object which save method is called is neither new nor modified,
+      it is not saved. Internally, this is handled via the <code>isNew</code>
+      and <code>modifed</code> flags of the object.
+    </p>
+      
+    <p>
+      There are alternative ways to insert or update an object in the database:
+      you can pass the objects to the <code>doInsert()</code> or 
+      <code>doUpdate</code> methods of their corresponding Peers, or you can 
+      create a criteria object which contains the data of the object and pass
+      the Criteria object to the <code>doInsert()</code> or 
+      <code>doUpdate</code> methods of the Peer class.  
+      Note that if you construct a criteria, the id field is not added to the 
+      Criteria.  It is taken care of by underlying database system (or perhaps 
+      the ID BROKER when it is in use).
+      The object that is returned by doInsert is the id of the newly added row.
+    </p>
+
+  </section>
+
+  <section name="Deleting objects">
+    <p>
+      Deletes work much in the same way as a select. If you, for example,
+      want to delete the author with id = 3 then you simply add it to the
+      Criteria and call doDelete.
+    </p>
+
+<source>
+Criteria criteria = new Criteria();
+crit.add(AuthorPeer.AUTHOR_ID, 3);
+AuthorPeer.doDelete(criteria);
+</source>
+
+  </section>
+ </body>
+</document>

Modified: db/torque/site/trunk/maven.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/maven.xml?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/maven.xml (original)
+++ db/torque/site/trunk/maven.xml Sat Nov 11 14:37:25 2006
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright 2001-2005 The Apache Software Foundation.
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
 
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+   http://www.apache.org/licenses/LICENSE-2.0
 
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
 -->
 
 <!-- ======================================================================== -->

Modified: db/torque/site/trunk/project.properties
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/project.properties?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/project.properties (original)
+++ db/torque/site/trunk/project.properties Sat Nov 11 14:37:25 2006
@@ -1,16 +1,19 @@
-# Copyright 2001-2005 The Apache Software Foundation.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
 #
-# Licensed under the Apache License, Version 2.0 (the "License")
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
 maven.xdoc.includeProjectDocumentation = no
 maven.xdoc.date = left
 maven.xdoc.locale.default = en

Modified: db/torque/site/trunk/project.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/project.xml?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/project.xml (original)
+++ db/torque/site/trunk/project.xml Sat Nov 11 14:37:25 2006
@@ -1,18 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright 2001-2005 The Apache Software Foundation.
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
 
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+   http://www.apache.org/licenses/LICENSE-2.0
 
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
 -->
 
 <project>

Modified: db/torque/site/trunk/src/dtd/database.dtd
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/src/dtd/database.dtd?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/src/dtd/database.dtd (original)
+++ db/torque/site/trunk/src/dtd/database.dtd Sat Nov 11 14:37:25 2006
@@ -1,147 +1,150 @@
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
-    Torque XML database schema DTD
-    $Id: database.dtd,v 1.10 2001/12/27 20:49:32 jmcnally Exp $
--->
-
-<!--
-For: database.defaultIdMethod and table.idMethod
-
-Do not use autoincrement or sequence. They are deprecated in favor of
-using native which will use the Turbine Connection pool to determine
-which database it is talking to (yes, it knows that) and then use
-whatever native database methodology for insert increments that it can.
-Otherwise, you should use idbroker or none. none is good if you have a
-table that is just a join table. idbroker is good if you want a
-centralized repository for brokering out clumps of id's in a database
-agnostic way.
--->
-
-<!--
-
-defaultJavaNamingMethod determines how a table or column name,
-from the name attribute in the xml database file, is converted to a
-Java class or method name.
-
-     nochange   - indicates not change is performed.
-     underscore - Underscores are removed, First letter is
-              capitalized, first letter after an underscore
-              is capitalized, the rest of the letters are
-              converted to lowercase.
-     javaname   - same as underscore, but no letters are converted
-              to lowercase.
--->
-
-<!ELEMENT database (table+)>
-<!ATTLIST database
-  name CDATA #IMPLIED
-  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
-  defaultJavaType (object|primitive) "primitive"
-  package CDATA #IMPLIED
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
-  heavyIndexing (true|false) "false"
->
-
-<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
-<!ATTLIST table
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
-  skipSql (true|false) "false"
-  abstract (true|false) "false"
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  alias CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  heavyIndexing (true|false) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT id-method-parameter EMPTY>
-<!ATTLIST id-method-parameter
-  name CDATA "default"
-  value CDATA #REQUIRED
->
-
-<!ELEMENT column (inheritance*)>
-<!ATTLIST column
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  primaryKey (true|false) "false"
-  required (true|false) "false"
-  type
-    (
-          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
-        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
-        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
-        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
-        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
-        | DOUBLE
-    ) "VARCHAR"
-  javaType (object|primitive) #IMPLIED
-  size CDATA #IMPLIED
-  default CDATA #IMPLIED
-  autoIncrement (true|false) "false"
-  inheritance (single|false) "false"
-  inputValidator CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT inheritance EMPTY>
-<!ATTLIST inheritance
-  key CDATA #REQUIRED
-  class CDATA #REQUIRED
-  extends CDATA #IMPLIED
->
-
-<!ELEMENT foreign-key (reference+)>
-<!ATTLIST foreign-key
-  foreignTable CDATA #REQUIRED
-  name CDATA #IMPLIED
-  onUpdate (cascade|setnull|restrict|none) "none"
-  onDelete (cascade|setnull|restrict|none) "none"
->
-
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference
-  local CDATA #REQUIRED
-  foreign CDATA #REQUIRED
->
-
-<!ELEMENT index (index-column+)>
-<!ATTLIST index
-  name CDATA #IMPLIED
->
-
-<!ELEMENT index-column EMPTY>
-<!ATTLIST index-column
-  name CDATA #REQUIRED
-  size CDATA #IMPLIED
->
-
-<!ELEMENT unique (unique-column+)>
-<!ATTLIST unique
-  name CDATA #IMPLIED
->
-
-<!ELEMENT unique-column EMPTY>
-<!ATTLIST unique-column
-  name CDATA #REQUIRED
->
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database.dtd,v 1.10 2001/12/27 20:49:32 jmcnally Exp $
+-->
+
+<!--
+For: database.defaultIdMethod and table.idMethod
+
+Do not use autoincrement or sequence. They are deprecated in favor of
+using native which will use the Turbine Connection pool to determine
+which database it is talking to (yes, it knows that) and then use
+whatever native database methodology for insert increments that it can.
+Otherwise, you should use idbroker or none. none is good if you have a
+table that is just a join table. idbroker is good if you want a
+centralized repository for brokering out clumps of id's in a database
+agnostic way.
+-->
+
+<!--
+
+defaultJavaNamingMethod determines how a table or column name,
+from the name attribute in the xml database file, is converted to a
+Java class or method name.
+
+     nochange   - indicates not change is performed.
+     underscore - Underscores are removed, First letter is
+              capitalized, first letter after an underscore
+              is capitalized, the rest of the letters are
+              converted to lowercase.
+     javaname   - same as underscore, but no letters are converted
+              to lowercase.
+-->
+
+<!ELEMENT database (table+)>
+<!ATTLIST database
+  name CDATA #IMPLIED
+  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
+  defaultJavaType (object|primitive) "primitive"
+  package CDATA #IMPLIED
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
+  heavyIndexing (true|false) "false"
+>
+
+<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
+<!ATTLIST table
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
+  skipSql (true|false) "false"
+  abstract (true|false) "false"
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  alias CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  heavyIndexing (true|false) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT id-method-parameter EMPTY>
+<!ATTLIST id-method-parameter
+  name CDATA "default"
+  value CDATA #REQUIRED
+>
+
+<!ELEMENT column (inheritance*)>
+<!ATTLIST column
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  primaryKey (true|false) "false"
+  required (true|false) "false"
+  type
+    (
+          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
+        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
+        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
+        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
+        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
+        | DOUBLE
+    ) "VARCHAR"
+  javaType (object|primitive) #IMPLIED
+  size CDATA #IMPLIED
+  default CDATA #IMPLIED
+  autoIncrement (true|false) "false"
+  inheritance (single|false) "false"
+  inputValidator CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT inheritance EMPTY>
+<!ATTLIST inheritance
+  key CDATA #REQUIRED
+  class CDATA #REQUIRED
+  extends CDATA #IMPLIED
+>
+
+<!ELEMENT foreign-key (reference+)>
+<!ATTLIST foreign-key
+  foreignTable CDATA #REQUIRED
+  name CDATA #IMPLIED
+  onUpdate (cascade|setnull|restrict|none) "none"
+  onDelete (cascade|setnull|restrict|none) "none"
+>
+
+<!ELEMENT reference EMPTY>
+<!ATTLIST reference
+  local CDATA #REQUIRED
+  foreign CDATA #REQUIRED
+>
+
+<!ELEMENT index (index-column+)>
+<!ATTLIST index
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT index-column EMPTY>
+<!ATTLIST index-column
+  name CDATA #REQUIRED
+  size CDATA #IMPLIED
+>
+
+<!ELEMENT unique (unique-column+)>
+<!ATTLIST unique
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT unique-column EMPTY>
+<!ATTLIST unique-column
+  name CDATA #REQUIRED
+>

Modified: db/torque/site/trunk/src/dtd/database_3_0_0.dtd
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/src/dtd/database_3_0_0.dtd?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/src/dtd/database_3_0_0.dtd (original)
+++ db/torque/site/trunk/src/dtd/database_3_0_0.dtd Sat Nov 11 14:37:25 2006
@@ -1,147 +1,150 @@
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
-    Torque XML database schema DTD
-    $Id: database.dtd,v 1.10 2001/12/27 20:49:32 jmcnally Exp $
--->
-
-<!--
-For: database.defaultIdMethod and table.idMethod
-
-Do not use autoincrement or sequence. They are deprecated in favor of
-using native which will use the Turbine Connection pool to determine
-which database it is talking to (yes, it knows that) and then use
-whatever native database methodology for insert increments that it can.
-Otherwise, you should use idbroker or none. none is good if you have a
-table that is just a join table. idbroker is good if you want a
-centralized repository for brokering out clumps of id's in a database
-agnostic way.
--->
-
-<!--
-
-defaultJavaNamingMethod determines how a table or column name,
-from the name attribute in the xml database file, is converted to a
-Java class or method name.
-
-     nochange   - indicates not change is performed.
-     underscore - Underscores are removed, First letter is
-              capitalized, first letter after an underscore
-              is capitalized, the rest of the letters are
-              converted to lowercase.
-     javaname   - same as underscore, but no letters are converted
-              to lowercase.
--->
-
-<!ELEMENT database (table+)>
-<!ATTLIST database
-  name CDATA #IMPLIED
-  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
-  defaultJavaType (object|primitive) "primitive"
-  package CDATA #IMPLIED
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
-  heavyIndexing (true|false) "false"
->
-
-<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
-<!ATTLIST table
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
-  skipSql (true|false) "false"
-  abstract (true|false) "false"
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  alias CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  heavyIndexing (true|false) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT id-method-parameter EMPTY>
-<!ATTLIST id-method-parameter
-  name CDATA "default"
-  value CDATA #REQUIRED
->
-
-<!ELEMENT column (inheritance*)>
-<!ATTLIST column
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  primaryKey (true|false) "false"
-  required (true|false) "false"
-  type
-    (
-          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
-        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
-        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
-        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
-        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
-        | DOUBLE
-    ) "VARCHAR"
-  javaType (object|primitive) #IMPLIED
-  size CDATA #IMPLIED
-  default CDATA #IMPLIED
-  autoIncrement (true|false) "false"
-  inheritance (single|false) "false"
-  inputValidator CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT inheritance EMPTY>
-<!ATTLIST inheritance
-  key CDATA #REQUIRED
-  class CDATA #REQUIRED
-  extends CDATA #IMPLIED
->
-
-<!ELEMENT foreign-key (reference+)>
-<!ATTLIST foreign-key
-  foreignTable CDATA #REQUIRED
-  name CDATA #IMPLIED
-  onUpdate (cascade|setnull|restrict|none) "none"
-  onDelete (cascade|setnull|restrict|none) "none"
->
-
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference
-  local CDATA #REQUIRED
-  foreign CDATA #REQUIRED
->
-
-<!ELEMENT index (index-column+)>
-<!ATTLIST index
-  name CDATA #IMPLIED
->
-
-<!ELEMENT index-column EMPTY>
-<!ATTLIST index-column
-  name CDATA #REQUIRED
-  size CDATA #IMPLIED
->
-
-<!ELEMENT unique (unique-column+)>
-<!ATTLIST unique
-  name CDATA #IMPLIED
->
-
-<!ELEMENT unique-column EMPTY>
-<!ATTLIST unique-column
-  name CDATA #REQUIRED
->
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database.dtd,v 1.10 2001/12/27 20:49:32 jmcnally Exp $
+-->
+
+<!--
+For: database.defaultIdMethod and table.idMethod
+
+Do not use autoincrement or sequence. They are deprecated in favor of
+using native which will use the Turbine Connection pool to determine
+which database it is talking to (yes, it knows that) and then use
+whatever native database methodology for insert increments that it can.
+Otherwise, you should use idbroker or none. none is good if you have a
+table that is just a join table. idbroker is good if you want a
+centralized repository for brokering out clumps of id's in a database
+agnostic way.
+-->
+
+<!--
+
+defaultJavaNamingMethod determines how a table or column name,
+from the name attribute in the xml database file, is converted to a
+Java class or method name.
+
+     nochange   - indicates not change is performed.
+     underscore - Underscores are removed, First letter is
+              capitalized, first letter after an underscore
+              is capitalized, the rest of the letters are
+              converted to lowercase.
+     javaname   - same as underscore, but no letters are converted
+              to lowercase.
+-->
+
+<!ELEMENT database (table+)>
+<!ATTLIST database
+  name CDATA #IMPLIED
+  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
+  defaultJavaType (object|primitive) "primitive"
+  package CDATA #IMPLIED
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
+  heavyIndexing (true|false) "false"
+>
+
+<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
+<!ATTLIST table
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
+  skipSql (true|false) "false"
+  abstract (true|false) "false"
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  alias CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  heavyIndexing (true|false) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT id-method-parameter EMPTY>
+<!ATTLIST id-method-parameter
+  name CDATA "default"
+  value CDATA #REQUIRED
+>
+
+<!ELEMENT column (inheritance*)>
+<!ATTLIST column
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  primaryKey (true|false) "false"
+  required (true|false) "false"
+  type
+    (
+          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
+        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
+        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
+        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
+        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
+        | DOUBLE
+    ) "VARCHAR"
+  javaType (object|primitive) #IMPLIED
+  size CDATA #IMPLIED
+  default CDATA #IMPLIED
+  autoIncrement (true|false) "false"
+  inheritance (single|false) "false"
+  inputValidator CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT inheritance EMPTY>
+<!ATTLIST inheritance
+  key CDATA #REQUIRED
+  class CDATA #REQUIRED
+  extends CDATA #IMPLIED
+>
+
+<!ELEMENT foreign-key (reference+)>
+<!ATTLIST foreign-key
+  foreignTable CDATA #REQUIRED
+  name CDATA #IMPLIED
+  onUpdate (cascade|setnull|restrict|none) "none"
+  onDelete (cascade|setnull|restrict|none) "none"
+>
+
+<!ELEMENT reference EMPTY>
+<!ATTLIST reference
+  local CDATA #REQUIRED
+  foreign CDATA #REQUIRED
+>
+
+<!ELEMENT index (index-column+)>
+<!ATTLIST index
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT index-column EMPTY>
+<!ATTLIST index-column
+  name CDATA #REQUIRED
+  size CDATA #IMPLIED
+>
+
+<!ELEMENT unique (unique-column+)>
+<!ATTLIST unique
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT unique-column EMPTY>
+<!ATTLIST unique-column
+  name CDATA #REQUIRED
+>

Modified: db/torque/site/trunk/src/dtd/database_3_0_1.dtd
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/src/dtd/database_3_0_1.dtd?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/src/dtd/database_3_0_1.dtd (original)
+++ db/torque/site/trunk/src/dtd/database_3_0_1.dtd Sat Nov 11 14:37:25 2006
@@ -1,157 +1,160 @@
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
-    Torque XML database schema DTD
-    $Id: database.dtd,v 1.13 2002/06/20 23:55:14 jmcnally Exp $
--->
-
-<!--
-For: database.defaultIdMethod and table.idMethod
-
-Do not use autoincrement or sequence. They are deprecated in favor of
-using native which will use the Turbine Connection pool to determine
-which database it is talking to (yes, it knows that) and then use
-whatever native database methodology for insert increments that it can.
-Otherwise, you should use idbroker or none. none is good if you have a
-table that is just a join table. idbroker is good if you want a
-centralized repository for brokering out clumps of id's in a database
-agnostic way.
--->
-
-<!--
-
-defaultJavaNamingMethod determines how a table or column name,
-from the name attribute in the xml database file, is converted to a
-Java class or method name.
-
-     nochange   - indicates not change is performed.
-     underscore - Underscores are removed, First letter is
-              capitalized, first letter after an underscore
-              is capitalized, the rest of the letters are
-              converted to lowercase.
-     javaname   - same as underscore, but no letters are converted
-              to lowercase.
--->
-
-<!ELEMENT database (external-schema*, table+)>
-<!ATTLIST database
-  name CDATA #IMPLIED
-  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
-  defaultJavaType (object|primitive) "primitive"
-  package CDATA #IMPLIED
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
-  heavyIndexing (true|false) "false"
->
-
-<!ELEMENT external-schema EMPTY>
-<!ATTLIST external-schema
-  filename CDATA #REQUIRED
->
-
-<!--
-     note: the interface="true", requires that useManagers=true in the
-     properties file.
--->
-<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
-<!ATTLIST table
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
-  skipSql (true|false) "false"
-  abstract (true|false) "false"
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  alias CDATA #IMPLIED
-  interface CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  heavyIndexing (true|false) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT id-method-parameter EMPTY>
-<!ATTLIST id-method-parameter
-  name CDATA "default"
-  value CDATA #REQUIRED
->
-
-<!ELEMENT column (inheritance*)>
-<!ATTLIST column
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  primaryKey (true|false) "false"
-  required (true|false) "false"
-  type
-    (
-          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
-        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
-        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
-        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
-        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
-        | DOUBLE
-    ) "VARCHAR"
-  javaType (object|primitive) #IMPLIED
-  size CDATA #IMPLIED
-  default CDATA #IMPLIED
-  autoIncrement (true|false) "false"
-  inheritance (single|false) "false"
-  inputValidator CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT inheritance EMPTY>
-<!ATTLIST inheritance
-  key CDATA #REQUIRED
-  class CDATA #REQUIRED
-  extends CDATA #IMPLIED
->
-
-<!ELEMENT foreign-key (reference+)>
-<!ATTLIST foreign-key
-  foreignTable CDATA #REQUIRED
-  name CDATA #IMPLIED
-  onUpdate (cascade|setnull|restrict|none) "none"
-  onDelete (cascade|setnull|restrict|none) "none"
->
-
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference
-  local CDATA #REQUIRED
-  foreign CDATA #REQUIRED
->
-
-<!ELEMENT index (index-column+)>
-<!ATTLIST index
-  name CDATA #IMPLIED
->
-
-<!ELEMENT index-column EMPTY>
-<!ATTLIST index-column
-  name CDATA #REQUIRED
-  size CDATA #IMPLIED
->
-
-<!ELEMENT unique (unique-column+)>
-<!ATTLIST unique
-  name CDATA #IMPLIED
->
-
-<!ELEMENT unique-column EMPTY>
-<!ATTLIST unique-column
-  name CDATA #REQUIRED
->
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database.dtd,v 1.13 2002/06/20 23:55:14 jmcnally Exp $
+-->
+
+<!--
+For: database.defaultIdMethod and table.idMethod
+
+Do not use autoincrement or sequence. They are deprecated in favor of
+using native which will use the Turbine Connection pool to determine
+which database it is talking to (yes, it knows that) and then use
+whatever native database methodology for insert increments that it can.
+Otherwise, you should use idbroker or none. none is good if you have a
+table that is just a join table. idbroker is good if you want a
+centralized repository for brokering out clumps of id's in a database
+agnostic way.
+-->
+
+<!--
+
+defaultJavaNamingMethod determines how a table or column name,
+from the name attribute in the xml database file, is converted to a
+Java class or method name.
+
+     nochange   - indicates not change is performed.
+     underscore - Underscores are removed, First letter is
+              capitalized, first letter after an underscore
+              is capitalized, the rest of the letters are
+              converted to lowercase.
+     javaname   - same as underscore, but no letters are converted
+              to lowercase.
+-->
+
+<!ELEMENT database (external-schema*, table+)>
+<!ATTLIST database
+  name CDATA #IMPLIED
+  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
+  defaultJavaType (object|primitive) "primitive"
+  package CDATA #IMPLIED
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
+  heavyIndexing (true|false) "false"
+>
+
+<!ELEMENT external-schema EMPTY>
+<!ATTLIST external-schema
+  filename CDATA #REQUIRED
+>
+
+<!--
+     note: the interface="true", requires that useManagers=true in the
+     properties file.
+-->
+<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
+<!ATTLIST table
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
+  skipSql (true|false) "false"
+  abstract (true|false) "false"
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  alias CDATA #IMPLIED
+  interface CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  heavyIndexing (true|false) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT id-method-parameter EMPTY>
+<!ATTLIST id-method-parameter
+  name CDATA "default"
+  value CDATA #REQUIRED
+>
+
+<!ELEMENT column (inheritance*)>
+<!ATTLIST column
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  primaryKey (true|false) "false"
+  required (true|false) "false"
+  type
+    (
+          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
+        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
+        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
+        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
+        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
+        | DOUBLE
+    ) "VARCHAR"
+  javaType (object|primitive) #IMPLIED
+  size CDATA #IMPLIED
+  default CDATA #IMPLIED
+  autoIncrement (true|false) "false"
+  inheritance (single|false) "false"
+  inputValidator CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT inheritance EMPTY>
+<!ATTLIST inheritance
+  key CDATA #REQUIRED
+  class CDATA #REQUIRED
+  extends CDATA #IMPLIED
+>
+
+<!ELEMENT foreign-key (reference+)>
+<!ATTLIST foreign-key
+  foreignTable CDATA #REQUIRED
+  name CDATA #IMPLIED
+  onUpdate (cascade|setnull|restrict|none) "none"
+  onDelete (cascade|setnull|restrict|none) "none"
+>
+
+<!ELEMENT reference EMPTY>
+<!ATTLIST reference
+  local CDATA #REQUIRED
+  foreign CDATA #REQUIRED
+>
+
+<!ELEMENT index (index-column+)>
+<!ATTLIST index
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT index-column EMPTY>
+<!ATTLIST index-column
+  name CDATA #REQUIRED
+  size CDATA #IMPLIED
+>
+
+<!ELEMENT unique (unique-column+)>
+<!ATTLIST unique
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT unique-column EMPTY>
+<!ATTLIST unique-column
+  name CDATA #REQUIRED
+>

Modified: db/torque/site/trunk/src/dtd/database_3_1.dtd
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/src/dtd/database_3_1.dtd?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/src/dtd/database_3_1.dtd (original)
+++ db/torque/site/trunk/src/dtd/database_3_1.dtd Sat Nov 11 14:37:25 2006
@@ -1,157 +1,160 @@
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
-    Torque XML database schema DTD
-    $Id: database.dtd,v 1.14 2003/01/08 16:43:57 henning Exp $
--->
-
-<!--
-For: database.defaultIdMethod and table.idMethod
-
-Do not use autoincrement or sequence. They are deprecated in favor of
-using native which will use the Connection pool to determine
-which database it is talking to (yes, it knows that) and then use
-whatever native database methodology for insert increments that it can.
-Otherwise, you should use idbroker or none. none is good if you have a
-table that is just a join table. idbroker is good if you want a
-centralized repository for brokering out clumps of id's in a database
-agnostic way.
--->
-
-<!--
-
-defaultJavaNamingMethod determines how a table or column name,
-from the name attribute in the xml database file, is converted to a
-Java class or method name.
-
-     nochange   - indicates not change is performed.
-     underscore - Underscores are removed, First letter is
-              capitalized, first letter after an underscore
-              is capitalized, the rest of the letters are
-              converted to lowercase.
-     javaname   - same as underscore, but no letters are converted
-              to lowercase.
--->
-
-<!ELEMENT database (external-schema*, table+)>
-<!ATTLIST database
-  name CDATA #IMPLIED
-  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
-  defaultJavaType (object|primitive) "primitive"
-  package CDATA #IMPLIED
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
-  heavyIndexing (true|false) "false"
->
-
-<!ELEMENT external-schema EMPTY>
-<!ATTLIST external-schema
-  filename CDATA #REQUIRED
->
-
-<!--
-     note: the interface="true", requires that useManagers=true in the
-     properties file.
--->
-<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
-<!ATTLIST table
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
-  skipSql (true|false) "false"
-  abstract (true|false) "false"
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  alias CDATA #IMPLIED
-  interface CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  heavyIndexing (true|false) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT id-method-parameter EMPTY>
-<!ATTLIST id-method-parameter
-  name CDATA "default"
-  value CDATA #REQUIRED
->
-
-<!ELEMENT column (inheritance*)>
-<!ATTLIST column
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  primaryKey (true|false) "false"
-  required (true|false) "false"
-  type
-    (
-          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
-        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
-        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
-        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
-        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
-        | DOUBLE
-    ) "VARCHAR"
-  javaType (object|primitive) #IMPLIED
-  size CDATA #IMPLIED
-  default CDATA #IMPLIED
-  autoIncrement (true|false) "false"
-  inheritance (single|false) "false"
-  inputValidator CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT inheritance EMPTY>
-<!ATTLIST inheritance
-  key CDATA #REQUIRED
-  class CDATA #REQUIRED
-  extends CDATA #IMPLIED
->
-
-<!ELEMENT foreign-key (reference+)>
-<!ATTLIST foreign-key
-  foreignTable CDATA #REQUIRED
-  name CDATA #IMPLIED
-  onUpdate (cascade|setnull|restrict|none) "none"
-  onDelete (cascade|setnull|restrict|none) "none"
->
-
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference
-  local CDATA #REQUIRED
-  foreign CDATA #REQUIRED
->
-
-<!ELEMENT index (index-column+)>
-<!ATTLIST index
-  name CDATA #IMPLIED
->
-
-<!ELEMENT index-column EMPTY>
-<!ATTLIST index-column
-  name CDATA #REQUIRED
-  size CDATA #IMPLIED
->
-
-<!ELEMENT unique (unique-column+)>
-<!ATTLIST unique
-  name CDATA #IMPLIED
->
-
-<!ELEMENT unique-column EMPTY>
-<!ATTLIST unique-column
-  name CDATA #REQUIRED
->
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database.dtd,v 1.14 2003/01/08 16:43:57 henning Exp $
+-->
+
+<!--
+For: database.defaultIdMethod and table.idMethod
+
+Do not use autoincrement or sequence. They are deprecated in favor of
+using native which will use the Connection pool to determine
+which database it is talking to (yes, it knows that) and then use
+whatever native database methodology for insert increments that it can.
+Otherwise, you should use idbroker or none. none is good if you have a
+table that is just a join table. idbroker is good if you want a
+centralized repository for brokering out clumps of id's in a database
+agnostic way.
+-->
+
+<!--
+
+defaultJavaNamingMethod determines how a table or column name,
+from the name attribute in the xml database file, is converted to a
+Java class or method name.
+
+     nochange   - indicates not change is performed.
+     underscore - Underscores are removed, First letter is
+              capitalized, first letter after an underscore
+              is capitalized, the rest of the letters are
+              converted to lowercase.
+     javaname   - same as underscore, but no letters are converted
+              to lowercase.
+-->
+
+<!ELEMENT database (external-schema*, table+)>
+<!ATTLIST database
+  name CDATA #IMPLIED
+  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
+  defaultJavaType (object|primitive) "primitive"
+  package CDATA #IMPLIED
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  defaultJavaNamingMethod (nochange|underscore|javaname) "underscore"
+  heavyIndexing (true|false) "false"
+>
+
+<!ELEMENT external-schema EMPTY>
+<!ATTLIST external-schema
+  filename CDATA #REQUIRED
+>
+
+<!--
+     note: the interface="true", requires that useManagers=true in the
+     properties file.
+-->
+<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
+<!ATTLIST table
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
+  skipSql (true|false) "false"
+  abstract (true|false) "false"
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  alias CDATA #IMPLIED
+  interface CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  heavyIndexing (true|false) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT id-method-parameter EMPTY>
+<!ATTLIST id-method-parameter
+  name CDATA "default"
+  value CDATA #REQUIRED
+>
+
+<!ELEMENT column (inheritance*)>
+<!ATTLIST column
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  primaryKey (true|false) "false"
+  required (true|false) "false"
+  type
+    (
+          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
+        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
+        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
+        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
+        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
+        | DOUBLE
+    ) "VARCHAR"
+  javaType (object|primitive) #IMPLIED
+  size CDATA #IMPLIED
+  default CDATA #IMPLIED
+  autoIncrement (true|false) "false"
+  inheritance (single|false) "false"
+  inputValidator CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT inheritance EMPTY>
+<!ATTLIST inheritance
+  key CDATA #REQUIRED
+  class CDATA #REQUIRED
+  extends CDATA #IMPLIED
+>
+
+<!ELEMENT foreign-key (reference+)>
+<!ATTLIST foreign-key
+  foreignTable CDATA #REQUIRED
+  name CDATA #IMPLIED
+  onUpdate (cascade|setnull|restrict|none) "none"
+  onDelete (cascade|setnull|restrict|none) "none"
+>
+
+<!ELEMENT reference EMPTY>
+<!ATTLIST reference
+  local CDATA #REQUIRED
+  foreign CDATA #REQUIRED
+>
+
+<!ELEMENT index (index-column+)>
+<!ATTLIST index
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT index-column EMPTY>
+<!ATTLIST index-column
+  name CDATA #REQUIRED
+  size CDATA #IMPLIED
+>
+
+<!ELEMENT unique (unique-column+)>
+<!ATTLIST unique
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT unique-column EMPTY>
+<!ATTLIST unique-column
+  name CDATA #REQUIRED
+>

Modified: db/torque/site/trunk/src/dtd/database_3_2.dtd
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/src/dtd/database_3_2.dtd?view=diff&rev=473821&r1=473820&r2=473821
==============================================================================
--- db/torque/site/trunk/src/dtd/database_3_2.dtd (original)
+++ db/torque/site/trunk/src/dtd/database_3_2.dtd Sat Nov 11 14:37:25 2006
@@ -1,184 +1,187 @@
-<!--
- Copyright 2001-2005 The Apache Software Foundation.
-
- Licensed under the Apache License, Version 2.0 (the "License")
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
-    Torque XML database schema DTD
-    $Id: database.dtd,v 1.8 2005/06/27 21:34:10 tfischer Exp $
--->
-
-<!--
-For: database.defaultIdMethod and table.idMethod
-
-Do not use autoincrement or sequence. They are deprecated in favor of
-using native which will use the Connection pool to determine
-which database it is talking to (yes, it knows that) and then use
-whatever native database methodology for insert increments that it can.
-Otherwise, you should use idbroker or none. none is good if you have a
-table that is just a join table. idbroker is good if you want a
-centralized repository for brokering out clumps of id's in a database
-agnostic way.
--->
-
-<!--
-
-defaultJavaNamingMethod determines how a table or column name,
-from the name attribute in the xml database file, is converted to a
-Java class or method name.
-
-     nochange   - indicates not change is performed.
-     underscore - Underscores and dots are removed, first letter is
-              capitalized, first letter after an underscore
-              is capitalized, first letter after a dot is capitalized,
-              the rest of the letters are converted to lowercase.
-     underscoreOmitSchema - The section of the name before and including
-              the last dot in the name is removed. For the remaining part,
-              underscores are removed, first letter is capitalized,
-              first letter after an underscore is capitalized,
-              the rest of the letters are converted to lowercase.
-     javaname   - same as underscore, but no letters are converted
-              to lowercase.
--->
-
-<!ELEMENT database (external-schema*, domain*, table+)>
-<!ATTLIST database
-  name CDATA #REQUIRED
-  defaultIdMethod (idbroker|native|none) "none"
-  defaultJavaType (object|primitive) "primitive"
-  package CDATA #IMPLIED
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  defaultJavaNamingMethod (nochange|underscore|underscoreOmitSchema|javaname) "underscore"
-  heavyIndexing (true|false) "false"
->
-
-<!ELEMENT external-schema EMPTY>
-<!ATTLIST external-schema
-  filename CDATA #REQUIRED
->
-
-<!ELEMENT domain EMPTY>
-<!ATTLIST domain
-  name CDATA #REQUIRED
-  type
-    (
-          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
-        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
-        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
-        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
-        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
-        | DOUBLE
-    ) "VARCHAR"
-  size CDATA #IMPLIED
-  scale CDATA #IMPLIED
-  default CDATA #IMPLIED
-  description CDATA #IMPLIED
->
-
-
-<!--
-     note: the interface="true", requires that useManagers=true in the
-     properties file.
--->
-<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
-<!ATTLIST table
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  idMethod (idbroker|native|none|null) "null"
-  skipSql (true|false) "false"
-  abstract (true|false) "false"
-  baseClass CDATA #IMPLIED
-  basePeer CDATA #IMPLIED
-  alias CDATA #IMPLIED
-  interface CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|underscoreOmitSchema|javaname) #IMPLIED
-  heavyIndexing (true|false) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT id-method-parameter EMPTY>
-<!ATTLIST id-method-parameter
-  name CDATA "default"
-  value CDATA #REQUIRED
->
-
-<!ELEMENT column (inheritance*)>
-<!ATTLIST column
-  name CDATA #REQUIRED
-  javaName CDATA #IMPLIED
-  primaryKey (true|false) "false"
-  required (true|false) "false"
-  protected (true|false) "false"
-  domain CDATA #IMPLIED
-  type
-    (
-          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
-        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
-        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
-        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
-        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
-        | DOUBLE
-    ) #IMPLIED
-  javaType (object|primitive) #IMPLIED
-  size CDATA #IMPLIED
-  scale CDATA #IMPLIED
-  default CDATA #IMPLIED
-  autoIncrement (true|false) #IMPLIED
-  inheritance (single|false) "false"
-  inputValidator CDATA #IMPLIED
-  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
-  description CDATA #IMPLIED
->
-
-<!ELEMENT inheritance EMPTY>
-<!ATTLIST inheritance
-  key CDATA #REQUIRED
-  class CDATA #REQUIRED
-  extends CDATA #IMPLIED
->
-
-<!ELEMENT foreign-key (reference+)>
-<!ATTLIST foreign-key
-  foreignTable CDATA #REQUIRED
-  name CDATA #IMPLIED
-  onUpdate (cascade|setnull|restrict|none) "none"
-  onDelete (cascade|setnull|restrict|none) "none"
->
-
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference
-  local CDATA #REQUIRED
-  foreign CDATA #REQUIRED
->
-
-<!ELEMENT index (index-column+)>
-<!ATTLIST index
-  name CDATA #IMPLIED
->
-
-<!ELEMENT index-column EMPTY>
-<!ATTLIST index-column
-  name CDATA #REQUIRED
-  size CDATA #IMPLIED
->
-
-<!ELEMENT unique (unique-column+)>
-<!ATTLIST unique
-  name CDATA #IMPLIED
->
-
-<!ELEMENT unique-column EMPTY>
-<!ATTLIST unique-column
-  name CDATA #REQUIRED
->
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--
+    Torque XML database schema DTD
+    $Id: database.dtd,v 1.8 2005/06/27 21:34:10 tfischer Exp $
+-->
+
+<!--
+For: database.defaultIdMethod and table.idMethod
+
+Do not use autoincrement or sequence. They are deprecated in favor of
+using native which will use the Connection pool to determine
+which database it is talking to (yes, it knows that) and then use
+whatever native database methodology for insert increments that it can.
+Otherwise, you should use idbroker or none. none is good if you have a
+table that is just a join table. idbroker is good if you want a
+centralized repository for brokering out clumps of id's in a database
+agnostic way.
+-->
+
+<!--
+
+defaultJavaNamingMethod determines how a table or column name,
+from the name attribute in the xml database file, is converted to a
+Java class or method name.
+
+     nochange   - indicates not change is performed.
+     underscore - Underscores and dots are removed, first letter is
+              capitalized, first letter after an underscore
+              is capitalized, first letter after a dot is capitalized,
+              the rest of the letters are converted to lowercase.
+     underscoreOmitSchema - The section of the name before and including
+              the last dot in the name is removed. For the remaining part,
+              underscores are removed, first letter is capitalized,
+              first letter after an underscore is capitalized,
+              the rest of the letters are converted to lowercase.
+     javaname   - same as underscore, but no letters are converted
+              to lowercase.
+-->
+
+<!ELEMENT database (external-schema*, domain*, table+)>
+<!ATTLIST database
+  name CDATA #REQUIRED
+  defaultIdMethod (idbroker|native|none) "none"
+  defaultJavaType (object|primitive) "primitive"
+  package CDATA #IMPLIED
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  defaultJavaNamingMethod (nochange|underscore|underscoreOmitSchema|javaname) "underscore"
+  heavyIndexing (true|false) "false"
+>
+
+<!ELEMENT external-schema EMPTY>
+<!ATTLIST external-schema
+  filename CDATA #REQUIRED
+>
+
+<!ELEMENT domain EMPTY>
+<!ATTLIST domain
+  name CDATA #REQUIRED
+  type
+    (
+          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
+        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
+        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
+        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
+        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
+        | DOUBLE
+    ) "VARCHAR"
+  size CDATA #IMPLIED
+  scale CDATA #IMPLIED
+  default CDATA #IMPLIED
+  description CDATA #IMPLIED
+>
+
+
+<!--
+     note: the interface="true", requires that useManagers=true in the
+     properties file.
+-->
+<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
+<!ATTLIST table
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  idMethod (idbroker|native|none|null) "null"
+  skipSql (true|false) "false"
+  abstract (true|false) "false"
+  baseClass CDATA #IMPLIED
+  basePeer CDATA #IMPLIED
+  alias CDATA #IMPLIED
+  interface CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|underscoreOmitSchema|javaname) #IMPLIED
+  heavyIndexing (true|false) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT id-method-parameter EMPTY>
+<!ATTLIST id-method-parameter
+  name CDATA "default"
+  value CDATA #REQUIRED
+>
+
+<!ELEMENT column (inheritance*)>
+<!ATTLIST column
+  name CDATA #REQUIRED
+  javaName CDATA #IMPLIED
+  primaryKey (true|false) "false"
+  required (true|false) "false"
+  protected (true|false) "false"
+  domain CDATA #IMPLIED
+  type
+    (
+          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
+        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
+        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
+        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
+        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
+        | DOUBLE
+    ) #IMPLIED
+  javaType (object|primitive) #IMPLIED
+  size CDATA #IMPLIED
+  scale CDATA #IMPLIED
+  default CDATA #IMPLIED
+  autoIncrement (true|false) #IMPLIED
+  inheritance (single|false) "false"
+  inputValidator CDATA #IMPLIED
+  javaNamingMethod (nochange|underscore|javaname) #IMPLIED
+  description CDATA #IMPLIED
+>
+
+<!ELEMENT inheritance EMPTY>
+<!ATTLIST inheritance
+  key CDATA #REQUIRED
+  class CDATA #REQUIRED
+  extends CDATA #IMPLIED
+>
+
+<!ELEMENT foreign-key (reference+)>
+<!ATTLIST foreign-key
+  foreignTable CDATA #REQUIRED
+  name CDATA #IMPLIED
+  onUpdate (cascade|setnull|restrict|none) "none"
+  onDelete (cascade|setnull|restrict|none) "none"
+>
+
+<!ELEMENT reference EMPTY>
+<!ATTLIST reference
+  local CDATA #REQUIRED
+  foreign CDATA #REQUIRED
+>
+
+<!ELEMENT index (index-column+)>
+<!ATTLIST index
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT index-column EMPTY>
+<!ATTLIST index-column
+  name CDATA #REQUIRED
+  size CDATA #IMPLIED
+>
+
+<!ELEMENT unique (unique-column+)>
+<!ATTLIST unique
+  name CDATA #IMPLIED
+>
+
+<!ELEMENT unique-column EMPTY>
+<!ATTLIST unique-column
+  name CDATA #REQUIRED
+>



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


Mime
View raw message