I have successfully extended my user with both boolean fields and String 
fields but I'm having trouble with field types of DOUBLE

Can anyone send me some code snippets or look at mine to see what is 
wrong. I have tried variations on getPerm() setPerm() but it seems
to only like String types in the setPerm() method...

my boolean type works fine using the String method.

any help would be appreciated... I'm still using TDK 2.1.. I know it is 
getting dated, but I can't upgrade at this point... 

also, on another note, I have tried adding some logging info to my 
extended user class and it is not getting called. I fear it has to do with 
the way the user is actually accessed through turbine and all this flux 
stuff... has anyone gotten logging within their extended user to work?


Error:

Caused by: java.lang.NumberFormatException: For input string: 
"TURBINE_USER.COMMISSION_PERCENT" at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at 
java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1213)
        at java.lang.Double.valueOf(Double.java:184)
        at java.lang.Double.<init>(Double.java:259)
        at 
com.kiasoft.ipmanager.util.db.map.TurbineMapBuilderAdapter.getUser_CommissionPercent(TurbineMapBuilderAdapter.java:123)
        at 
com.kiasoft.ipmanager.om.TurbineUserPeerAdapter.<clinit>(TurbineUserPeerAdapter.java:23)


------------------------------------------------------------------------------------------
public class TurbineUserPeerAdapter extends TurbineUserPeer
{
    public static final double COMMISSION_PERCENT = 
mapBuilder.getUser_CommissionPercent();
}

------------------------------------------------------------------------------------------
TurbineUserAdapter.java

    public void setCommissionPercent(String percent)
    {
        setPerm(COMMISSION_PERCENT, percent);
    }

    public double getCommissionPercent()
    {
        double tmp = 0.0;
        try { tmp = new Double ( (String) getPerm(COMMISSION_PERCENT) ).doubleValue(); 
}
        catch ( Exception e ) {}
        return tmp;
    }

------------------------------------------------------------------------------------------
TurbineMapBuilderAdapter.java

    public String getCommissionPercent()
    {
        return "COMMISSION_PERCENT";
    }

    public double getUser_CommissionPercent()
    {
        double tmp = 0.0;
        tmp = new Double( getTableUser() + '.' + getCommissionPercent() 
).doubleValue();
        return tmp;
    }
------------------------------------------------------------------------------------------



-- 

Jeff Painter
------------
[EMAIL PROTECTED]

http://kiasoft.com
(919) 677-8525


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

Reply via email to