db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r996351 - in /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates: ./ transformer/om/
Date Sun, 12 Sep 2010 17:58:39 GMT
Author: tfischer
Date: Sun Sep 12 17:58:38 2010
New Revision: 996351

URL: http://svn.apache.org/viewvc?rev=996351&view=rev
Log:
- add license headers
- remove trailing spaces

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/TemplateOptionName.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java
    db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMTransformer.java

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/TemplateOptionName.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/TemplateOptionName.java?rev=996351&r1=996350&r2=996351&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/TemplateOptionName.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/TemplateOptionName.java
Sun Sep 12 17:58:38 2010
@@ -149,7 +149,7 @@ public enum TemplateOptionName implement
                 if (optionValue == null)
                 {
                     throw new SourceTransformerException(
-                            "Option " + templateOption.getName() 
+                            "Option " + templateOption.getName()
                                     + " must be set");
                 }
             }

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java?rev=996351&r1=996350&r2=996351&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
Sun Sep 12 17:58:38 2010
@@ -1,5 +1,24 @@
 package org.apache.torque.templates.transformer.om;
 
+/*
+ * 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.
+ */
+
 import java.io.File;
 import java.util.Iterator;
 import java.util.List;
@@ -19,20 +38,20 @@ import org.apache.torque.templates.Torqu
 /**
  * A SourceTransformer which loads the external schemata tables
  * into the current graph.
- * 
+ *
  * @version $Id: $
  */
 // TODO: move to parent package org.apache.torque.templates.transformer
 public class LoadExternalSchemaTransformer implements SourceTransformer
 {
-    private static Log log 
+    private static Log log
             = LogFactory.getLog(LoadExternalSchemaTransformer.class);
 
     /**
      * Loads the external schemata tables into the current graph.
      * The tables are added as if they were  normal tables
      * but with the attribute fromExternalSchema set to the path
-     * of the external schema from which the table was added. 
+     * of the external schema from which the table was added.
      *
      * @param root the database root element of the source tree, not null.
      * @param controllerState the controller state, not null.
@@ -44,7 +63,7 @@ public class LoadExternalSchemaTransform
             ControllerState controllerState)
         throws SourceTransformerException
     {
-        List<SourceElement> externalSchemaElementList 
+        List<SourceElement> externalSchemaElementList
                 = root.getChildren(TorqueSchemaElementName.EXTERNAL_SCHEMA);
         for (SourceElement externalSchemaElement : externalSchemaElementList)
         {
@@ -60,10 +79,10 @@ public class LoadExternalSchemaTransform
                         new XmlSourceFormat(),
                         externalSchemaPath,
                         controllerState);
-                SourceElement externalSchemaRootElement 
+                SourceElement externalSchemaRootElement
                         = fileSource.getRootElement();
                 this.transform(externalSchemaRootElement, controllerState);
-                Iterator<SourceElement> childIt 
+                Iterator<SourceElement> childIt
                         = externalSchemaRootElement.getChildren().iterator();
                 while (childIt.hasNext())
                 {
@@ -72,11 +91,11 @@ public class LoadExternalSchemaTransform
                     child.setAttribute(
                             TableAttributeName.FROM_EXTERNAL_SCHEMA,
                             relativePath);
-                    // detach from previous parent so that the 
-                    // new parent is the primary parent. 
+                    // detach from previous parent so that the
+                    // new parent is the primary parent.
                     childIt.remove();
                 }
-            } 
+            }
             catch (SourceException e)
             {
                 log.error("Could not construct source from schema file "

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java?rev=996351&r1=996350&r2=996351&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMColumnTransformer.java
Sun Sep 12 17:58:38 2010
@@ -46,15 +46,15 @@ public class OMColumnTransformer
 
     private static OMInheritanceTransformer inheritanceTransformer
             = new OMInheritanceTransformer();
-    
+
     private static Set<String> RESERVED_CONSTANT_NAMES;
-    
+
     static
     {
         Set<String> reservedConstantNames = new HashSet<String>();
         reservedConstantNames.add("DATABASE");
         reservedConstantNames.add("TABLE_NAME");
-        RESERVED_CONSTANT_NAMES 
+        RESERVED_CONSTANT_NAMES
             = Collections.unmodifiableSet(reservedConstantNames);
     }
 

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java?rev=996351&r1=996350&r2=996351&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMForeignKeyTransformer.java
Sun Sep 12 17:58:38 2010
@@ -139,7 +139,7 @@ public class OMForeignKeyTransformer
 
         // create reference only if this table was not loaded from
         // an external schema
-        if (localTable.getAttribute(TableAttributeName.FROM_EXTERNAL_SCHEMA) 
+        if (localTable.getAttribute(TableAttributeName.FROM_EXTERNAL_SCHEMA)
                 == null)
         {
             // create attributes for a field in the local table referencing
@@ -296,7 +296,7 @@ public class OMForeignKeyTransformer
 
         // create backreference only if the foreign table was not loaded from
         // an external schema
-        if (foreignTable.getAttribute(TableAttributeName.FROM_EXTERNAL_SCHEMA) 
+        if (foreignTable.getAttribute(TableAttributeName.FROM_EXTERNAL_SCHEMA)
                 == null)
         {
             // create attributes for a field in the foreign table referencing

Modified: db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMTransformer.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMTransformer.java?rev=996351&r1=996350&r2=996351&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMTransformer.java
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/OMTransformer.java
Sun Sep 12 17:58:38 2010
@@ -105,7 +105,7 @@ public class OMTransformer implements So
         TemplateOptionName.checkRequiredOptions(controllerState);
 
         loadExternalSchemaTransformer.transform(root, controllerState);
-        
+
         for (SourceElement tableElement : root.getChildren(
                 TorqueSchemaElementName.TABLE.getName()))
         {



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