You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by dl...@apache.org on 2001/10/23 00:37:08 UTC

cvs commit: jakarta-turbine-2/xdocs/howto torque-schema-ref.xml

dlr         01/10/22 15:37:08

  Modified:    xdocs/howto torque-schema-ref.xml
  Log:
  Patch by Byron Foster.
  
  Revision  Changes    Path
  1.2       +33 -6     jakarta-turbine-2/xdocs/howto/torque-schema-ref.xml
  
  Index: torque-schema-ref.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-2/xdocs/howto/torque-schema-ref.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- torque-schema-ref.xml	2001/08/19 16:37:39	1.1
  +++ torque-schema-ref.xml	2001/10/22 22:37:08	1.2
  @@ -31,17 +31,19 @@
               defaultIdMethod="idBroker" 
               package="com.myapp.om" 
               baseClass="com.myapp.om.BaseClass" 
  -            basePeer="com.myapp.om.BasePeer">
  +            basePeer="com.myapp.om.BasePeer"
  +            defaultJavaNamingMethod="underscore">
         <table name="SIMPLE">
           <!-- table info goes here -->
         </table>
       </database>]]>
       </source>
       <p>
  -    The database element has 5 attributes associated with it, they are:
  +    The database element has 6 attributes associated with it, they are:
           <ul>
               <li>name - The name of the database being referenced</li>
               <li>defaultIdMethod - How will the primary keys be created, defaults to "none"</li>
  +            <li>defaultJavaNamingMethod - indicates how a schema table or column name is mapped to a java class or method name respectively</li>
               <li>package - used for OM Peer generation</li>
               <li>baseClass - used for OM generation</li>
               <li>basePeer - used for OM Peer generation</li>
  @@ -69,6 +71,23 @@
           </ul>
       </p>
       </subsection>
  +    <subsection name="Attribute: defaultJavaNameMethod">
  +    <p>
  +    This attribute determines how table or column names, from the
  +    name attribute of the table or column element, are converted to a
  +    Java class or method name respectively when creating the OM java
  +    objects. defaultJavaNameMethod can contain 3 different values:
  +        <ul>
  +	    <li>nochange - Indicates no change is performed.</li>
  +	    <li>underscore - Underscores are removed, First letter is
  +		      capitalized, first letter after an underscore
  +		      is capitalized, the rest of the letters are
  +		      converted to lowercase.</li>
  +	    <li>javaname - Same as underscore, but no letters are converted
  +		      to lowercase.</li>
  +       </ul>
  +    </p>
  +    </subsection>
       <subsection name="Attribute: package">
       <p>
       The base package in which this database will generate the Object Models associated with it.
  @@ -96,12 +115,13 @@
               idMethod="idbroker"
               skipSql="false"
               baseClass="com.myapp.om.table.BaseClass"
  -            basePeer="com.myapp.om.table.BasePeer">
  +            basePeer="com.myapp.om.table.BasePeer"
  +            javaNamingMethod="underscore">
           <!-- column information here -->
       </table>]]>
       </source>
       <p>
  -    The table element has 8 attributes associated with it, they are:
  +    The table element has 9 attributes associated with it, they are:
           <ul>
               <li>name - The name of the database being referenced</li>
               <li>javaName - How this table will be referenced in java</li>
  @@ -111,6 +131,12 @@
               <li>alias - The table alias</li>
               <li>baseClass - used for OM Peer generation</li>
               <li>basePeer - used for OM Peer generation</li>
  +
  +            <li>javaNamingMethod - Specifies how the name attribute is
  +            converted to the Java class name of the coresponding OM
  +            object.  this attribute overides the
  +            defaultJavaNamingMethod attribute of the database
  +            element</li>
           </ul>
           
       </p>
  @@ -141,13 +167,14 @@
               primaryKey="true"
               required="true"
               size="4"
  -            type="VARCHAR">
  +            type="VARCHAR"
  +            javaNamingMethod="underscore">
           <!-- inheritance info if necessary -->
       </column>
               ]]>
       </source>
       <p>
  -    The column element has 8 attributes associated with it, they are:
  +    The column element has 9 attributes associated with it, they are:
           <ul>
               <li>name - The name of the column being referenced</li>
               <li>javaName - How this column will be referred to in Java</li>
  
  
  

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