db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r991066 - /db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/transformer/om/LoadExternalSchemaTransformer.java
Date Tue, 31 Aug 2010 03:28:35 GMT
Author: tfischer
Date: Tue Aug 31 03:28:35 2010
New Revision: 991066

URL: http://svn.apache.org/viewvc?rev=991066&view=rev
Log:
improved javadoc & code style

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

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=991066&r1=991065&r2=991066&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
Tue Aug 31 03:28:35 2010
@@ -16,14 +16,23 @@ import org.apache.torque.generator.sourc
 import org.apache.torque.templates.TorqueSchemaAttributeName;
 import org.apache.torque.templates.TorqueSchemaElementName;
 
+/**
+ * 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 
             = LogFactory.getLog(LoadExternalSchemaTransformer.class);
 
     /**
-     * Loads the external schemata tables as children of the external-schema
-     * element into the current graph.
+     * 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. 
      *
      * @param root the database root element of the source tree, not null.
      * @param controllerState the controller state, not null.
@@ -39,7 +48,6 @@ public class LoadExternalSchemaTransform
                 = root.getChildren(TorqueSchemaElementName.EXTERNAL_SCHEMA);
         for (SourceElement externalSchemaElement : externalSchemaElementList)
         {
-            
             File currentSourceFile = controllerState.getSourceFile();
             File baseDir = currentSourceFile.getParentFile();
             String relativePath = externalSchemaElement.getAttribute(
@@ -63,7 +71,7 @@ public class LoadExternalSchemaTransform
                     child.setAttribute(
                             TableAttributeName.FROM_EXTERNAL_SCHEMA,
                             relativePath);
-                    // disattach from previous parent so that the 
+                    // detach from previous parent so that the 
                     // new parent is the primary parent. 
                     childIt.remove();
                 }



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