Nothing wrong with it, I just didnt think of / see that! However, I still
stick
to my original assertion that the field getters should return the proper
types, 
not the "key" types - this creates an unnecessary conversion, plus
additional
awareness of torque's workings are necessary for this conversion.

To give some background, I am working on a server application that will be
used by 
a web frontend being developed by a different team. We are trying to use
torque, but 
insulate the torque code from all other users - currently this means I
_MUST_ wrap 
the torque object in a translation class to give my users their "view",
where I would
like to be able to simply have my torque classes implement a defined
interface, minimizing
the "wrapping" necessary.

This of course doesn't always work, ie with complex composite entities, but
where it would
work it would be a small performance gain and code reduction.

> -----Original Message-----
> From: Ben Walding [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 27, 2002 2:09 PM
> To: Turbine Torque Developers List
> Subject: Re: Torque Experience
> 
> 
> What is wrong with
> 
> nk.getBigDecimal().intValue()
> 
> (I personally would prefer helper methods like  nk.intValue() 
> which did 
> the same thing)
> 
> Russell Smyth wrote:
> 
> >>It might be a better api, if the properties which use the 
> column names
> >>returned the column type, but getPrimaryKey() should return an
> >>ObjectKey.
> >>    
> >>
> >
> >I have to chime in here and say that this is almost a must! 
> Especially as
> >there is
> >no clean way to convert NumberKey to it's numeric value 
> (that I have found -
> >The only way 
> >I could come up with was 
> Integer.parseInt(NumberKey.toString()), which is
> >troublesome 
> >due to possible NumberFormatExceptions.)
> >
> >I had not gotten to the point yet where I could look at the code and
> >reccomend changes, but
> >for our useage this change is almost mandatory - we would 
> have to do it
> >internally if the change
> >is not made in torque proper.
> >
> >Russell Smyth
> >
> >--
> >To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>  
>




--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to