db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Gordon <rgor...@mwt.net>
Subject Re: deprecated getTable() in MapBuilder
Date Wed, 25 Feb 2004 15:47:29 GMT
Here is snippet from torque-gen-3.1/templates/om/MapBuilder.vm

#if ($generateDeprecated == "true")
    /**
     * Item
     * @deprecated use ${table.JavaName}Peer.TABLE_NAME constant
     */
    public static String getTable()
    {
        return "$table.Name";
    }

  #foreach ($col in $table.Columns)
    #set ( $tfc=$table.JavaName )
    #set ( $cfc=$col.JavaName )
    #set ( $cup=$col.Name.toUpperCase() )

    /**
     * ${table.Name}.$cup
     * @return the column name for the $cup field
     * @deprecated use ${table.JavaName}Peer.${table.Name}.$cup constant
     */
    public static String get${tfc}_${cfc}()
    {
        return "${table.Name}.$cup";
    }
  #end
#end

Scott Eade wrote:

> Rob Gordon wrote:
>
> >Anybody out there (Yo! Scott Eade! :)  know why the
> >getTable() method in MapBuilder is deprecated?
> >
> >It points to a day past when MapBuilders were not so tightly coupled with
> >their table name and could--perhaps--be paramaterized with a table
> >name, thereby being used to map multiple tables (of same structure)
> >to a database....which happens to be exactly what I want to do!
> >
> >I am wondering if the deprecation of getTable suggests an evolutionary
> >dead-end toward which I may be heading (though what I want to do
> >seems easy enough....with minor template changes).
> >
> >
> getTable()?  I don't see it.
>
> Scott
>
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message