docs: public static Object convertObjectToDatatype(Object objData, Class<?> classData, Object objDefault, int iScale)
          throws Exception
      {
          if (objData == null)
              return objDefault;
          if (objData.getClass() == classData)
              return objData;
          objData = objData.toString();   // Make sure it can be converted.
          DataConverters.initGlobals();
          if (objData instanceof String)
          {   // Convert to local format
              try {
                  if (classData == Short.class)
                      objData = DataConverters.stringToShort((String)objData);
                  else if (classData == Integer.class)
                      objData = DataConverters.stringToInteger((String)objData);
                  else if (classData == Float.class)
                      objData = DataConverters.stringToFloat((String)objData, iScale);
                  else if (classData == Double.class)
                      objData = DataConverters.stringToDouble((String)objData, iScale);
                  else if (classData == Long.class)
                  {
                      objData = DataConverters.stringToDouble((String)objData, iScale);
                      objData = new Long(((Double)objData).longValue());
                  }
                  else if (classData == Date.class)
                  {
                      Date objDate = null;
                      try {
                          objDate = DataConverters.stringToDate((String)objData, iScale); // Try them all
                      } catch (ParseException ex)   {
                          objDate = null;
                      }
                      if (objDate == null)
                      {
                          try {
                              synchronized (DataConverters.gCalendar)
                              {
                                  objDate = DataConverters.gGMTDateTimeFormat.parse((String)objData);
                              }
                          } catch (ParseException ex)   {
                              objDate = null;
                          }
                      }
                      objData = objDate;
                  }
                  else if (classData == Boolean.class)
                      objData = new Boolean((String)objData);
                  else
                      objData = (String)objData;
              } catch (Exception ex)  {
                  throw ex;
              }
          }
          if (objData == null)
              if (objDefault != null)
                  return DataConverters.convertObjectToDatatype(objDefault, classData, null, iScale);    // No chance of infinite recursion
          return objData;
      }