db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: deprecated getTable() in MapBuilder
Date Wed, 25 Feb 2004 22:41:57 GMT
Rob Gordon wrote:

>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
>
>  
>
These were deprecated back in version 3.0, before the code moved to 
torque generator - see Rev 1.6 at:

    
http://cvs.apache.org/viewcvs.cgi/db-torque/src/templates/om/Attic/MapBuilder.vm

The commit message seems to make sense:

>The changes in MapBuilder are to remove the getTable and get<columnName> methods.
>Limit the MapBuilders use to building maps, not storing the same information
>contained in the maps after the maps are created.
>  
>
The deprecation messages tell you the replacement methods to use.

BTW: The deprecated methods won't even be generated in the next release.

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


Mime
View raw message