You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Michael Stanley <mp...@syr.edu> on 2001/04/20 20:47:56 UTC

Obtaining USER_ID

What is the best way to obtain a User's Id Integer value?

Mike

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


Re: Obtaining USER_ID

Posted by John McNally <jm...@collab.net>.
((NumberKey)user.getPrimaryKey().getBigDecimal().intValue() 
or
user.getUserId().getBigDecimal().intValue()

or the deprecated method
user.getPrimaryKeyAsInt();

if you are looking for a primitive int.

If you want this as an Integer object you can then wrap it.  Or why not
use the BigDecimal object?

john mcnally


Michael Stanley wrote:
> 
> What is the best way to obtain a User's Id Integer value?
> 
> Mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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