to anyone interested in some hacking, attached is the mod I've made to
ExtensionObject.vm

It's dirty, probably, but I'm not a velocity expert and it seems to work
well
## Copyright 2001-2005 The Apache Software Foundation.
##
## Licensed 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.
#set ($interface = "")
#if ($table.Interface)
  #set ($interface = ", $table.Interface")
#end

package $packageObject;

#if ($table.isAbstract())
  #set ($abstract = "abstract")
#end

import org.apache.commons.lang.StringUtils;
import org.apache.torque.om.Persistent;
import org.apache.torque.TorqueException;

#if ($packageBaseObject != $packagePeer)
import ${packagePeer}.*;
#end

/**
#if ($addTimeStamp)
 * The skeleton for this class was autogenerated by Torque on:
 *
 * [$now]
 *
#end
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 */
public $!abstract class $table.JavaName
    extends ${packageBaseObject}.${basePrefix}${table.JavaName}
    implements Persistent$interface
{
  #foreach ($col in $table.Columns)
    #if (($col.JavaNative == "String") && ($col.type == "VARCHAR"))
      #set ( $cjtype = $col.JavaNative )
      #if ( $col.isProtected() )
        #set ( $accessLevel = "protected" )
      #else
        #set ( $accessLevel = "public" )
      #end
     
      #set ( $throwsClause = "" )
      #if ($complexObjectModel)
        #if ($col.isForeignKey())
          #set ( $throwsClause = "throws TorqueException" )
        #end
        #if ( $col.Referrers.size() > 0 )
          #if ($throwsClause == "")
            #set ( $throwsClause = "throws TorqueException" )
          #end
        #end
      #end
 
      $accessLevel void ${col.SetterName}($cjtype v) $throwsClause
      {
        super.${col.SetterName}(StringUtils.substring(v, 0, ${col.size}));
      }

    #end
  #end

}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to