db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r470531 - in /db/torque/generator/trunk/src/java/org/apache/torque: engine/database/model/ engine/database/transform/ task/
Date Thu, 02 Nov 2006 21:30:47 GMT
Author: tfischer
Date: Thu Nov  2 13:30:46 2006
New Revision: 470531

URL: http://svn.apache.org/viewvc?view=rev&rev=470531
Log:
removed trailing spaces and spaces after opening brackets and before closing brackets.

Modified:
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Column.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Database.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/ForeignKey.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Index.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Table.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/TypeMap.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/DTDResolver.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
    db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToData.java
    db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Column.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Column.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Column.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Column.java
Thu Nov  2 13:30:46 2006
@@ -760,20 +760,20 @@
     public String getPrecision()
     {
         String size = getSize();
-        if ( size == null )
+        if (size == null)
         {
             return size;
         }
         int cLoc = size.indexOf(',');
-        if ( cLoc > 0 )
+        if (cLoc > 0)
         {
             size = size.substring(0, cLoc);
         }
-        try 
+        try
         {
             Integer.parseInt(size);
-        } 
-        catch ( NumberFormatException e  ) 
+        }
+        catch (NumberFormatException e)
         {
             log.warn("getPrecision(): Size attribute found ("
                     + getSize()
@@ -784,43 +784,43 @@
     }
 
     /**
-     * Try to determine the scale of the field from the scale and size 
+     * Try to determine the scale of the field from the scale and size
      * attribute.
      * If scale attribute is an integer number, it will be returned.
      * If size attribute is of the format "Precision,Scale", then Scale
      * will be returned.
-     * If scale and size attributes are null or the scale value found 
+     * If scale and size attributes are null or the scale value found
      * is not an valid integer, a null value is returned.
      * <p>
      * Note: Unparseable values will be logged as a warning.
-     * 
+     *
      * @return The precision portion of the size attribute.  
      */
     public String getScale()
     {
         String scale = domain.getScale();
         // Check for scale on size attribute if no scale attribute
-        if ( scale == null )
+        if (scale == null)
         {
             scale = getSize();
-            if ( scale == null )   // No scale or size attribute set.
+            if (scale == null)   // No scale or size attribute set.
             {
                 return scale;
             }
             int cLoc = scale.indexOf(',');
-            if ( cLoc < 0 )        // Size did not have "P,S" format
+            if (cLoc < 0)        // Size did not have "P,S" format
             {
                 return null;
             }
-            scale = scale.substring(cLoc + 1 );
+            scale = scale.substring(cLoc + 1);
         }
 
         // Validate that scale string found is integer.
-        try 
+        try
         {
             Integer.parseInt(scale);
         }
-        catch ( NumberFormatException e  ) 
+        catch (NumberFormatException e)
         {
             log.warn("getScale(): Scale (or size=\"p,s\") attribute found ("
                     + scale
@@ -1179,29 +1179,29 @@
 
     /**
      * Get the value of the inheritance attribute defined in the schema XML.
-     * 
+     *
      * @return Returns the inheritanceType.
      */
     public String getInheritanceType()
     {
         return inheritanceType;
     }
-    
+
     /**
      * Add an XML Specified option key/value pair to this element's option set.
-     * 
+     *
      * @param key the key of the option.
      * @param value the value of the option.
      */
     public void addOption(String key, String value)
     {
-        options.put( key, value );
+        options.put(key, value);
     }
-    
+
     /**
-     * Get the value that was associated with this key in an XML option 
+     * Get the value that was associated with this key in an XML option
      * element.
-     * 
+     *
      * @param key the key of the option.
      * @return The value for the key or a null.
      */
@@ -1209,15 +1209,15 @@
     {
         return (String) options.get(key);
     }
-    
+
     /**
      * Gets the full ordered hashtable array of items specified by XML option
      * statements under this element.<p>
-     * 
-     * Note, this is not thread save but since it's only used for 
-     * generation which is single threaded, there should be minimum 
+     *
+     * Note, this is not thread save but since it's only used for
+     * generation which is single threaded, there should be minimum
      * danger using this in Velocity.
-     * 
+     *
      * @return An Map of all options. Will not be null but may be empty.
      */
     public Map getOptions() 

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Database.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Database.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Database.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Database.java
Thu Nov  2 13:30:46 2006
@@ -569,23 +569,23 @@
 
     /**
      * Add an XML Specified option key/value pair to this element's option set.
-     * 
+     *
      * @param key the key of the option.
      * @param value the value of the option.
      */
     public void addOption(String key, String value)
     {
-        options.put( key, value );
+        options.put(key, value);
     }
-    
+
     /**
-     * Get the value that was associated with this key in an XML option 
+     * Get the value that was associated with this key in an XML option
      * element.
-     * 
+     *
      * @param key the key of the option.
      * @return The value for the key or a null.
      */
-    public String getOption( String key )
+    public String getOption(String key)
     {
         return (String) options.get(key);
     }
@@ -593,11 +593,11 @@
     /**
      * Gets the full ordered hashtable array of items specified by XML option
      * statements under this element.<p>
-     * 
-     * Note, this is not thread save but since it's only used for 
-     * generation which is single threaded, there should be minimum 
+     *
+     * Note, this is not thread save but since it's only used for
+     * generation which is single threaded, there should be minimum
      * danger using this in Velocity.
-     * 
+     *
      * @return An Map of all options. Will not be null but may be empty.
      */
     public Map getOptions()

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/ForeignKey.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/ForeignKey.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/ForeignKey.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/ForeignKey.java
Thu Nov  2 13:30:46 2006
@@ -338,26 +338,26 @@
         result.append("    </foreign-key>\n");
         return result.toString();
     }
-    
+
     /**
      * Add an XML Specified option key/value pair to this element's option set.
-     * 
+     *
      * @param key the key of the option.
      * @param value the value of the option.
      */
     public void addOption(String key, String value)
     {
-        options.put( key, value );
+        options.put(key, value);
     }
-    
+
     /**
-     * Get the value that was associated with this key in an XML option 
+     * Get the value that was associated with this key in an XML option
      * element.
-     * 
+     *
      * @param key the key of the option.
      * @return The value for the key or a null.
      */
-    public String getOption( String key )
+    public String getOption(String key)
     {
         return (String) options.get(key);
     }
@@ -365,16 +365,15 @@
     /**
      * Gets the full ordered hashtable array of items specified by XML option
      * statements under this element.<p>
-     * 
-     * Note, this is not thread save but since it's only used for 
-     * generation which is single threaded, there should be minimum 
+     *
+     * Note, this is not thread save but since it's only used for
+     * generation which is single threaded, there should be minimum
      * danger using this in Velocity.
-     * 
+     *
      * @return An Map of all options. Will not be null but may be empty.
      */
     public Map getOptions()
     {
         return options;
     }
-
 }

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Index.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Index.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Index.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Index.java
Thu Nov  2 13:30:46 2006
@@ -238,22 +238,22 @@
         result.append(" </index>\n");
         return result.toString();
     }
-    
+
     /**
      * Add an XML Specified option key/value pair to this element's option set.
-     * 
+     *
      * @param key the key of the option.
      * @param value the value of the option.
      */
     public void addOption(String key, String value)
     {
-        options.put( key, value );
+        options.put(key, value);
     }
-    
+
     /**
-     * Get the value that was associated with this key in an XML option 
+     * Get the value that was associated with this key in an XML option
      * element.
-     * 
+     *
      * @param key the key of the option.
      * @return The value for the key or a null.
      */
@@ -265,16 +265,15 @@
     /**
      * Gets the full ordered hashtable array of items specified by XML option
      * statements under this element.<p>
-     * 
-     * Note, this is not thread save but since it's only used for 
-     * generation which is single threaded, there should be minimum 
+     *
+     * Note, this is not thread save but since it's only used for
+     * generation which is single threaded, there should be minimum
      * danger using this in Velocity.
-     * 
+     *
      * @return An Map of all options. Will not be null but may be empty.
      */
     public Map getOptions()
     {
         return options;
     }
-
 }

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Table.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Table.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Table.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/Table.java
Thu Nov  2 13:30:46 2006
@@ -1149,44 +1149,44 @@
     public void setCorrectGetters(Boolean value)
     {
         boolean correctGetters = value != null && value.booleanValue();
-        for (Iterator it = columnList.iterator(); it.hasNext(); )
+        for (Iterator it = columnList.iterator(); it.hasNext();)
         {
             Column col = (Column) it.next();
             col.setCorrectGetters(correctGetters);
         }
     }
-    
+
     /**
      * Add an XML Specified option key/value pair to this element's option set.
-     * 
+     *
      * @param key the key of the option.
      * @param value the value of the option.
      */
     public void addOption(String key, String value)
     {
-        options.put( key, value );
+        options.put(key, value);
     }
-    
+
     /**
-     * Get the value that was associated with this key in an XML option 
+     * Get the value that was associated with this key in an XML option
      * element.
-     * 
+     *
      * @param key the key of the option.
      * @return The value for the key or a null.
      */
-    public String getOption( String key )
+    public String getOption(String key)
     {
         return (String) options.get(key);
     }
-    
+
     /**
      * Gets the full ordered hashtable array of items specified by XML option
      * statements under this element.<p>
-     * 
+     *
      * Note, this is not thread save but since it's only used for 
      * generation which is single threaded, there should be minimum 
      * danger using this in Velocity.
-     * 
+     *
      * @return An Map of all options. Will not be null but may be empty.
      */
     public Map getOptions()

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/TypeMap.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/TypeMap.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/TypeMap.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/model/TypeMap.java
Thu Nov  2 13:30:46 2006
@@ -558,7 +558,7 @@
         if (st == null)
         {
             st = SchemaType.VARCHAR;
-            log.warn("SchemaType for JdbcType '" + sqlType 
+            log.warn("SchemaType for JdbcType '" + sqlType
                     + "' is not defined: Defaulting to '" + st + '\'');
         }
         return st;

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/DTDResolver.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/DTDResolver.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/DTDResolver.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/DTDResolver.java
Thu Nov  2 13:30:46 2006
@@ -85,11 +85,11 @@
     }
 
     /**
-     * reads the resource with the given name from the classpath.
-     * 
+     * Reads the resource with the given name from the classpath.
+     *
      * @param resourceName the name of the resource to read
      * @return an Inputsource witht the content of the resource.
-     * 
+     *
      * @throws SAXException if the resource cannot be read.
      */
     private InputSource readFromClasspath(String resourceName)
@@ -120,7 +120,7 @@
         catch (Exception ex)
         {
             throw new SAXException(
-                    "Could not get stream for " + resourceName, 
+                    "Could not get stream for " + resourceName,
                     ex);
         }
     }

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
Thu Nov  2 13:30:46 2006
@@ -316,7 +316,7 @@
             {
                 currTable.addIdMethodParameter(attributes);
             }
-            else if ( rawName.equals("option"))
+            else if (rawName.equals("option"))
             {
                 setOption(attributes);
             }
@@ -375,30 +375,30 @@
         }
     }
 
-    public void setOption( Attributes attributes ) 
+    public void setOption(Attributes attributes)
     {
-        // Look thru supported model elements in reverse order to 
+        // Look thru supported model elements in reverse order to
         // find one that this option statement applies to.
-        
+
         String key = attributes.getValue("key");
         String value = attributes.getValue("value");
-        if ( currUnique != null )
-        { 
+        if (currUnique != null)
+        {
             currUnique.addOption(key, value);
         }
-        else if ( currIndex != null )
+        else if (currIndex != null)
         {
             currIndex.addOption(key, value);
         }
-        else if ( currFK != null )
+        else if (currFK != null)
         {
             currFK.addOption(key, value);
         }
-        else if ( currColumn != null )
+        else if (currColumn != null)
         {
             currColumn.addOption(key, value);
         }
-        else if ( currTable != null )
+        else if (currTable != null)
         {
             currTable.addOption(key, value);
         }

Modified: db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToData.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToData.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToData.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/engine/database/transform/XmlToData.java
Thu Nov  2 13:30:46 2006
@@ -158,23 +158,23 @@
     public InputSource resolveEntity(String publicId, String systemId)
             throws SAXException
     {
-		try
-		{
-			if (dataDTD != null && dtdFileName.equals(systemId))
-			{
-			    log.info("Resolver: used " + dtdFile.getPath());
-			    return dataDTD;
-			}
-			else
-			{
-			    log.info("Resolver: used " + systemId);
-			    return getInputSource(systemId);
-			}
-		}
-		catch (IOException e)
-		{
-			throw new SAXException(e);
-		}
+        try
+        {
+            if (dataDTD != null && dtdFileName.equals(systemId))
+            {
+                log.info("Resolver: used " + dtdFile.getPath());
+                return dataDTD;
+            }
+            else
+            {
+                log.info("Resolver: used " + systemId);
+                return getInputSource(systemId);
+            }
+        }
+        catch (IOException e)
+        {
+            throw new SAXException(e);
+        }
     }
 
     /**

Modified: db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
URL: http://svn.apache.org/viewvc/db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java?view=diff&rev=470531&r1=470530&r2=470531
==============================================================================
--- db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
(original)
+++ db/torque/generator/trunk/src/java/org/apache/torque/task/TorqueJDBCTransformTask.java
Thu Nov  2 13:30:46 2006
@@ -342,7 +342,8 @@
             }
             doc.appendChild(databaseNode);
         }
-        finally {
+        finally
+        {
             if (con != null)
             {
                 con.close();



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