I have a function to round a Double to a specified number of decimal places:

  public static final Double derbyDouble (Double value, Integer places) {
    ...
  }

I've declared it to Derby like so:

  CREATE FUNCTION DoubleFormat (value  FLOAT,
                                places INTEGER)
  RETURNS FLOAT
  PARAMETER STYLE Java
  LANGUAGE Java
  EXTERNAL NAME 'utils.Utils.derbyDouble';

This works if I use "double" and "int" but not Double and Integer (as in,
the methos is found & used corrrectly if I use primitive types but it isn't
found if I use the corresponding wrapper types). I've also tried Float, which
is no better.

The big difference is that, using primitive types, I can't handle nulls...

Anyone got any ideas whhat I'm doing wrong?

----------------------------------------------------------------------
 John English              | mailto:[EMAIL PROTECTED]
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 School of Computing & MIS | "Those who don't know their history
 University of Brighton    |  are condemned to relive it" (Santayana)
----------------------------------------------------------------------

Reply via email to