Looks like it should work fine.  If you care/have time to add Long
support directly to Intake, it would be accepted into the main code
base.

john mcnally

On Thu, 2002-05-16 at 01:06, Paul Smith wrote:
> I'd just like to reply to this after trying some things, but I would
> appreciate anyone "InTheKnow" with Intake to see if this is stupid.
> 
> our Beans have a get/setId() property using Longs.
> 
> I've got Intake now to use the Id field as a NumberKey (which is backed by a
> BigDecimal type).  I have then used the mapToProperty attribute of the
> <field> to specify separate a separate getter/setter methods that take a
> NumberKey, and simply set or soak the BigDecimal value out of it.
> 
> e.g:
>      <field name="Id" key="i" type="NumberKey" mapToProperty="BigId">
>       <rule name="minLength" value="1">ID field must be specified</rule>
>      </field>
> 
> and in my bean class:
> 
>   public void setBigId(NumberKey key)
>   {
>     setId(key.getBigDecimal().longValue());
>   }
>   public NumberKey getBigId() { return new NumberKey(getId());}
> 
> Now I believe that I am 'losing' the precision of the BigDecimal, but only
> down to the long's maximum, and since we've chosen long type as our key, we
> should be right (up to the point where the long type runs out of numbers,
> cross fingers).
> 
> Anyone see any issues with that?  A quick yes/no would be cool thanks.  Hats
> off to the entire Turbine dev team, this is one cooool product.
> 
> cheers,
> 
> Paul Smith
> 
> 
> -----Original Message-----
> From: Paul Smith [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 16, 2002 1:29 PM
> To: Turbine Users List (E-mail)
> Subject: Intake: FieldFactory: long type
> 
> 
> Does anyone know if the FieldFactory correctly handles the long type?
> 
> TDK 2.1 FieldFactory.java does not, and I've just downloaded
> turbine-2.2-b1-src.zip and that does not seem to have long either?
> 
> Help.  All our Beans ID fields are long type.
> 
> cheers,
> 
> paul smith
> 
>  --==[(ps)]==--
> 
> 
> --
> 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