db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1356527 - in /db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference: new-database-support.xml relevant-classes.xml
Date Tue, 03 Jul 2012 00:18:22 GMT
Author: tfischer
Date: Tue Jul  3 00:18:21 2012
New Revision: 1356527

URL: http://svn.apache.org/viewvc?rev=1356527&view=rev
Log:
TORQUE-216: Rename class DB to Adapter docs changes

Modified:
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml
    db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/relevant-classes.xml

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml?rev=1356527&r1=1356526&r2=1356527&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml
(original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/new-database-support.xml
Tue Jul  3 00:18:21 2012
@@ -54,9 +54,10 @@
 
     <p>
       A database adapter class is a class that implements
-      <code>org.apache.torque.adapter.DB</code> and encapsulates access
-      to a specific RDBMS implementation. Database adapter classes already
-      found in Torque include DBOracle, DBMM, DBSybase, etc. 
+      <code>org.apache.torque.adapter.AbstractAdapter</code>
+      and encapsulates access to a specific RDBMS implementation.
+      Database adapter classes already
+      found in Torque include OracleAdapter, MysqlAdapter etc. 
       These classes allow Torque to gain access to a wide range of databases
       in a uniform manner. This allows you to easily swap between databases
       without any modification to Torque or the application built
@@ -79,39 +80,46 @@
     <p>
       <ul>
         <li>
-          Create a new class DB&lt;dbname> that implements
-          <code>org.apache.torque.adapter.DB</code> (where dbname is the name
of
-          the database or database driver you wish to add to Torque). An abstract
-          implementation, <code>org.apache.torque.adapter.AbstractDBAdapter</code>
is
-          provided which sets some defaults so that you only need to implement a 
-          number of methods.
+          Create a new class &lt;dbname&gt;Adapter that implements
+          <code>org.apache.torque.adapter.Adapter</code> 
+          (where dbname is the name of the database or database driver 
+          you wish to add to Torque). An abstract
+          implementation, <code>org.apache.torque.adapter.AbstractAdapter</code>
+          is provided which sets some defaults so that you only need
+          to implement a few methods.
         </li>
 
         <li>
-          Implement getStringDelimiter(). This method has to return
-          the character that the specific database implementation uses to
-          indicate string literals in SQL. This will usually be a single qoute
+          Override getStringDelimiter() if necessary.<br/>
+          This method has to return the character 
+          that the specific database implementation uses to
+          indicate string literals in SQL. This will usually be a single quote
           (').
         </li>
 
         <li>
-          Implement generateLimits(). This method has to provide the special
-          SQL expressions to limit the number of records returned and/or the
-          offset into the result set. This is only needed if supportsNativeLimit()
+          Override generateLimits() if necessary.<br/>
+          This method has to provide the special SQL expressions
+          to limit the number of records returned and/or the
+          offset into the result set. 
+          This is only needed if supportsNativeLimit()
           or supportsNativeOffset() return true.
         </li>
 
         <li>
-          Implement getIdMethodType(). This method should return the method
-          the database uses to generates unique Ids.  Valid return values are
+          Implement getIdMethodType().<br/>
+          This method should return the method the database uses
+          to generates unique Ids.
+          Valid return values are
           <code>org.apache.torque.adapter.IDMethod.AUTO_INCREMENT</code>,
           <code>org.apache.torque.adapter.IDMethod.SEQUENCE</code>, and
           <code>org.apache.torque.adapter.IDMethod.NO_ID_METHOD</code>.  
         </li>
 
         <li>
-          Implement String getIDMethodSQL(Object obj). Databases that use 
-          sequences for Id generation should return the SQL to get the next Id 
+          Implement String getIDMethodSQL(Object obj).<br/>
+          Databases that use sequences for Id generation
+          should return the SQL to get the next Id 
           from the sequence, where <code>obj</code> is the name of the sequence.
           Databases that use auto increment fields should return the last
           generated id; <code>obj</code> is the name of the table in this case.
@@ -119,22 +127,25 @@
         </li>
 
         <li>
-          Implement lockTable(Connection con, String table). This method
-          should place a lock on a database table, if this is possible for the 
-          database.  This method is not used internally by Torque, and was only
+          Implement lockTable(Connection con, String table).<br/>
+          This method should place a lock on a database table,
+          if this is possible for the database.
+          This method is not used internally by Torque, and was only
           retained to provide backwards compatibility.
         </li>
 
         <li>
-          Implement unlockTable(Connection con, String table). This method
-          should release the table lock acquired by the above-mentioned method,
-          if possible.  This method is not used internally by Torque, 
+          Implement unlockTable(Connection con, String table).<br/> 
+          This method should release the table lock acquired
+          by the above-mentioned method, if possible.
+          This method is not used internally by Torque, 
           and was only retained to provide backwards compatibility.
         </li>
 
         <li>
-          Implement ignoreCase(String in). This method should implement
-          a mechanism for case insensitive comparisons in the database. 
+          Implement ignoreCase(String in).<br/>
+          This method should implement a mechanism for case insensitive
+          comparisons in the database.
           Usually this converts the string to Uppercase, for example UPPER 
           (&lt;in&gt;). 
           If such a mechanism does not exist in your database, 
@@ -143,13 +154,14 @@
         </li>
 
         <li>
+          Override ignoreCaseInOrderBy(String in) if necessary.<br/>
           Some databases (for example Interbase) do not support the function
           returned by their implementation of ignoreCase() in the ORDER BY
           clause of SELECT statements. If your database falls into this
           category you should override the default implementation of
           String ignoreCaseInOrderBy(String in). It is NOT required to override
           this method for other databases--the default implementation calls
-          ignoreCase() and respectCase().
+          ignoreCase().
         </li>
       </ul>
     </p>

Modified: db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/relevant-classes.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/relevant-classes.xml?rev=1356527&r1=1356526&r2=1356527&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/relevant-classes.xml
(original)
+++ db/torque/torque4/trunk/torque-site/src/site/xdoc/documentation/modules/runtime/reference/relevant-classes.xml
Tue Jul  3 00:18:21 2012
@@ -194,10 +194,10 @@
     </p>
   </section>
   
-  <section name="Database adaptors">
+  <section name="Database adapters">
     <p>
       Although all databases supported by Torque understand SQL, there are
-      differences in the behaviour of the databases which the Torque runtime
+      differences in the behavior 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.
@@ -208,13 +208,14 @@
     </p>
 
     <p>
-      Adapters are subclasses of the <code>org.apache.torque.adapter.DB</code>
+      Adapters are subclasses of the 
+      <code>org.apache.torque.adapter.AbstractAdapter</code>
       class.
       The adapters are stored in the field adapter of the objects 
       kept in the map <code>TorqueInstance.databases</code>.
       The key of the map is the name of the database (e.g. "bookstore").
       The adapter for a given key can be retrieved via the method
-      Torque.getDB(key).
+      Torque.getAdapter(key).
     </p>
 
     <p>



---------------------------------------------------------------------
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