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/08/22 22:11:08 UTC

cvs commit: jakarta-turbine-torque/src/java/org/apache/torque/task TorqueObjectModelTask.java

dlr         01/08/22 13:11:08

  Modified:    src/java/org/apache/torque/task TorqueObjectModelTask.java
  Log:
  Extend the functionality of populateInitialContext() -- makes more
  sense since the same type of Context implementation (VelocityContext)
  was being created.
  
  Revision  Changes    Path
  1.2       +12 -9     jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueObjectModelTask.java
  
  Index: TorqueObjectModelTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/task/TorqueObjectModelTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- TorqueObjectModelTask.java	2001/08/02 05:08:37	1.1
  +++ TorqueObjectModelTask.java	2001/08/22 20:11:08	1.2
  @@ -55,8 +55,8 @@
    */
   
   import java.util.Date;
  +
   import org.apache.velocity.context.Context;
  -import org.apache.velocity.VelocityContext;
   import org.apache.velocity.texen.ant.TexenTask;
   import org.apache.torque.engine.database.model.AppData;
   import org.apache.torque.engine.database.transform.XmlToAppData;
  @@ -66,7 +66,7 @@
    *
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
  - * @version $Id: TorqueObjectModelTask.java,v 1.1 2001/08/02 05:08:37 jvanzyl Exp $
  + * @version $Id: TorqueObjectModelTask.java,v 1.2 2001/08/22 20:11:08 dlr Exp $
    */
   public class TorqueObjectModelTask extends TexenTask
   {
  @@ -155,12 +155,17 @@
           targetDatabase = v;
       }
   
  -    public Context initControlContext()
  +    /**
  +     * Populates the initialial context with the model used to
  +     * generate SQL from a XML schema.
  +     *
  +     * @param context The initial context, ripe for population.
  +     * @exception Exception None expected.
  +     */
  +    protected void populateInitialContext(Context context)
  +        throws Exception
       {
  -        /*
  -         * Create velocity context.
  -         */
  -        Context context = new VelocityContext();
  +        super.populateInitialContext(context);
   
           /*
            * Build our application model from the
  @@ -189,7 +194,5 @@
            * Place the target package in the context.
            */
           context.put("targetPackage", targetPackage);
  -
  -        return context;
       }
   }
  
  
  

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